# Example with Lemna model - physiological params
library(dplyr)
# exposure - control run
exp <- Schmitt2013 %>%
filter(ID == "T0") %>%
select(time=t, conc)
# observations - control run
obs <- Schmitt2013 %>%
filter(ID == "T0") %>%
select(t, BM=obs)
# update metsulfuron
myscenario <- metsulfuron %>%
set_param(c(k_phot_fix = TRUE,Emax = 1)) %>%
set_init(c(BM = 12)) %>%
set_exposure(exp)
fit <- calibrate(
x = myscenario,
par = c(k_phot_max = 1),
data = obs,
output = "BM",
lower=0,
upper=1,
method="Brent"
)
# Likelihood profiling
# \donttest{
res <- lik_profile(
x = myscenario,
data = obs,
output = "BM",
par = fit$par,
bounds = list(
k_phot_max = list(0, 30)
),
refit = FALSE,
type = "fine",
method = "Brent"
)
# plot
plot_lik_profile(res)
# }
Run the code above in your browser using DataLab