Learn R Programming

EpiLPS (version 1.3.0)

estimIncub: Estimation of the incubation density based on coarse data

Description

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.

Usage

estimIncub(x, K = 10, niter = 1000, tmax = max(x), tgridlen = 500, verbose = FALSE)

Value

A list of class incubestim containing summary values for the estimated incubation density.

Arguments

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 x.

tgridlen

The number of grid points on which to evaluate the density.

verbose

Should a message be printed? Default is FALSE.

Author

Oswaldo Gressani oswaldo_gressani@hotmail.fr

Examples

Run this code
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)

Run the code above in your browser using DataLab