[prev in list] [next in list] [prev in thread] [next in thread]
List: r-help
Subject: Re: [R] permutation test for linear models with continuous
From: Peter Dalgaard <p.dalgaard () biostat ! ku ! dk>
Date: 2005-11-30 14:11:45
Message-ID: x2hd9uxm1q.fsf () viggo ! kubism ! ku ! dk
[Download RAW message or body]
"anders superanders" <andersdetermigigen@hotmail.com> 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/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.
Er, what would you permute? For an interaction test like this (notice
by the way that "*" in your model formula does not mean what you think
it does) I do not think a permutation test exists. You could try
bootstrapping to get an improved approximation the distribution of the
interaction term.
--
O__ ---- Peter Dalgaard ุster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic