|
Size: 298
Comment:
|
Size: 1405
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| = R code for equivalence test in one-way ANOVA = | |
| Line 2: | Line 4: |
| = R code for Equivalence test in one-way ANOVA = | For an effect size in an one-way anova $$\theta^2 ^$$: |
| Line 4: | Line 6: |
| $$\theta^2 ^$$ = [ \eta^2 ^ (N-k)]/[(1 - $$\eta^2 ^ ) \bar(N)]$$ |
|
| Line 5: | Line 9: |
| [ | we can formulate hypotheses of form H0: $$\theta^2 ^ ≥ d and HA : $$\theta^2 ^ < d $$. If ind equals 1 then we reject nonequivalence concluding $$\theta^2 ^ < d for given $$ $$\eta^2 ^, group sizes and type II error$$. [TYPE INTO R THE DESIRED INPUTS RSQ, N, K, DCRIT AND BETA USING VALUES IN FORM BELOW]. RSQ represents partial $$eta^text{2}$$ using one of Cohen's [[FAQ/effectSize|rules of thumb]], n is a vector of group sizes, dcrit represents the [[FAQ/mageq|criterion for d]] and beta is the type II error. Koh and Cribbie (2013) show that Wellek's test is not robust to differences in group variances whereas their proposed Wellek–Welch test was insensitive to differences in group variances. |
| Line 10: | Line 25: |
| k <- 4 eta <- 0.5 |
dcrit <- 0.5 beta <- 0.05 |
| Line 14: | Line 29: |
| [THEN COPY AND PASTE THE BELOW INTO R] |
|
| Line 15: | Line 32: |
| k <- length(n) | |
| Line 17: | Line 35: |
| cstats <- (k*(k-1)/ns)*qf(0.05,k-1,ns-k,(ns/k)*eta*eta) | cstats <- (k*(k-1)/ns)*qf(beta,k-1,ns-k,(ns/k)*dcrit*dcrit) |
| Line 22: | Line 40: |
__Reference__ Koh A and Cribbie R (2013) Robust tests of equivalence for k independent groups. ''British Journal of Mathematical and Statistical Psychology'' '''66(3)''', 426–434. |
R code for equivalence test in one-way ANOVA
For an effect size in an one-way anova $$\theta2 $$:
$$\theta2 $$ = [ \eta2 (N-k)]/[(1 - $$\eta2 ) \bar(N)]$$
we can formulate hypotheses of form
H0: $$\theta2 ≥ d and HA : $$\theta2 < d $$.
If ind equals 1 then we reject nonequivalence concluding $$\theta2 < d for given $$ $$\eta2 , group sizes and type II error$$.
[TYPE INTO R THE DESIRED INPUTS RSQ, N, K, DCRIT AND BETA USING VALUES IN FORM BELOW].
RSQ represents partial $$eta^text{2}$$ using one of Cohen's rules of thumb, n is a vector of group sizes, dcrit represents the criterion for d and beta is the type II error.
Koh and Cribbie (2013) show that Wellek's test is not robust to differences in group variances whereas their proposed Wellek–Welch test was insensitive to differences in group variances.
rsq <- 0.006 n <- c(10,12,13,15) dcrit <- 0.5 beta <- 0.05
[THEN COPY AND PASTE THE BELOW INTO R]
k <- length(n) ns <- sum(n) psi2 <- (rsq/(1-rsq))*k*((ns-k)/ns) cstats <- (k*(k-1)/ns)*qf(beta,k-1,ns-k,(ns/k)*dcrit*dcrit) ind <- 0 if (psi2 < cstats) ind = 1 print(ind)
Reference
Koh A and Cribbie R (2013) Robust tests of equivalence for k independent groups. British Journal of Mathematical and Statistical Psychology 66(3), 426–434.
