compareCoefs: Print estimated coefficients and their standard errors in a...

Description Usage Arguments Value Author(s) References Examples

Description

This simple function extracts estimates of regression parameters and their standard errors from one or more models and prints them in a table.

Usage

1
compareCoefs(..., se = TRUE, print=TRUE, digits = 3)

Arguments

...

One or more regression-model objects. These may be of class lm, glm, nlm, or any other regression method for which the functions coef and vcov return appropriate values, or if the object inherits from the mer class created by the lme4 package or lme in the nlme package.

se

If TRUE, the default, show standard errors as well as estimates, if FALSE, show only estimates.

print

If TRUE, the defualt, the results are printed in a nice format using printCoefmat. If FALSE, the results are returned as a matrix

digits

Passed to the printCoefmat function for printing the result.

Value

This function is used for its side-effect of printing the result. It returns a matrix of estimates and standard errors.

Author(s)

John Fox jfox@mcmaster.ca

References

Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.

Examples

1
2
3
4
5
6
7
mod1 <- lm(prestige ~ income + education, data=Duncan)
mod2 <- update(mod1, subset=-c(6,16))
mod3 <- update(mod1, . ~ . + type)
compareCoefs(mod1)
compareCoefs(mod1, mod2)
compareCoefs(mod1, mod2, mod3)
compareCoefs(mod1, mod2, se=FALSE)

jonathon-love/car documentation built on May 19, 2019, 7:28 p.m.