pointwise_loglike: Return pointwise log likelihood density for all samples in a...

Description Usage Arguments Value

View source: R/waic.R

Description

Produce a matrix of log likelihood density for each observational data point in each parameter sample for the model. The result is a matrix with data points in rows and model samples in columns. If the samples are uniform (i.e., instead of MCMC), then the samples will need to be weighted by their posterior probabilities. In this case, a vector of log weight factors is also produced.

Usage

1
pointwise_loglike(aScenarioList, weighted)

Arguments

aScenarioList

A list of ScenarioInfo structures. They should all be from the same model (i.e., the same expectation type).

weighted

Flag indicating whether posterior probability weight factors should also be produce

Value

A list with the matrix of log likelihood density values and, if weighted==TRUE, a vector of log posterior probabilities for weighting.


JGCRI/gcamland documentation built on Oct. 6, 2020, 5:30 p.m.