epilike {EpiILM} | R Documentation |
Calculates the log likelihood for the specified individual level model and data set
epilike (object, tmin = NULL, tmax, sus.par, trans.par = NULL,
beta = NULL, spark = NULL, Sformula = NULL, Tformula = NULL)
object |
An object of class |
tmin |
The first time point at which data is observed, default value is one. |
tmax |
The last time point at which data is observed. |
sus.par |
Susceptibility parameter(>0). |
trans.par |
Transmissibility parameter(>0). |
beta |
Spatial parameter(s) (>0) or network parameter (s) (>0) if contact network is used. |
spark |
Sparks parameter(>=0), representing infections unexplained by other parts of the model or infections coming in from outside the observed population, default value is zero. |
Sformula |
An object of class formula. See formula. Individual-level covariate information associated with susceptibility can be passed through this argument. An expression of the form |
Tformula |
An object of class formula. See formula. Individual-level covariate information associated with transmissibility can be passed through this argument. An expression of the form |
Returns the value of the log-likelihood function.
Deardon R, Brooks, S. P., Grenfell, B. T., Keeling, M. J., Tildesley, M. J., Savill, N. J., Shaw, D. J., Woolhouse, M. E. (2010). Inference for individual level models of infectious diseases in large populations. Statistica Sinica, 20, 239-261.
## Example 1: spatial SI model
# generate 100 individuals
x <- runif(100, 0, 10)
y <- runif(100, 0, 10)
covariate <- runif(100, 0, 2)
out1 <- epidata(type = "SI", n = 100, Sformula = ~covariate, tmax = 15,
sus.par = c(0.1, 0.3), beta = 5.0, x = x, y = y)
epilike(out1, tmax = 15,
sus.par = c(0.1, 0.3), beta = 5, Sformula = ~covariate)
## Example 2: spatial SIR model
# generate infectious period (=3) for 100 individuals
lambda <- rep(3, 100)
out2 <- epidata(type = "SIR", n = 100, tmax = 15, sus.par =0.3, beta = 5.0,
infperiod = lambda, x = x, y = y)
epilike(out2,
tmax = 15, sus.par = 0.3, beta = 5.0)