Compute and display confidence intervals for model
estimates. Methods are provided for the mean of a numeric vector
ci.default, the probability of a binomial vector
ci.binom, and for lm, and lme
objects are
provided.
Usage
ci(x, confidence=0.95, alpha=1 - confidence, ...)
## S3 method for class 'numeric'
ci(x, confidence=0.95, alpha=1-confidence, na.rm=FALSE, ...)
## S3 method for class 'binom'
ci(x, confidence=0.95, alpha=1-confidence, ...)
## 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, ...)
## S3 method for class 'estimable'
ci(x, confidence=0.95, alpha=1-confidence, ...)
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
Details
ci.binom computes binomial confidence intervals using the
Clopper-Pearson 'exact' method based on the binomial quantile
function. Due to the discrete nature of the binomial distribution,
this interval is conservative.
Value
vector or matrix with one row per model parameter and elements/columns
Estimate, CI lower, CI upper, Std. Error,
DF (for lme objects only), and p-value.