force lmer/glmer to use known random effects
Fitting a random term with known covariance matrix G is equivalent to fitting random term Zu where ZZ' = G and cov(u) = I. Eg Z' is the Choleski root of G. So is theoretically possible with lmer but may not be practicable (depends on size of G).
On 01/07/2017 07:29 PM, Alexia Jolicoeur-Martineau wrote:
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 at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.