compute_weight_matrix_empirical: Compute weight matrix using empirical Radon-Nikodym...

View source: R/AMIS_steps.R

compute_weight_matrix_empiricalR Documentation

Compute weight matrix using empirical Radon-Nikodym derivative

Description

Compute matrix describing the weights for each parameter sampled, for each location. One row per sample, one column per location. Each weight is computed based on the empirical Radon-Nikodym derivative, taking into account geostatistical prevalence data for the specific location and the prevalence values computed from the transmission model for the specific parameter sample.

Usage

compute_weight_matrix_empirical(
  likelihoods,
  prev_sim,
  amis_params,
  weight_matrix
)

Arguments

likelihoods

An n_sims x n_locs matrix of (log-)likelihoods NB: transpose of slice of array.

prev_sim

A vector containing the simulated prevalence value for each parameter sample.

amis_params

A list of parameters, e.g. from default_amis_params

weight_matrix

An n_sims x n_locs matrix containing the current values of the weights.

Value

An updated weight matrix.


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