Learn R Programming

gmodels (version 2.15.0)

fit.contrast: Compute and test arbitrary contrasts for regression objects

Description

Compute and test arbitrary contrasts for regression objects.

Usage

fit.contrast(model, varname, coeff, ... )
## S3 method for class 'lm':
fit.contrast(model, varname, coeff, showall=FALSE,
             conf.int=NULL, df=FALSE, ...)
## S3 method for class 'lme':
fit.contrast(model, varname, coeff, showall=FALSE,
             conf.int=NULL, df=FALSE, ...)
## S3 method for class 'mer':
fit.contrast(model, varname, coeff, showall=FALSE,
             conf.int=NULL, sim.mer = TRUE, n.sim = 1000, ...)

Arguments

model
regression (lm,glm,aov,lme) object for which the contrast(s) will be computed.
varname
variable name
coeff
vector or matrix specifying contrasts (one per row).
showall
return all regression coefficients. If TRUE, all model cofficients will be returned. If FALSE (the default), only the coefficients corresponding to the specified contrast will be returned.
conf.int
numeric value on (0,1) or NULL. If a numeric value is specified, confidence intervals with nominal coverage probability conf.int will be computed. If NULL, confidence intervals will not be computed.
df
boolean indicating whether to return a column containing the degrees of freedom.
...
optional arguments provided by methods.
sim.mer
Logical value. If TRUE p-values and confidence intervals will be estimated using [Matrix]{mcmcsamp}. This option only takes effect for mer objects. n.sim{Number of samples to use in [Matrix]{mcm