Learn R Programming

biostat3 (version 0.2.1)

lincom: Linear combination of regression parameters.

Description

Using results calculated by the linearHypothesis function in the car package, calculate a linear combination of regression parameters.

Usage

lincom(model, specification, level = 0.95, eform = FALSE, ...)

Value

A matrix with columns including the estimate, a normal-based confidence interval, test statistic and p-values.

Arguments

model

regression model object (as per the model argument in linearHypothesis)

specification

specification of the linear combination. This is the same as a single component of the hypothesis.matrix argument in linearHypothesis.

level

the confidence level required

eform

logical for whether to exponentiate the confidence interval (default=FALSE)

...

other arguments to the linearHypothesis function.

Details

Multiple specifications of linear combinations are called individually.

See Also

See Also linearHypothesis.

Examples

Run this code
  fit <- glm(chd ~ hieng*job + offset(log(y)), data=diet, family=poisson)
  lincom(fit, c("hienghigh+hienghigh:jobconductor",
                "hienghigh+hienghigh:jobbank"),
         eform=TRUE)

Run the code above in your browser using DataLab