cases_to_SIR.data.frame: Impute Recovered counts for the SIR model

Description Usage Arguments Value Examples

View source: R/impute-recovery-counts.R

Description

Impute Recovered counts for the SIR model

Usage

1
2
## S3 method for class 'data.frame'
cases_to_SIR(data, par, method = "chain-binomial")

Arguments

data

data frame with the following columns

t

time

confirmed

number of cumulative confirmed cases at time t in the group

N

population size, which is used as the number of susceptible (minus the initial infections)

par

named vector of parameters

method

Currently default is "chain-binomial". See details. More methods to come.

Value

the input data with the additional columns

X0

number of susceptible

X1

number of infectious

X2

number of recovered

Examples

1
2
3
4
5
  df <- data.frame(t = 0:4,
                    confirmed = c(0, 1, 3, 9, 9),
                    N = 10)
   out <- cases_to_SIR(data = df,
                       par = 1)

skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.