# \donttest{
data(barley, package = "nlraa")
fit <- nls(yield ~ SSlinp(NF, a, b, xs), data = barley)
sim <- simulate_nls(fit, nsim = 100)
sims <- summary_simulate(sim)
## If we want to combine the data.frame
simd <- summary_simulate(sim, data = barley)
## If we also want to aggregate by nitrogen rate
simda <- summary_simulate(sim, data = barley, by = "NF")
## The robust option uses the median instead
simdar <- summary_simulate(sim, data = barley, by = "NF",
robust = TRUE)
# }
Run the code above in your browser using DataLab