Learn R Programming

EpiLPS (version 1.3.0)

plot.incubestim: Plot the estimated incubation distribution

Description

This routine can be used to plot the estimated incubation distribution based on an object of class incubestim.

Usage

# S3 method for incubestim
plot(x, type = c("pdf", "cdf", "incubwin"), ...)

Value

  • The probability density function of the estimated incubation period with 95% credible envelope.

  • The cumulative distribution function of the estimated incubation period with 95% credible envelope.

  • A bar plot showing the width of the incubation windows.

Arguments

x

An object of class incubestim.

type

The type of plot. Default is "pdf" for the plot of the density function. Setting it to "cdf" returns the cumulative distribution function and "incubwin" gives a bar plot showing the width of the incubation window.

...

Further arguments to be passed to plot.

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)
plot(incubfit)

Run the code above in your browser using DataLab