confint.gsl_nls function

Confidence interval for model parameters

Confidence interval for model parameters

Returns asymptotic or profile likelihood confidence intervals for the parameters in a fitted "gsl_nls" object.

## S3 method for class 'gsl_nls' confint(object, parm, level = 0.95, method = c("asymptotic", "profile"), ...)

Arguments

  • object: An object inheriting from class "gsl_nls".
  • parm: A character vector of parameter names for which to evaluate confidence intervals, defaults to all parameters.
  • level: A numeric scalar between 0 and 1 giving the level of the parameter confidence intervals.
  • method: Method to be used, either "asymptotic" for asymptotic confidence intervals or "profile" for profile likelihood confidence intervals. The latter is only available for "gsl_nls" objects that are also of class "nls".
  • ...: At present no optional arguments are used.

Returns

A matrix with columns giving the lower and upper confidence limits for each parameter.

Details

Method "asymptotic" assumes (approximate) normality of the errors in the model and calculates standard asymptotic confidence intervals based on the quantiles of a t-distribution. Method "profile"

calculates profile likelihood confidence intervals using the confint.nls method in the list("MASS") package and for this reason is only available for "gsl_nls" objects that are also of class "nls".

Examples

## 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) ## Not run: ## profile ci's (requires MASS) confint(obj, method = "profile") ## End(Not run)

See Also

confint, confint.nls in package list("MASS").

  • Maintainer: Joris Chau
  • License: LGPL-3
  • Last published: 2025-01-17