Skip to contents

Function to run the model and calculate the likelihood. A poisson likelihood is used for incidence. The parameters must be constrained, such that b0 is greater than 0, b1 is between 0 and 1 and phi is between 0 and 365.25. The incidence data must be provided as a count.

Usage

RSVsim_log_likelihood_dust(
  fitted_parameters,
  fitted_parameter_names,
  fixed_parameters,
  data,
  times,
  cohort_step_size = 10,
  init_conds = NULL,
  warm_up = NULL
)

Arguments

fitted_parameters

index 1: b0 - Transmission rate coefficient parameter, index 2: b1 - amplitude of seasonal forcing parameter and index 3: phi - phase shift of seasonality parameter.

fitted_parameter_names

Vector of parameter names to exclude from the list because they are fitted. Default: NULL.

times

Simulation times. Default: 0 - 3650 days with intervals of 0.25 days.

cohort_step_size

Time steps to run the model over before adjusting the ages of all cohorts. Default: 10 days.

init_conds

Initial conditions to run the model. List. Default: NULL. If NULL: 1% RSV prevalence is assumed for people during the primary infection. All other people are assumed to be susceptible to their primary infection.

warm_up

Length of time-points to exclude before calculating the likelihood. Default: NULL.

Value

Log-likelihood assuming the incidence data is Poisson distributed.