# NOT RUN {
## Definition of the simulation settings
my_model <- "Baranyi"
my_times <- seq(0, 30, length = 100)
n_sims <- 3000
pars <- tribble(
~par, ~mean, ~sd, ~scale,
"logN0", 0, .2, "original",
"mu", 2, .3, "sqrt",
"lambda", 4, .4, "sqrt",
"logNmax", 6, .5, "original"
)
## Calling the function
stoc_growth <- predict_stochastic_growth(my_model, my_times, n_sims, pars)
## We can plot the results
plot(stoc_growth)
## Adding parameter correlation
my_cor <- matrix(c(1, 0, 0, 0,
0, 1, 0.7, 0,
0, 0.7, 1, 0,
0, 0, 0, 1),
nrow = 4)
stoc_growth2 <- predict_stochastic_growth(my_model, my_times, n_sims, pars, my_cor)
plot(stoc_growth2)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab