etasq | R Documentation |
Calculates partial eta-squared for linear models or multivariate analogs of eta-squared (or R^2), indicating the partial association for each term in a multivariate linear model. There is a different analog for each of the four standard multivariate test statistics: Pillai's trace, Hotelling-Lawley trace, Wilks' Lambda and Roy's maximum root test.
etasq(x, ...)
## S3 method for class 'mlm'
etasq(x, ...)
## S3 method for class 'Anova.mlm'
etasq(x, anova = FALSE, ...)
## S3 method for class 'lm'
etasq(x, anova = FALSE, partial = TRUE, ...)
x |
A |
... |
Other arguments passed down to |
anova |
A logical, indicating whether the result should also contain
the test statistics produced by |
partial |
A logical, indicating whether to calculate partial or classical eta^2. |
For univariate linear models, classical
\eta^2
= SSH / SST and partial
\eta^2
= SSH / (SSH + SSE). These are identical in one-way designs.
Partial eta-squared describes the proportion of total variation attributable to a given factor, partialling out (excluding) other factors from the total nonerror variation. These are commonly used as measures of effect size or measures of (non-linear) strength of association in ANOVA models.
All multivariate tests are based on the s=min(p, df_h)
latent roots of
H E^{-1}
. The analogous multivariate partial \eta^2
measures are
calculated as:
\eta^2 = V/s
\eta^2 = T/(T+s)
\eta^2 = L^{1/s}
\eta^2 = R/(R+1)
When anova=FALSE
, a one-column data frame containing the
eta-squared values for each term in the model.
When anova=TRUE
, a 5-column (lm) or 7-column (mlm) data frame
containing the eta-squared values and the test statistics produced by
print.Anova()
for each term in the model.
Michael Friendly
Muller, K. E. and Peterson, B. L. (1984). Practical methods for computing power in testing the Multivariate General Linear Hypothesis Computational Statistics and Data Analysis, 2, 143-158.
Muller, K. E. and LaVange, L. M. and Ramey, S. L. and Ramey, C. T. (1992). Power Calculations for General Linear Multivariate Models Including Repeated Measures Applications. Journal of the American Statistical Association, 87, 1209-1226.
Anova
library(car)
data(Soils, package="carData")
soils.mod <- lm(cbind(pH,N,Dens,P,Ca,Mg,K,Na,Conduc) ~ Block + Contour*Depth, data=Soils)
#Anova(soils.mod)
etasq(Anova(soils.mod))
etasq(soils.mod) # same
etasq(Anova(soils.mod), anova=TRUE)
etasq(soils.mod, test="Wilks")
etasq(soils.mod, test="Hotelling")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.