Learn R Programming

gmodels (version 2.0.7)

ci: Compute Confidence Intervals

Description

Compute and display confidence intervals for model estimates. Methods for lm and lme objects are provided.

Arguments

x
object from which to compute confidence intervals.
confidence
confidence level. Defaults to 0.95.
alpha
type one error rate. Defaults to 1.0-confidence
na.rm
boolean indicating whether missing values should be removed. Defaults to FALSE.
...
Arguments for methods

Value

  • matrix with one row per model parameter and columns Estimate, CI lower, CI upper, Std. Error, DF (for lme objects only), and p-value.

synopsis

ci(x, confidence = 0.95, alpha = 1 - confidence,...) ## S3 method for class 'default': ci(x, confidence = 0.95, alpha = 1 - confidence, na.rm=FALSE)...) ## S3 method for class 'lm': ci(x, confidence = 0.95, alpha = 1 - confidence,...) ## S3 method for class 'lme': ci(x, confidence = 0.95, alpha = 1 - confidence,...)

See Also

MASSconfint, lm, summary.lm

Examples

Run this code
data(state)
reg  <-  lm(Area ~ Population, data=as.data.frame(state.x77))
ci(reg)

Run the code above in your browser using DataLab