
Get effect sizes (lmSupport::modelEffectSizes)
Source:R/lmsupport_modeleffectsizes.R
lmSupport_modelEffectSizes.Rd
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"
Arguments
- Model
a linear model, produced by lm
Display results to screen. Default = TRUE
- Digits
Number of digits for printing effect sizes
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
# }