[R-sig-ME] Summarizing the fitted model takes more RAM than

Douglas Bates bates at stat.wisc.edu
Mon Dec 15 16:19:03 CET 2008

On Mon, Dec 15, 2008 at 3:36 AM, Gorjanc Gregor
<Gregor.Gorjanc at bfro.uni-lj.si> wrote:
>> ## Fit the model
>> fit9b <- lmer(tezaroj ~ pasma + roj2 + zj2 + spol + reja + jagLM +(1 | rejec) + (1 | hy) + (1 | hys), data=podatki)
>> From your fitting, i wonder what your theoretical model is.
>> y=b0+uj+b1*pasma + b2*roj2 + b3*zj2 + b4*spol + b5*reja + b6*jagLM+b7*rejec+b8*hy+b9*hys
>> uj represents the random intercept effects for rejec,hy and hys?
>> I cannot see how to write your model and explain it.
>> It seems that you have fitted three random intercepts in your model (rejec,hy and hys), are they all two-level factor or first-level factor?

I think you mean "second level factor" not "two-level factor", Zhijie.
 I know it is confusing but "two-level factor" means a factor which
has only two possible values, such as sex which has only two levels -
male and female.  Two-level factorial designs, for example, are
specialized experimental designs where all the experimental factors
are restricted to only two levels.

I believe you are using the terminology of multilevel modeling where
one characterizes factors as being at the first level, the second
level, etc.  One can fit multilevel models using lmer but one can also
fit models that do not fit into the multilevel framework - models with
crossed or partially crossed random effects.  Unfortunately, because
the terminology of multilevel models (also called hierarchical linear
models or HLMs) is so pervasive, many people believe that any model
with random effects must be hierarchical.  That is not true and it
leads to many misconceptions.

Even worse, the emphasis on levels in model specification for software
like MLWin and HLM causes confusion about fixed effects and random
effects.  These is a widespread belief that the level of a variable
affects its use in the fixed-effects specification, which is not true.

Gorjanc is correct in what he writes below.  He has three random
effects terms.  They are what I would call simple, scalar random
effects ("scalar" because there is one random effect associated with
each level of the factors rejec, hy and hys and "simple" because the
term on the left side of the "|" is "1", which means that each term
contributes a set of indicator columns to the model matrix for the
random effects). Whether the factors rejec, hy and hys happen to form
a nested sequence is irrelevant to the model specification and fitting
in lmer.  In the multilevel world it is mandatory.

>> What is your model formula?
> I simply have three random effects. The model specification (without indexes) would be
> y ~ N(mu, sigma^2_e)
> mu = alpha + ... + rejec + hy + hys
> rejec ~ N(0 sigma^2_r)
> hy ~ N(0 sigma^2_hy)
> hys ~ N(0 sigma^2_hys)
> gg
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list