coef_compare | R Documentation |
Compare the coefficients to two fitted models. The models must have the same coefficients.
coef_compare(model1, model2, digits = 3, verbose = TRUE)
model1 |
A fitted model object from the
|
model2 |
A fitted model object from the
|
digits |
A positive integer indicating how many
significant digits are to be used for numeric and
complex numbers. This argument is passed to
|
verbose |
A logical value indicating whether the
matrix should be printed. The default is |
A matrix.
# fit model
lmod1 <- lm(murder ~ hs_grad + urban + poverty + single,
data = crime2009)
#fit without DC
lmod2 <- lm(murder ~ hs_grad + urban + poverty + single,
data = crime2009[-9, ])
#compare coefficients of models
coef_compare(lmod1, lmod2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.