coefficient_anova: Compare coefficients of all shared predictors across models...

Description Usage Arguments Details Value See Also Examples

View source: R/coefficient_anova.R

Description

Compare coefficients of all shared predictors across models via ANOVA using coef_welch.

Usage

1
coefficient_anova(model_list, model_names = NULL, padj = p.adjust.methods)

Arguments

model_list

A list of regression models.

model_names

A list of names for the regression models (default is NULL).

padj

Adjustment of p-values for multiple comparisons. Value must come from p.adjust.methods.

Details

For each predictor variable in the models, runs coef_welch to test for equality of regression parameters across models.

Value

Data frame of coefficient information. Data frame includes coefficient estimates for each model as well as results from ANOVA test comparing coefficients across models.

See Also

coef_welch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 states = as.data.frame(state.x77)

 m1 = lm(`Life Exp` ~ Income + Illiteracy, data=states,
         subset=state.region=='Northeast')
 m2 = lm(`Life Exp` ~ Income + Illiteracy, data=states,
         subset=state.region=='South')
 m3 = lm(`Life Exp` ~ Income + Illiteracy, data=states,
         subset=state.region=='North Central')
 m4 = lm(`Life Exp` ~ Income + Illiteracy, data=states,
         subset=state.region=='West')

 mList = list(m1, m2, m3, m4)

 coefficient_anova(model_list = mList,
                   model_names = c('Northeast', 'South',
                                   'North Central', 'West'))

paramhetero documentation built on Jan. 9, 2020, 1:09 a.m.