[R] NonParametric Anova

Greg Snow Greg.Snow at imail.org
Thu Jun 16 22:38:31 CEST 2011


You could do this using permutation tests.  If everything is balanced and orthogonal then you can permute the predictors, otherwise you can follow these main steps:

1. Formulate the test of interest as a full and reduced model test and find the F statistic (or other, but I will assume F) for the original data.
2. From the reduced model above find and save the residuals and fitted values.
3. Randomly permute the residuals and add them to the fitted values.
4. Do the full and reduced test on this new data and find the F statistic.
5. Repeat steps 3 and 4 a bunch of times (like 1,998) saving the F statistic each time.
6. The p-value is the proportion of F stats (including the original) that are greater than or equal to the original F stat.

This is fairly easy to code in R using the replicate, aov/lm, sample, fitted, and resid functions.  I don't know of a built in function to do all of this for you, but I expect that writing the code to do this will be simpler than explaining to a built in function exactly what you want to test.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Loo Yim Ling
> Sent: Thursday, June 16, 2011 2:24 AM
> To: r-help at R-project.org
> Subject: [R] NonParametric Anova
> 
> Dear Sir,
> 
> I would like to ask whether there is any tool in R, developed for the
> function of non parametric Anova, where the non parametric analysis is
> able to compute the p-value for interaction as well (similar to Anova)?
> If not, would sir like to suggest any of the other statistical software
> around which would have this tool?
> Thank you.
> 
> LYLing.
> 



More information about the R-help mailing list