[R] Fitting mixed-effects models with lme with fixed error term variances
Gregor Gorjanc
gregor.gorjanc at bfro.uni-lj.si
Thu Nov 23 02:51:34 CET 2006
Hello!
Douglas Bates wrote:
> On 11/22/06, Gregor Gorjanc <gregor.gorjanc at bfro.uni-lj.si> wrote:
>> Douglas Bates wrote:
>> > On 11/21/06, Gregor Gorjanc <gregor.gorjanc at bfro.uni-lj.si> wrote:
>> >> Douglas Bates <bates <at> stat.wisc.edu> writes:
>> >> ...>
>> >> > Can you be more specific about which parameters you want to fix and
>> >> > which you want to vary in the optimization?
>> >>
>> >> It would be nice to have the ability to fix all variances i.e.
>> >> variances of
>> >> random effects.
>> >
...
>> > effects but allow the variance of a slope for the same grouping factor
>> > to be estimated. Well, you could but only in the fortune("Yoda")
>> > sense.
>> >
>>
>> Yes, I agree here. Thank you for the detailed answer.
>>
>> > By the way, if you fix all the variances then what are you optimizing
>> > over? The fixed effects? In that case the solution can be calculated
>> > explicitly for a linear mixed model. The conditional estimates of the
>> > fixed effects given the variance components are the solution to a
>> > penalized linear least squares problem. (Yes, the solution can also
>> > be expressed as a generalized linear least squares problem but there
>> > are advantages to using the penalized least squares representation.
>>
>> Yup. It would really be great to be able to do that nicely in R, say use
>> lmer() once and since this might take some time use estimates of
>> variance components next time to get fixed and random effects. Is this
>> possible with lmer or any related function - not in fortune("Yoda")
>> sense ;)
>
> Not quite. There is now a capability in lmer to specify starting
> estimates for the relative precision matrices which means that you can
> use the estimates from one fit as starting estimates for another fit.
> It looks like
>
> fm1 <- lmer(...)
> fm2 <- lmer(y ~ x + (...), start = fm1 at Omega)
>
> I should say that in my experience this has not been as effective as I
> had hoped it would be. What I see in the optimization is that the
> first few iterations reduce the deviance quite quickly but the
> majority of the time is spent refining the estimates near the optimum.
> So, for example, if it took 40 iterations to converge from the rather
> crude starting estimates calculated within lmer it might instead take
> 35 iterations if you give it good starting estimates.
Yes, I also have the same experience with other programs, say VCE[1].
What I was hopping for was just solutions from linear mixed model i.e.
either via GLS or PLS representations and no optimization if values for
variance components are passed as input - there should be a way to
distinguish that from just passing starting values..
[1]http://vce.tzv.fal.de/index.pl
Gregor
More information about the R-help
mailing list