eta_f: eta^2 and Coefficient of Determination (R^2) for ANOVA from F

View source: R/eta_f.R

eta_fR Documentation

\eta^2 and Coefficient of Determination (R^2) for ANOVA from F

Description

**Note on function and output names:** This effect size is now implemented with the snake_case function name 'eta_f()' to follow modern R style guidelines. The original dotted version 'eta.F()' is still available as a wrapper for backward compatibility, and both functions return the same list. The returned object includes both the original element names (e.g., 'eta', 'etalow', 'etahigh', 'dfm', 'dfe', 'F', 'p', 'estimate', 'statistic') and newer snake_case aliases (e.g., 'eta_value', 'eta_lower_limit', 'eta_upper_limit', 'df_model', 'df_error', 'f_value', 'p_value'). New code should prefer 'eta_f()' and the snake_case output names, but existing code using the older names will continue to work.

Usage

eta_f(dfm, dfe, f_value, a = 0.05, Fvalue)

eta.F(dfm, dfe, Fvalue, a = 0.05)

Arguments

dfm

degrees of freedom for the model/IV/between

dfe

degrees of freedom for the error/residual/within

f_value

F statistic

a

significance level

Fvalue

F statistic only for older function

Details

This function displays \eta^2 from ANOVA analyses and their non-central confidence interval based on the F distribution. These values are calculated directly from F statistics and can be used for between subjects and repeated measures designs. Remember if you have two or more IVs, these values are partial eta squared.

Eta is calculated by multiplying the degrees of freedom of the model by the F-statistic. This is divided by the product of degrees of freedom of the model, the F-statistic, and the degrees of freedom for the error or residual.

\eta^2 = \frac{df_m \cdot F}{df_m \cdot F + df_e}

Learn more on our example page.

Value

Provides the effect size (\eta^2) with associated confidence intervals and relevant statistics.

eta

\eta^2 effect size

etalow

lower level confidence interval of \eta^2

etahigh

upper level confidence interval of \eta^2

dfm

degrees of freedom for the model/IV/between

dfe

degrees of freedom for the error/residual/within

F

F-statistic

p

p-value

estimate

the \eta^2 statistic and confidence interval in APA style for markdown printing

statistic

the F-statistic in APA style for markdown printing

Examples


# The following example is derived from the "bn1_data"
# dataset, included in the MOTE library.

# A health psychologist recorded the number of close inter-personal
# attachments of 45-year-olds who were in excellent, fair, or poor
# health. People in the Excellent Health group had 4, 3, 2, and 3
# close attachments; people in the Fair Health group had 3, 5,
# and 8 close attachments; and people in the Poor Health group
# had 3, 1, 0, and 2 close attachments.

anova_model <- lm(formula = friends ~ group, data = bn1_data)
summary.aov(anova_model)

eta_f(dfm = 2, dfe = 8,
      Fvalue = 5.134, a = .05)

# Backwards-compatible dotted name (deprecated)
eta.F(dfm = 2, dfe = 8,
      Fvalue = 5.134, a = .05)

MOTE documentation built on Dec. 15, 2025, 9:06 a.m.

Related to eta_f in MOTE...