[R] permutation test for linear models with continuous covariates

anders superanders andersdetermigigen at hotmail.com
Tue Nov 29 20:51:13 CET 2005


Hi I was wondering if there is a permutation test available in R for linear 
models with continuous dependent covariates. I want to do a test like the 
one shown here.

bmi<-rnorm(100,25)
x<-c(rep(0,75),rep(1,25))
y<-rnorm(100)+bmi^(1/2)+rnorm(100,2)*x+bmi*x

H0<-lm(y~1+x+bmi)
H1<-lm(y~1+x+bmi+x*bmi)
anova(H0,H1)
summary(lm(y~1+x+bmi))


But I want to use permutation testing to avoid an inflated p-value due to a 
y that is not totally normal distributed and I do not want to log transform 
y.

Thanks

Anders




More information about the R-help mailing list