Compute power for a Two Factor Within Subjects ANOVA with up to two by four levels. Takes means, sds, and sample sizes for each group. Alpha is .05 by default, alternative values may be entered by user
win2F(m1.1, m2.1, m3.1 = NA, m4.1 = NA, m1.2, m2.2, m3.2 = NA,
m4.2 = NA, s1.1 = NA, s2.1 = NA, s3.1 = NA, s4.1 = NA,
s1.2 = NA, s2.2 = NA, s3.2 = NA, s4.2 = NA, r12 = NULL,
r13 = NULL, r14 = NULL, r15 = NULL, r16 = NULL, r17 = NULL,
r18 = NULL, r23 = NULL, r24 = NULL, r25 = NULL, r26 = NULL,
r27 = NULL, r28 = NULL, r34 = NULL, r35 = NULL, r36 = NULL,
r37 = NULL, r38 = NULL, r45 = NULL, r46 = NULL, r47 = NULL,
r48 = NULL, r56 = NULL, r57 = NULL, r58 = NULL, r67 = NULL,
r68 = NULL, r78 = NULL, r = NULL, s = NULL, n, alpha = 0.05)
Mean of first level factor 1, 1st level factor two
Mean of second level factor 1, 1st level factor two
Mean of third level factor 1, 1st level factor two
Mean of fourth level factor 1, 1st level factor two
Mean of first level factor 1, 2nd level factor two
Mean of second level factor 1, 2nd level factor two
Mean of third level factor 1, 2nd level factor two
Mean of fourth level factor 1, 2nd level factor two
Standard deviation of first level factor 1, 1st level factor two
Standard deviation of second level factor 1, 1st level factor two
Standard deviation of third level factor 1, 1st level factor two
Standard deviation of forth level factor 1, 1st level factor two
Standard deviation of first level factor 1, 2nd level factor two
Standard deviation of second level factor 1, 2nd level factor two
Standard deviation of third level factor 1, 2nd level factor two
Standard deviation of forth level factor 1, 2nd level factor two
correlation Factor 1, Level 1 and Factor 1, Level 2
correlation Factor 1, Level 1 and Factor 1, Level 3
correlation Factor 1, Level 1 and Factor 1, Level 4
correlation Factor 1, Level 1 and Factor 2, Level 1
correlation Factor 1, Level 1 and Factor 2, Level 2
correlation Factor 1, Level 1 and Factor 2, Level 3
correlation Factor 1, Level 1 and Factor 2, Level 4
correlation Factor 1, Level 2 and Factor 1, Level 3
correlation Factor 1, Level 2 and Factor 1, Level 4
correlation Factor 1, Level 2 and Factor 2, Level 1
correlation Factor 1, Level 2 and Factor 2, Level 2
correlation Factor 1, Level 2 and Factor 2, Level 3
correlation Factor 1, Level 2 and Factor 2, Level 4
correlation Factor 1, Level 3 and Factor 1, Level 4
correlation Factor 1, Level 3 and Factor 2, Level 1
correlation Factor 1, Level 3 and Factor 2, Level 2
correlation Factor 1, Level 3 and Factor 2, Level 3
correlation Factor 1, Level 3 and Factor 2, Level 4
correlation Factor 1, Level 4 and Factor 2, Level 1
correlation Factor 1, Level 4 and Factor 2, Level 2
correlation Factor 1, Level 4 and Factor 2, Level 3
correlation Factor 1, Level 4 and Factor 2, Level 4
correlation Factor 2, Level 1 and Factor 2, Level 2
correlation Factor 2, Level 1 and Factor 2, Level 3
correlation Factor 2, Level 1 and Factor 2, Level 4
correlation Factor 2, Level 2 and Factor 2, Level 3
correlation Factor 2, Level 2 and Factor 2, Level 4
correlation Factor 2, Level 3 and Factor 2, Level 4
sets same correlations between DVs on all factor levels (seriously, just use this)
sets same standard deviation for factor levels (see comment above)
Sample size for first group
Type I error (default is .05)
Power for the Two Factor Within Subjects ANOVA
# NOT RUN {
win2F(m1.1=-.25,m2.1=0,m3.1=.10,m4.1=.15,m1.2=-.25,m2.2=.10,m3.2=.30,m4.2=.35,
s1.1=.4,s2.1=.5,s3.1=2.5,s4.1=2.0,s1.2=.4,s2.2=.5,s3.2=2.5,s4.2=2.0,r=.5,n=80)
win2F(m1.1=-.25,m2.1=0,m1.2=-.25,m2.2=.10,s1.1=.4,s2.1=.5,,s1.2=.4,s2.2=.5,
r12=.5,r13=.4,r14=.55,r23=.4,r24=.5,r34=.45,n=200)
# }
Run the code above in your browser using DataCamp Workspace