# [R] permutation tests for LM in the lmPerm package

Thierry Janssens thierry.janssens at ecology.falw.vu.nl
Thu May 6 11:14:45 CEST 2010

```Hi all,
Dear Dr. Wheeler,

I am trying to use the lmPerm package to perform multiple regression on
microarray data with  certain empirical variables associated with
treatments of the experiment. In order the circumvent the very
conservative multiple test corrections such as Bonferroni and BH, I try
to use permutated probabilities to assess associations.

I started to read the manual/vignette. The example script on the dataset
CC164gives some output which I find difficult to interpret.

At this point I have two questions:

Why is the number of iterations for every coefficient different (also in
the Exact method)?

In what sense do P.L and P.Q (or N.L and N.Q) differ?

With a self made fake dataset, e.g. this one, the separate coefficients
Q and L do not appear.

y <- c(2563, 124, 597, 365, 248, 693, 975, 321, 965, 23, 89, 456, 123,
654, 71)
z <- c(632, 235, 786, 241, 658, 301, 078, 932, 214, 657, 874, 369, 145,
314, 17)
T <- rep(1:3, 5)
L <- c(rep(1, 5), rep(2, 5), rep(3, 5))
Block <- rep(1:5, 3)
fakedata <- as.data.frame(cbind(y, z, T, L, Block))

summary(lmp(y ~ z, data = fakedata, perm = "Exact"))
summary(lmp(y ~ T*L, data = fakedata, perm = "Exact"))
summary(lmp(z ~ T*L, data = fakedata, perm = "Exact"))

> summary(lmp(y ~ z, data = fakedata, perm = "Exact"))
 "Settings:  unique SS : numeric variables centered"

Call:
lmp(formula = y ~ z, data = fakedata, perm = "Exact")

Residuals:
Min     1Q Median     3Q    Max
-544.2 -410.6 -172.7  131.1 1997.5

Coefficients:
Estimate Iter Pr(Prob)
z  0.07101   51    0.922

Residual standard error: 662.3 on 13 degrees of freedom
Multiple R-Squared: 0.001104,   Adjusted R-squared: -0.07573
F-statistic: 0.01437 on 1 and 13 DF,  p-value: 0.9064

> summary(lmp(y ~ T*L, data = fakedata, perm = "Exact"))
 "Settings:  unique SS : numeric variables centered"

Call:
lmp(formula = y ~ T * L, data = fakedata, perm = "Exact")

Residuals:
Min      1Q  Median      3Q     Max
-747.19 -456.15  -27.69  317.46 1450.81

Coefficients:
Estimate Iter Pr(Prob)
T     -79.81   60    0.633
L    -234.44   51    0.804
T:L   284.78  303    0.251

Residual standard error: 643.5 on 11 degrees of freedom
Multiple R-Squared: 0.202,      Adjusted R-squared: -0.01564
F-statistic: 0.9281 on 3 and 11 DF,  p-value: 0.4595

> summary(lmp(z ~ T*L, data = fakedata, perm = "Exact"))
 "Settings:  unique SS : numeric variables centered"

Call:
lmp(formula = z ~ T * L, data = fakedata, perm = "Exact")

Residuals:
Min      1Q  Median      3Q     Max
-354.10 -248.43  -43.19  181.02  516.81

Coefficients:
Estimate Iter Pr(Prob)
T      10.48   51    1.000
L     -85.40  217    0.318
T:L   -92.86   51    0.863

Residual standard error: 320.5 on 11 degrees of freedom
Multiple R-Squared: 0.0959,     Adjusted R-squared: -0.1507
F-statistic: 0.3889 on 3 and 11 DF,  p-value: 0.7633

So there must be something I do not get from the vignette

Thierry

--
Thierry K.S. Janssens
Vrije Universiteit Amsterdam
Faculty of Earth and Life Sciences
Institute of Ecological Science
Department of Animal Ecology,
De Boelelaan 1085
1081 HV AMSTERDAM, The Netherlands
Phone: +31 (0)20-5989147
Fax: +31 (0)20-5987123
thierry.janssens at ecology.falw.vu.nl

```