##
## Nasturtium example (nonlinear regression with replication)
##
## Log-logistic model
mod <- nls(weight ~ theta1/(1 + exp(theta2 + theta3 * log(conc))),
start = list(theta1 = 1000, theta2 = -1, theta3 = 1),
data = nasturtium)
## Compute approximate 95\% calibration intervals
invest(mod, y0 = c(309, 296, 419), interval = "inversion")
invest(mod, y0 = c(309, 296, 419), interval = "Wald")
## Bootstrap calibration intervals
#boo <- invest(mod, y0 = c(309, 296, 419), boot = TRUE, nsim = 9999,
# progress = TRUE, seed = 101)
#boo # print bootstrap summary
#plot(boo) # plot results
Run the code above in your browser using DataLab