Learn R Programming

epifitter (version 0.3.0)

fit_lin: Fits epidemic models using data linearization

Description

Fits epidemic models (Exponential, Monomolecular, Logistic and Gompertz) to data using data linearization

Usage

fit_lin(time,y)

Arguments

time

Numeric vector which refers to the time steps in the epidemics

y

Numeric vector which refers to the disease intensity

Examples

Run this code
# NOT RUN {
set.seed(1)
epi1 <- sim_logistic(N = 30,
                     y0 = 0.01,
                     dt = 5,
                     r = 0.3,
                     alpha = 0.2,
                     n = 4)
data = data.frame(time =  epi1[,2], y = epi1[,4])
fit_lin( time = data$time, y =  data$y)

# }

Run the code above in your browser using DataLab