Thin wrapper for DescTools::EtaSq to retrieve $eta^2$ for a simple use case without having to fit an aov model beforehand. Only use this for a simple one-way design, e.g. only one independent variable.

etasq(formula, data)

Arguments

formula

The model formula for stats::aov.

data

The data.frame.

Value

A single numeric value

Examples

etasq(stunzahl ~ jahrgang, ngo)
#> [1] 0.1765473