compute_prior_proposal_ratio: Compute the prior/proposal ratio

View source: R/AMIS_steps.R

compute_prior_proposal_ratioR Documentation

Compute the prior/proposal ratio

Description

This function returns the ratio between the prior and proposal distribution for each sampled parameter value (i.e. each row in param). This function returns the first weight See step (4) of the AMIS algorithm in Integrating geostatistical maps and infectious disease transmission models using adaptive multiple importance sampling. Renata Retkute, Panayiota Touloupou, Maria-Gloria Basanez, T. Deirdre Hollingsworth, Simon E.F. Spencer Ann. Appl. Stat. 15 (4) 1980 - 1998, December 2021. DOI: https://doi.org/10.1214/21-AOAS1486

Usage

compute_prior_proposal_ratio(components, param, prior_density, df, log)

Arguments

components

A list of mixture components made of

G

A numeric vector containing the number of components from each AMIS iteration

Sigma

A list of covariace matrices from each component

Mean

A list of means from each component

probs

A list of probability weights for each component (unnormalised)

param

A matrix containing the sampled parameter vectors.

prior_density

Vector containing the prior density of each sampled parameter vector.

df

The degrees of freedom for the t-distributed proposal distribution.

log

A logical indicating whether to work on the log scale.

Value

A vector containing the prior/proposal ratio for each row in param


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