likelihood.jsodm_lv_sepexp: Likelihood Computation for JSODM_LV Model

View source: R/likelihood_jsodm_lv_sepexp.R

likelihood.jsodm_lv_sepexpR Documentation

Likelihood Computation for JSODM_LV Model

Description

Computes the likelihood of observations at each ModelSite. At data in the fitted model, or on new data supplied. It uses likelihood_joint_LVvmarg_draw.jsodm_lv.

Usage

## S3 method for class 'jsodm_lv_sepexp'
likelihood(fit, numlvsims = 1000, cl = NULL, simseed = NULL)

Arguments

numlvsims

the number of simulated latent variable values to use for computing likelihoods

cl

a cluster created by parallel::makeCluster()

chains

is a vector indicator which mcmc chains to extract draws from. If NULL then all chains used.

Value

Returns a matrix. Each row corresponds to a draw of the parameters from the posterior. Each column to a ModelSite. The value in each cell is the probability density, given the parameters from the draw, evaluated at the observations for the model site.


sustainablefarms/msod documentation built on March 6, 2023, 7:17 a.m.