estimIncub {EpiLPS} | R Documentation |
This function computes an estimate of the incubation density based on coarse data constructed from symptom onset times and exposure windows. It uses the Laplacian-P-splines methodology with a Langevinized Gibbs algorithm to sample from the posterior distribution.
estimIncub(x, K = 10, niter = 1000, tmax = max(x), tgridlen = 500, verbose = FALSE)
x |
A data frame with the lower and upper bound of incubation interval. |
K |
Number of B-splines in the basis. |
niter |
The number of MCMC samples. |
tmax |
The upper bound for the B-spline basis. Default is the largest
data point in |
tgridlen |
The number of grid points on which to evaluate the density. |
verbose |
Should a message be printed? Default is FALSE. |
A list of class incubestim
containing summary values for
the estimated incubation density.
Oswaldo Gressani oswaldo_gressani@hotmail.fr
set.seed(123)
simdat <- incubsim(n = 30, tmax = 20) # Simulate incubation data
data <- simdat$Dobsincub # Incubation bounds
incubfit <- estimIncub(x = data, niter = 500, tmax = 20, verbose = TRUE)