eta_sq_ci: Bootstrap confidence interval for eta squared

View source: R/bootstrap_ci.R

eta_sq_ciR Documentation

Bootstrap confidence interval for eta squared

Description

Percentile bootstrap for the proportion of variance in outcome explained by group, resampling observations jointly so the group structure travels with each resample.

Usage

eta_sq_ci(outcome, group, R = 2000, conf.level = 0.95, seed = NULL)

Arguments

outcome

A numeric vector.

group

A grouping vector of the same length.

R

Integer. Number of bootstrap resamples. Defaults to 2000.

conf.level

Confidence level. Defaults to 0.95.

seed

Integer or NULL. When supplied, sets the random seed.

Value

A named numeric vector: estimate, lower, upper. The bounds are NA with fewer than 3 complete observations or fewer than 2 groups.

See Also

bootstrap_ci()

Examples

eta_sq_ci(mtcars$mpg, mtcars$cyl, seed = 42)

surveyframe documentation built on July 25, 2026, 1:07 a.m.