[R-sig-ME] use a posterior distribution from one model as fixed effect in another model

David Villegas Ríos chirleu at gmail.com
Fri Mar 30 22:53:15 CEST 2018


Dear list
I have a conceptual question.

I run a MCMCglmm model (model 1) and extracted the posterior distribution
of the random effects. This is a matrix of 75 (number of individuals) x
5000 (number of iteractions of the model).

Now I'd like to use that posterior distribution (75x5000) as a explanatory
variable X (fixed effect) in another mixed-effect model (model 2). I have
thought of two options:
- Run model 2, 5000 times, one with each of the values of the distribution
of variable X, and then get a distribution of responses
- Run model two, e.g. 1000 times randomly picking one value for the
distribution of variable X on each run,  and then get a distribution of
responses

Could you please give me some advise on how to proceed, and if my thoughts
are correct?
I'd like to know how to do it both with MCMCglmm (Bayesian) and lme or lme4
(frequentist).

Thanks!

David

	[[alternative HTML version deleted]]



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