prod_part: Calculate the product part of the infection likelihood

Description Usage Arguments Value Examples

View source: R/prod_part.R

Description

This function is used in the calculation of the likelihood for a General Stochastic Epidemic, and calculates ∏_{j != kappa}^{n_I} [ ∑_{ i in I_{n_{j-}} } [ beta_{i,j} ] ].

Usage

1
prod_part(inf_times, rem_times, B, infected_inds)

Arguments

inf_times

A vector of the infection times of all individuals (Inf if not infected).

rem_times

A vector of the removal times of all infected individuals.

B

The infection rate matrix.

infected_inds

A vector of the infected individuals.

Value

Returns the value of the product detailed above.

Examples

1
This function is utilised by the log_likelihood function.

IanniMuliterno/EpidemicR documentation built on Oct. 30, 2019, 7:18 p.m.