[R] lme v. aov?
Spencer Graves
spencer.graves at pdf.com
Fri Nov 28 17:52:24 CET 2003
Please excuse: You and these other sources are correct:
"varcomp" does not exist in R. I prefer R but am forced to use S-Plus,
because I work in an organization with many S-Plus users and only 2 R
users, and I forgot that point in my reply.
My experience suggests that in S-Plus "varcomp" may run faster
than "lme" and may sometimes be easier to use. However, there are many
things that are easy to get from "lme" and quite difficult to get from
"varcomp". Moreover, "lme" is under active development, while "varcomp"
is not. I think the R developers made the right choice: If "lme" can do
everything that "varcomp" can do plus more, it is a waste of time to
create a function called "varcomp". Users concerned about speed can buy
a faster computer or modify the source code to get what they want faster.
Thanks for the question, and excuse me for sending you on a
search for something that doesn't exist.
Spencer Graves
Peter B. Mandeville wrote:
> According to MASS fourth edition pages 279 to 286, the functions
varcomp and raov are only found in SPLUS. I tried help for varcomp after
load the libraries MASS and nlme without success. Help search didn't
find them either. MASS and the Cox book on variance components state
that the variance components can be gotten from lme.
>
> Where is the varcomp funtion found in R?
>
> Thank you very much,
>
> Peter B.
>
> At 08:54 a.m. 27/11/03 -0800, you wrote:
>
Do you want to make inference about the specific subjects in your
study? If yes, the subjects are a fixed effect. If instead you want to
make inference about the societal processes that will generate the
subjects you will get in the future, that is a random effect. The
function "lme" handles both fixed and random effects, as does
"varcomp". The functions "aov" and "lm" are restricted to fixed effects
only. You can use dummy coding for "lm" and "aov" as well.
The the distinction between "fixed" and "random" effects seems to
me to be the same as what Deming called the difference between
"enumerative" and "analytic" studies: With a fixed effect / enumerative
study, the objective is to determine the disposition of the sampling
frame. For example, Deming managed a survey of food distribution in
Japan in 1946 or so, right after World War II. The purpose was to
determine where to deliver food the next day, etc., to keep people from
dying of starvation. That was an enumerative study. If the purpose had
been to advance economic theories for use not only in Japan or in
1946-47, that is an analytic study.
Do you have the book Pinhiero and Bates (2000) Mixed-Effects
Models in S and S-Plus (Springer)? If you have more than one use for
analyzing data on human subjects, I suggest you get and study this book
if you haven't already. Doug Bates and several of his graduate students
have developed "lme". I am not current in the absolute latest
literature in that area of statistics, but Bates seems to me to be among
the leaders in that area and specifically in statistical computing for
that kind of problem.
hope this helps. spencer graves
John Christie wrote:
>
> I am trying to understand better an analysis mean RT in various
> conditions in a within subjects design with the overall mean RT /
> subject as one of the factors. LME seems to be the right way to do
> this. using something like m<- lme(rt~ a *b *subjectRT, random=
> ~1|subject) and then anova(m,type = "marginal"). My understanding is
> that lme is an easy interface for dummy coding variables and doing a
> multiple regression (and that could be wrong). But, what is aov doing
> in this instance? MANOVA? I also haven't been able to find anything
> really useful on what to properly assign to "random" in the lme
> formula. For repeated measures the use above is always in the examples.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list