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 [ (R_i ^ I_j) - (I_i) ^ (I_j) ] for all i and j.

Usage

1
interval_intersect(inf_times, rem_times, infected_inds)

Arguments

interval_i

Is the matrix cbind(t_inf, t_rem)[infected, ]. This is a 2 column matrix of the infection ] and removal times for the infected individuals.

interval_j

Is the matrix cbind(0, t_inf). This is a 2 column matrix of 0s in the first column and the infection times in the second.

Value

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

Examples

1
This function is utilised by the log_likelihood function.

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