statistics - R- Partial eta squared for repeated measures ANOVA (car package) -
i have 2-way repeated measures design (3 x 2), , i'd figure out how calculate effect sizes (partial eta squared).
i have matrix data in (called a) (repeated measures)
a.a a.b b.a b.b c.a c.b 1 514.0479 483.4246 541.1342 516.4149 595.5404 588.8000 2 569.0741 550.0809 569.7574 599.1509 621.4725 656.8136 3 738.2037 660.3058 812.2970 735.8543 767.0683 738.7920 4 627.1101 638.1338 641.2478 682.7028 694.3569 761.6241 5 599.3417 637.2846 599.4951 632.5684 626.4102 677.2634 6 655.1394 600.9598 729.3096 669.4189 728.8995 716.4605
idata =
caps lower b b b b c c b
i know how repeated measures anova car package (type 3 ss standard in field although know results in logical error.. if wants explain me i'm 5 love understand it):
summary(anova(lm(a ~ 1), idata=idata,type=3, idesign=~caps*lower)), multivariate=false)
i think want take part of summary print out:
univariate type iii repeated-measures anova assuming sphericity
ss num df error ss den df f pr(>f) (intercept) 14920141 1 153687 5 485.4072 3.577e-06 *** caps 33782 2 8770 10 19.2589 0.000372 *** lower 195 1 13887 5 0.0703 0.801451 caps:lower 2481 2 907 10 13.6740 0.001376 **
and use calculate partial eta squared. so, if i'm not mistaken, need take ss first column , divide (itself + ss error row) each effect. correct way go it? if so, how do it? can't figure out how reference values summary print out.
thanks
the partial eta-squared can calculated etasq
function in heplots
package
library(car) mod <- anova(lm(a ~ 1), idata = idata, type = 3, idesign = ~caps*lower) mod library(heplots) etasq(mod, anova = true)
since asking calculations:
?etasq
: 'for univariate linear models, classical η^2 = ssh / sst , partial η^2 = ssh / (ssh + sse). these identical in one-way designs.'.
if wish inspect code calculations of η^2 model class
in example, may use gets3method(f = "etasq", class = "anova.mlm")
.
Comments
Post a Comment