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

From: Tim Hesterberg <>
Date: Tue 13 Dec 2005 - 06:52:24 EST

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%, because you've lost the correlation between that X and others. I don't know of a suitable permutation test in general for testing individual X's.

S+Resample has a permutationTest() function that lets you specify which columns to permute. The Canty/Davison/Hinkley "boot" library (in R or S-PLUS) offers "permutation" as one of the options for sampling in the boot() function; to use this you would specify the Y variable as the data set and pass the X's separately to the statistic.

Tim Hesterberg

>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.
>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

| Tim Hesterberg       Research Scientist              |
|  Insightful Corp.                |
| (206)802-2319        1700 Westlake Ave. N, Suite 500 |
| (206)283-8691 (fax)  Seattle, WA 98109-3012, U.S.A.  |
|               |
Download the S+Resample library from

Two Research Scientist positions:

	data mining
	frailty/mixed effects

Speak out about biased science in Washington D.C. mailing list PLEASE do read the posting guide! Received on Tue Dec 13 06:58:17 2005

This archive was generated by hypermail 2.1.8 : Tue 13 Dec 2005 - 09:37:14 EST