[R-sig-ME] force lmer/glmer to use known random effects
Thierry Onkelinx
thierry.onkelinx at inbo.be
Mon Jan 9 11:40:48 CET 2017
Dear Alexia,
IMHO that is not possible with lme4. I think you can do it with INLA which
has a "copy" feature. See
http://www.r-inla.org/models/tools#TOC-Copying-a-model. You will need to
fit both models simultaneous.
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
2017-01-07 20:29 GMT+01:00 Alexia Jolicoeur-Martineau <
alexia.jolicoeur-martineau op mail.mcgill.ca>:
> In SAS, there is an option to use a known covariance matrix for your
> random effects (See here: https://support.sas.com/
> documentation/cdl/en/statug/63033/HTML/default/statug_mixed_sect033.htm).
> In lme4 we cannot use covariance matrices but we can use random effects. Is
> there a way for me to do force lmer/glmer to use known random effects
> variances?
>
> My algorithm works in two steps. In step 1, I fit a generalized linear
> mixed model with a known variable "x". In step 2, I fit the generalized
> linear mixed model but this time I assume "x" to be unknown and every other
> parameters to be known (using the parameter estimates from step 1). This is
> what we call alternating optimization. I thus want to be able to fix the
> random parameters from the model in step 2 to be the estimates of the
> random effects from step 1. Is this possible to do?
>
>
> I already implemented my method in SAS but I wish I could also implement
> in R because 1) SAS macros are slow and 2) SAS is not free so not everyone
> could use it.
>
>
> Alexia
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list