# \donttest{
## We will use the multiple_experiments data set
data("multiple_experiments")
## For each environmental factor, we need to defined a model
sec_names <- c(temperature = "CPM", pH = "CPM")
## Any model parameter can be fixed
known <- list(Nmax = 1e8, N0 = 1e0, Q0 = 1e-3,
temperature_n = 2, temperature_xmin = 20, temperature_xmax = 35,
pH_n = 2, pH_xmin = 5.5, pH_xmax = 7.5, pH_xopt = 6.5)
## The rest require starting values for model fitting
start <- list(mu_opt = .8, temperature_xopt = 30)
## We can now call the fitting function
global_fit <- fit_multiple_growth(start, multiple_experiments, known, sec_names)
## Parameter estimates can be retrieved with summary
summary(global_fit)
## We can compare fitted model against observations
plot(global_fit)
## Any single environmental factor can be added to the plot using add_factor
plot(global_fit, add_factor = "temperature")
# }
Run the code above in your browser using DataLab