Compare observed and modelled data from the lancelot model. This conforms to the mcstate interface.

lancelot_compare(state, observed, pars)

Arguments

state

State vector for the end of the current day. This is assumed to be filtered following lancelot_index() so contains 10 rows corresponding to ICU, general beds, admissions, deaths and seroconversion compartments.

observed

Observed data. At the moment please see the tests for a full list as this changes frequently (and this function may be removed in future).

pars

A list of parameters, as created by lancelot_parameters()

Value

A vector of log likelihoods, the same length as the number of particles (the number of columns in the modelled state)