Hi there

I don't know if this is the right place to do such a question, but
nonetheless I try. I'm trying to understand how to use the function lmer in
order to do a between- and within-factors ANOVA, but without any success. I
know about the usage of the function aov, but this holds only for balanced
designs; its documentation say to use lme function (package nlme) for
unbalanced designs. Furthermore the lmer function (package lme4) is an
evolution of lme, so I wish to use this last function in order to perform
my ANOVA. But I'm not able to understand how to do this.

More precisely, imagine you have a dependent variable DV and four
independent variables IV1, IV2, IV3, IV4, where IV1, IV2 are
between-factors and IV3, IV4 are within-factors. Moreover you have a
variable called Subject in order to identify the subject on which
measurements are done (like for example this dataset:
http://personality-project.org/r/datasets/R.appendix5.data). If I use the
aov function, my between- and within-factors ANOVA would stand as follows:

aov(DV~(IV1*IV2*IV3*IV4)+Error(Subject/(IV3*IV4))).

Now can you write me the precise syntax in order to obtain the same result
with the lmer function? Thanks a lot in advance, and forgive me in the case
this topic is inappropriate with this mailing list.



*Additional details:* The problem is that no one seems to be interested in
explain the relations of 'within-factor' and 'between-factor' concepts with
those of 'fixed-effect' and 'random-effect'. Textbooks and papers about
ANOVA talk about between and within factors, while documentations and
papers about lmer function talk about mixed-effects models, i.e. they talk
fixed and random effects, without mentioning between and within factors.
Thus I am not able to understand the relations between the two, since I
think they are completely uncorrelated each others.

	[[alternative HTML version deleted]]

