compute_likelihood: Compute likelihood for each additional simulation across...

View source: R/AMIS_steps.R

compute_likelihoodR Documentation

Compute likelihood for each additional simulation across timepoints

Description

Calls evaluate likelihood for each timepoint.

Usage

compute_likelihood(
  prevalence_map,
  simulated_prevalences,
  amis_params,
  likelihoods = NULL
)

Arguments

prevalence_map

A list with one entry for each timepoint. Each entry must be a list containing objects data (an L x M matrix of data); and likelihood a function taking arguments data (a matrix of data as above), prevalence (a matrix of output from the transmission model) and optional logical log, which returns the vector of (log)-likelihoods. If a likelihood is not specified then it is assumed that the data consist of samples from a geo-statistical model and empirical methods are used.

amis_params

A list of parameters, e.g. from default_amis_params.

likelihoods

An array with dimension n_tims,n_locs,n_sims – ie timepoints x locations x simulations (optional).

An

n x timepoints matrix of prevalences simulated from the transmission model.

Value

A larger array with the likelihoods of the new simulations joined to the existing array likelihoods.


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