Description Usage Arguments Value

View source: R/sampleSizeSimulation.R

These functions simulate coarse incubation period data sets and analyze them. The goal is for these simulations to provide evidence for how much information a given dataset contains about a characteristic of the incubation period distribution.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
precision.simulation(N, med = 2, disp = 1.3,
percentile = 0.5, nsim = 100, exact.data = FALSE,
pct.type.A = 0.5, exp.win.dat = NULL, verb = FALSE)
precision.simulation.exact(N, med, disp, percentile,
nsim, verb)
precision.simulation.coarse(N, med, disp, percentile,
nsim, pct.type.A, exp.win.dat, verb)
generate.coarse.data(N, med, disp, pct.type.A,
exp.win.dat)
``` |

`N` |
Overall sample size for the datasets to be simulated. |

`med` |
Median for the assumed log normal distribution of the incubation periods. |

`disp` |
Dispersion for the assumed log normal distribution of the incubation periods. |

`percentile` |
Percentile of the incubation period distribution which we want to estimate. |

`nsim` |
Number of datasets to analyze in the simulation. |

`exact.data` |
Either TRUE/FALSE. Incidates whether the data generated should be coarsened at all. If TRUE, pct.type.A and exp.win.dat are ignored. |

`pct.type.A` |
Percent of the N observations that are assumed to be type A data. If N*pct.type.A is not an integer, it will be rounded to the nearest integer. |

`exp.win.dat` |
A vector of exposure window lengths. Defaults to the observed window lengths from Lessler et al. (see below). |

`verb` |
If TRUE, a message with the system time and iteration number will be printed ten times during the simulation run. |

The `precision.simulation`

functions return a matrix
with four columns and nsim rows. The "ests" column gives
the estimated percentiles for the incubation period
distribution. The "SE" column gives the standard error
for the estimate. The "conv" column is 1 if the doubly
interval-censored likelihood maximization converged.
Otherwise, it is 0. The "bias" column gives the
estimated percentile - true percentile. The
`generate.coarse.data`

function returns a matrix
with data suitable for analysis by the `dic.fit`

function.

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.