interval_intersect: Calculate the interval intersect.

Description Usage Arguments Value Examples

View source: R/interval_intersect.R

Description

This function is used in the calculation of the likelihood for a General Stochastic Epidemic, and calculates the interval intersect used in the calculation of the intergral for the infection likelihood. This is the interval [ min(R_i, I_j) - min(I_i, I_j) ] for i in infecteds, j in all.

Usage

1
interval_intersect(inf_times, rem_times, 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.

infected_inds

A vector of the infected individuals.

Value

Returns a matrix where each column is a vector for each j.

Examples

1
This function is utilised by the log_likelihood function.

BenjamenSimon/EpidemicR documentation built on March 23, 2020, 11:03 p.m.