Learn R Programming

asbio (version 0.2-1)

trim.ranef.test: Robust test for random factors using trimmed means.

Description

Provides a robust hypothesis test of factor level population var = 0 for random factor levels.

Usage

trim.ranef.test(Y, X, tr = 0.2)

Arguments

Y
Vector of response data. A quantitative vector.
X
Vector of factor levels
tr
Amount of trimming. A number from 0-0.5.

Value

  • Returns a list with three components dataframe describing numerator and denominator degrees of freedom, the F test statistic and the p-value.

Details

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.

References

Wilcox, R. R. 2005. Introduction to Robust Estimation and Hypothesis Testing, Second Edition. Elsevier, Burlington, MA.

Examples

Run this code
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)

Run the code above in your browser using DataLab