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

View source: R/AMIS_steps.R

compute_weight_matrix_histogramR Documentation

Compute weight matrix using empirical Radon-Nikodym derivative (with fixed breaks)

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 value computed from the transmission model for the specific parameter sample.

Usage

compute_weight_matrix_histogram(
  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. (double)

amis_params

A list of parameters, e.g. from default_amis_params

weight_matrix

A 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.