calc_ll_pg_stlm_loo: Leave-one-out log-likelihood for pg_stlm() model for use in...

View source: R/calc_ll.R

calc_ll_pg_stlm_looR Documentation

Leave-one-out log-likelihood for pg_stlm() model for use in model selection

Description

this function generates the log-likelihood for data fit using the pg_splm() function. The log-likelihood can be used for model selection and evaluation.

Usage

calc_ll_pg_stlm_loo(Y, X, locs, out, n_message = 50)

Arguments

Y

is a N x J x T array of compositional count data.

X

is a n_sites x p matrix of climate variables.

locs

is a N x 2 matrix of observation locations

out

is a list of MCMC outputs from pg_stlm(), pg_stlm_overdispersed, or pg_stlm_latent_overdispersed

n_message

A positive integer number of frequency of iterations to output a progress message. For example, n_message = 50 outputs progress messages every 50 iterations.


jtipton25/pgR documentation built on July 8, 2022, 12:44 a.m.