[R] lme formula

Eusebio Arenal Gutiérrez slist at eio.uva.es
Tue Mar 20 15:59:49 CET 2001


I'm a new user of nlme package and I don't know what formula I have to use
for two models.

1.- If I have two grouping factors at the same level, what is the formula I
have to use? For example, I have a Latin square design in which the factor
is fixed and the rows and columns are random,

y = factor + row + column + error

following the formula for a randomized block design, I would use something
like:

lme(y~factor, random= ~ 1 | (row+column))

of course, the "+" is not accepted in that place but all the forms I find
take one of the grouping factors nested in the other.

2.- I have one fixed factor (A) and a random one (B) nested in the fixed
one. The formula:

lme(y~A, random = ~ 1 | B)

take B as a block, and of course is (I think) wrong, but the formula:

lme(y~A, random = ~1 | A/B)

gives a level of grouping more than I want. Is it possible put something
like "B %in% A" as a grouping factor?

Sorry if questions have no sense, but I've been shearching in nlme help and
Pinheiro & Bates's book and I don't know if the function lme can handle
these problems.

Thanks for any hint,

Eusebio Arenal

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list