sem_lulc_predict: Posterior Predictive Distribution of Landscape Variables

Description Usage Arguments Value

View source: R/sem_lulc_predict.R

Description

Compute the posterior predictive distribution of landscape variables from a fitted SEM, possibly conditioned on specified values of the latent factor(s).

Usage

1
sem_lulc_predict(fit, data, d, newZ = NULL, linpred = FALSE)

Arguments

fit

Object of class stanfit representing a fitted PSM SEM. Parameters a0, A, and phi must be monitored.

data

The data list passed to stan() to estimate fit.

d

Integer in 1, ..., D indicating which landscape variable to simulate.

newZ

Matrix of dimension N_new x L giving the L factor scores for each new prediction. If NULL, the posterior samples of site-specific factor scores are used.

linpred

Logical indicating whether to return the linear predictor (the default is FALSE).

Value

List with elements

X

An iter x N_new matrix containing posterior samples of the predicted landscape variable.

g_mu_X

An iter x N_new matrix containing posterior samples of the linear predictor evaluated at the specified values of Z.


ebuhle/SEMPSM documentation built on Aug. 8, 2020, 4:05 a.m.