confidence_intervals: Confidence interval methods for (non)-linear models

View source: R/confidence_intervals.R

confidence_intervalsR Documentation

Confidence interval methods for (non)-linear models

Description

Confidence interval methods for (non)-linear models

Usage

confidence_intervals(
  x,
  method = c("wald", "profile", "bootstrap", "simple-bayes", "all"),
  parm,
  level = 0.95,
  verbose = FALSE,
  ...
)

Arguments

x

object of class lm, nls, nlme, gls or gnls

method

method or methods to use. Possible options are: ‘Wald’, ‘profile’, ‘bootstrap’, ‘all’

parm

optional character string to select the parameter

level

probability level

verbose

logical (default FALSE) whether to print messages

...

additional arguments to be passed to function boot

Examples


require(car)
data(barley, package = "nlraa")
## Fit a linear model (quadratic)
fit.lm <- lm(yield ~ NF + I(NF^2), data = barley)

cfs.int <- confidence_intervals(fit.lm, method = c("wald", "bootstrap"))

fit.nls <- nls(yield ~ SSlinp(NF, a, b, xs), data = barley)

cfs.int2 <- confidence_intervals(fit.nls, method = c("wald", "profile", "bootstrap"))




femiguez/nlraa documentation built on Jan. 26, 2024, 9:31 p.m.