View source: R/trim.ranef.test.R
trim.ranef.test | R Documentation |
Provides a robust hypothesis test for the null: Var(X) = 0, for a population of random factor levels.
trim.ranef.test(Y, X, tr = 0.2)
Y |
Vector of response data. A quantitative vector. |
X |
Vector of factor levels |
tr |
Amount of trimming. A number from 0-0.5. |
Robust analyses for random effect designs are particularly important since standard random effects models provide poor control over type I error when assumptions of normality and homoscedasticity are violated. Specifically, Wilcox (1994) showed that even with equal sample sizes, and moderately large samples, actual probability of type I error can exceed 0.3 if normality and homoscedasticity are violated.
Returns a list with three components dataframe describing numerator and denominator degrees of freedom, the F test statistic and the p-value.
code based on Wilcox (2005)
Ken Aho
Wilcox, R. R. (2005) Introduction to Robust Estimation and Hypothesis Testing, Second Edition. Elsevier, Burlington, MA.
rye<-c(50,49.8,52.3,44.5,62.3,74.8,72.5,80.2,47.6,39.5,47.7,50.7)
nutrient<-factor(c(rep(1,4),rep(2,4),rep(3,4)))
trim.ranef.test(rye,nutrient,tr=.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.