calculate_ess: Compute the current effective sample size

View source: R/AMIS_steps.R

calculate_essR Documentation

Compute the current effective sample size

Description

This function returns the effective sample size (ESS) for each location. For each column of the weight matrix weight_mat, the ESS component is computed as

(∑_{i=1}^{N} w_{i}^2 )^{-1}

where N is the number of sampled parameter values for each location.

Usage

calculate_ess(weight_mat, log)

Arguments

weight_mat

The weight matrix. A N x L matrix with L the number of locations and N the number of sampled parameter values.

log

logical indicating if the weights are on the log scale.

Value

A vector containing the ESS value for each location.

See Also

compute_weight_matrix


OxfordRSE/trachomAMIS documentation built on Aug. 1, 2022, 10:21 p.m.