We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The set carrying capacity help should inform the user
set_carrying_capacity()
Sandbox example:
library(malariasimulation) # Some seasonal pars g0 <- 0.284596 g <- c(-0.317878, -0.0017527, 0.116455) h <- c(-0.331361, 0.293128, -0.0617547) # Setting seasonality the standard way p_seasonal <- get_parameters( list( human_population = 10000, model_seasonality = TRUE, g0 = g0, g = g, h = h ) ) |> set_equilibrium(init_EIR = 20) p_seasonal$clinical_incidence_rendering_min_ages = 0 p_seasonal$clinical_incidence_rendering_max_ages = 100 * 365 s_seasonal <- run_simulation(365 * 5, p_seasonal) # Setting seasonality via carrying capacity (dev branch version) r <- rep(NA, 365 * 5) for(t in 1:(365 * 5)){ r[t] <- malariasimulation:::rainfall( t, g0, g, h, 0.001 ) } r_bar <- mean(r) p_cc <- get_parameters( list( human_population = 10000 ) ) |> set_carrying_capacity( timesteps = 1:(365 * 5), carrying_capacity_scalers <- matrix(r / r_bar, ncol = 1) ) |> set_equilibrium(init_EIR = 20) p_cc$clinical_incidence_rendering_min_ages = 0 p_cc$clinical_incidence_rendering_max_ages = 100 * 365 s_cc <- run_simulation(365 * 5, p_cc) # With perennial sp alongside seasonal sea <- malariasimulation::gamb_params sea$species <- "seasonal" per <- malariasimulation::gamb_params per$species <- "perennial" p_cc2 <- get_parameters( list( human_population = 10000 ) ) |> set_species(list( sea = sea, per = per ), proportions = c(0.5, 0.5) ) |> set_carrying_capacity( timesteps = 1:(365 * 5), carrying_capacity_scalers <- matrix(c(r / r_bar, rep(1, length(r))), ncol = 2) ) |> set_equilibrium(init_EIR = 20) p_cc2$clinical_incidence_rendering_min_ages = 0 p_cc2$clinical_incidence_rendering_max_ages = 100 * 365 s_cc2 <- run_simulation(365 * 5, p_cc2) # Compare incidence par(mfrow = c(1, 2)) # Standard seasonal plot(s_seasonal$n_inc_clinical_0_36500, t = "l", ylab = "inc") # Recreating seasonal with carrying capacity changes lines(s_cc$n_inc_clinical_0_36500, col = "red") # One seasonal and one perennial vector lines(s_cc2$n_inc_clinical_0_36500, col = "green") # Compare EIR plot(s_cc2$EIR_seasonal, t = "l", ylab = "EIR") lines(s_cc2$EIR_perennial, col = "green")
The text was updated successfully, but these errors were encountered:
pwinskill
No branches or pull requests
The set carrying capacity help should inform the user
set_carrying_capacity()
Sandbox example:
The text was updated successfully, but these errors were encountered: