[R-sig-ME] How to obtain a posterior predictive distribution in MCMCglmm, and constrain it to non-negative values?

Jarrod Hadfield j@h@d||e|d @end|ng |rom ed@@c@uk
Wed Sep 20 16:25:30 CEST 2023


HI,

You can use simulate(model) in exactly the same way as predict(model) to generate posterior predictive distributions with various random effects marginalised using the argument marginal. The only constraints that can be imposed are those that arise from the particular distribution fitted (e.g. if family=�poisson� the outcome is constrained to be non-negative integers) and so arbitrarily imposing a positive constraint is not possible.

Cheers,

Jarrod


From: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> on behalf of Fiona Scarff <fiona.scarff.4 using gmail.com>
Date: Wednesday, 20 September 2023 at 13:31
To: r-sig-mixed-models using r-project.org <r-sig-mixed-models using r-project.org>
Subject: [R-sig-ME] How to obtain a posterior predictive distribution in MCMCglmm, and constrain it to non-negative values?
This email was sent to you by someone outside the University.
You should only click on links or attachments if you are certain that the email is genuine and the content is safe.

In MCMCglmm, how can I obtain a posterior predictive distribution? I
have two random effects; individuals from which observations have been
obtained, and a measurement error. I would like to marginalise only
over the individual random effect, and supply a single trivially small
measurement error for the prediction, so as to get the predicted
distribution of the true (rather than measured) response in any
unspecified individual.

Can I further specify this in such a way as to constrain the
prediction to non-negative values? Naively, I could impose a
distribution like log-normal or poisson when fitting the glmm. But the
model fit needs to be able to handle negative values in the response,
which arise purely due to measurement error.

Many thanks for your time and any suggestions!

Fiona Scarff
Murdoch University

_______________________________________________
R-sig-mixed-models using 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. Is e buidheann carthannais a th� ann an Oilthigh Dh�n �ideann, cl�raichte an Alba, �ireamh cl�raidh SC005336.

	[[alternative HTML version deleted]]



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