[R] Random Effects for One-Way Anova

Giuseppe.Palermo@bo.infn.it Giuseppe.Palermo at bo.infn.it
Wed Nov 30 11:19:10 CET 2005


Hello to All.
I'd want to use a one-way ANOVA. This means that I have only one factor, with,
lets say, 5 levels.
I made a dataframe, called "DATA", with two Columns:
A, that is my response, and it is "class numerical".
B, that defines the different levels of my factor, and it is "class factor".

If I want to use a fixed effect model,
I know that the formula I have to use is:
lm.1 <- lm(A~B,data=DATA)
anova(lm.1)

My questions is:
which formula should I use if I want to use a random effects model?
I think I should use "lme", but I don't know how.

I hope to get a reply
Best wishes to all
Giuseppe




More information about the R-help mailing list