simulate.communityPGLMM: Simulate from a communityPGLMM object

Description Usage Arguments

View source: R/pglmm-utils.R

Description

Note that this function currently only works for model fit with bayes = TRUE

Usage

1
2
## S3 method for class 'communityPGLMM'
simulate(object, nsim = 1, seed = NULL, re.form = NULL, ...)

Arguments

object

A fitted model object with class 'communityPGLMM'.

nsim

positive integer scalar - the number of responses to simulate.

seed

an optional seed to be used in set.seed immediately before the simulation so as to generate a reproducible sample.

re.form

(formula, NULL, or NA) specify which random effects to condition on when predicting. If NULL, include all random effects and the conditional modes of those random effects will be included in the deterministic part of the simulation (i.e Xb + Zu); if NA or ~0, include no random effects and new values will be chosen for each group based on the estimated random-effects variances (i.e. Xb + Zu * u_random).

...

optional additional arguments: none are used at present.


phyr documentation built on Jan. 13, 2021, 5:40 p.m.