Re: [R] permutation test for linear models with continuous covariates

2005-12-12 Thread Tim Hesterberg
What do you want to test? To test H0: Y is independent of all X's, you can permute Y. To test H0: a particular X does not contribute to predicting Y, conditional on the other X's you have to be careful. If you permute that X, the size is wrong; the type I error can be nearly 50%, beca

Re: [R] permutation test for linear models with continuous covariates

2005-11-30 Thread Peter Dalgaard
"anders superanders" <[EMAIL PROTECTED]> writes: > 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/

[R] permutation test for linear models with continuous covariates

2005-11-30 Thread anders superanders
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*bm