Description Usage Arguments References Examples

Calculates the log likelihood for the specified individual level model and data set

1 2 3 |

`type` |
Type of compartment framework, with the choice of "SI" for Susceptible-Infectious diseases and "SIR" for Susceptible-Infectious-Removed |

`x` |
X coordinates of individuals |

`y` |
Y coordinates of individuals |

`inftime` |
Infection times |

`infperiod` |
Length of infectious period for each individual |

`tmin` |
The first time point at which data is observed, default value is one |

`tmax` |
The last time point at which data is observed |

`alpha` |
Susceptibility parameter(>0) |

`beta` |
Spatial parameter(s) (>0) or network parameter (s) (>0) if contact 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 passable through this argument. An expression of the form |

`contact` |
Contact network matrix (matrices) |

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
## Example 1: spatial SI model
# generate 100 individuals
## Not run:
x <- runif(100, 0, 10)
y <- runif(100, 0, 10)
covariate <- runif(100, 0, 2)
out <- epidata(type = "SI", n = 100, Sformula = ~covariate, tmax = 15,
alpha = c(0.1, 0.3), beta = 5.0, x = x, y = y)
epilike(type = "SI", x = x, y = y, inftime = out$inftime, tmax = 15,
alpha = c(0.1, 0.3), beta = 5, Sformula = ~covariate)
## End(Not run)
## Example 2: spatial SIR model
# generate infectious period (=3) for 100 individuals
## Not run:
lambda <- rep(3, 100)
out <- epidata(type = "SIR", n = 100, tmax = 15, alpha =0.3, beta = 5.0,
infperiod = lambda, x = x, y = y)
epilike(type = "SIR", x = x, y = y, infperiod = lambda, inftime = out$inftime,
tmax = 15, alpha = 0.3, beta = 5.0)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.