Skip to contents

Get effect sizes from the lmSupport package and modelEffectSizes function. The function had to be taken separately from the package as the package was removed from CRAN and the dependency was failing.

From the original documentation: "Calculates unique SSRs, SSE, SST. Based on these SSs, it calculates partial eta2 and delta R2 for all effects in a linear model object. For categorical variables coded as factors, it calculates these for multi-df effect. Manually code regressors to get 1 df effects Uses car::Anova() with Type 3 error"

Usage

lmSupport_modelEffectSizes(Model, Print = TRUE, Digits = 4)

Arguments

Model

a linear model, produced by lm

Print

Display results to screen. Default = TRUE

Digits

Number of digits for printing effect sizes

Value

Returns a list with fields for effect sizes, SSE, and SST.

Author

John J. Curtin, jjcurtin@wisc.edu

Examples

# \donttest{
m <- lm(mpg ~ cyl + disp, data = mtcars)
lmSupport_modelEffectSizes(m)
#> lm(formula = mpg ~ cyl + disp, data = mtcars)
#> 
#> Coefficients
#>                   SSR df pEta-sqr dR-sqr
#> (Intercept) 1728.9312  1   0.8646     NA
#> cyl           46.4184  1   0.1464 0.0412
#> disp          37.5940  1   0.1219 0.0334
#> 
#> Sum of squared errors (SSE): 270.7
#> Sum of squared total  (SST): 1126.0
# }