This function will convert a linear model object to a dataframe containing statistical details for all effects along with effect size measure and its confidence interval. For more details, see effectsize::eta_squared and effectsize::omega_squared.

lm_effsize_ci(object, effsize = "eta", partial = TRUE, conf.level = 0.95, ...)

Arguments

object

The linear model object (can be of class lm, aov, anova, or aovlist).

effsize

Character describing the effect size to be displayed: "eta" (default) or "omega".

partial

Logical that decides if partial eta-squared or omega-squared are returned (Default: TRUE). If FALSE, eta-squared or omega-squared will be returned. Valid only for objects of class lm, aov, anova, or aovlist.

conf.level

Numeric specifying Level of confidence for the confidence interval (Default: 0.95).

...

Ignored.

Value

A dataframe with results from stats::lm() with partial eta-squared, omega-squared, and bootstrapped confidence interval for the same.

Author

Indrajeet Patil

Examples

# for reproducibility set.seed(123) # model mod <- stats::aov( formula = mpg ~ wt + qsec + Error(disp / am), data = mtcars ) # dataframe with effect size and confidence intervals groupedstats::lm_effsize_ci(mod)
#> # A tibble: 2 x 12 #> group term sumsq df1 meansq F.value p.value df2 estimate conf.level #> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 Within wt 87.2 1 87.2 12.0 0.00176 27 0.308 0.95 #> 2 Within qsec 34.2 1 34.2 4.72 0.0387 27 0.149 0.95 #> # … with 2 more variables: conf.low <dbl>, conf.high <dbl>