## data
set.seed(1)
n <- 25
xy <- data.frame(
x = (1:n) / n,
y = 2.5 * exp(-1.5 * (1:n) / n) + rnorm(n, sd = 0.1)
)
## model
obj <- gsl_nls(fn = y ~ A * exp(-lam * x), data = xy, start = c(A = 1, lam = 1))
## asymptotic ci's
confint(obj)
if (FALSE) {
## profile ci's (requires MASS)
confint(obj, method = "profile")
}
Run the code above in your browser using DataLab