Description Usage Arguments Details Value
View source: R/sem_psm_predict.R
Compute the posterior predictive distribution of PSM risk from a fitted SEM, possibly conditioned on specified values of the latent factor(s).
1 2 3 4 5 6 7 8 9 |
fit |
Object of class |
data |
The data list passed to |
newsites |
Optional numeric vector of length |
newZ |
Optional matrix of dimension |
level |
Level of grouping at which to predict. Options are |
transform |
Logical indicating whether to return the linear predictor ( |
gradient |
Logical indicating whether to compute the gradient of PSM risk with respect to the latent factor(s). |
Currently predictions can only be made for sites (with or without PSM data) used to fit the model, and for sample-average precipitation conditions (i.e., precipitation effects are set to zero). These restrictions will be lifted in a later version.
List with elements
est
An iter x N_new
matrix containing posterior samples of the predicted probability
(or the linear predictor of logit probability, if transform == FALSE
) of PSM.
gradient
An iter x N_new x L
array whose [,,l]
panel contains posterior
samples of the gradient of PSM with respect to the l
-th factor, evaluated at newZ
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.