Description Usage Arguments Value References See Also Examples
dic.fit
fits a parametric accelerated failure time model to survival
data. It was developed with the application to estimating incubation periods of infectious diseases
in mind but is applicable to many general problems.
The data can be a mixture of doubly interval-censored, single
interval-censored or exact observations from a single univariate
distribution. Currently, three distributions are supported: log-normal,
gamma, and Weibull. (The Erlang distribution is supported in the
dic.fit.mcmc
function, which implements an MCMC version of this
code.) We use a consistent (par1, par2) notation for each distribution, they
map in the following manner:
Log-normal(meanlog=par1, sdlog=par2)
Gamma(shape=par1, scale=par2)
Weibull(shape=par1, scale=par2)
Standard errors of parameters can be computed using closed-form asymptotic
formulae or using a bootstrap routine for log-normal and gamma models.
Currently, bootstrap SEs are the only option for the gamma models, which do
not have a closed form for the percentiles. dic.fit()
calculates
asymptotic SEs by default, or whenever the n.boots
option is set to
0. To compute bootstrap SEs, just set n.boots
to be greater than
zero. dic.fit.mcmc
also allows for Markov Chain Monte Carlo
fitting of these three parametric models and Erlang models as well.
1 2 3 4 5 6 7 8 9 10 11 |
dat |
a matrix with columns named "EL", "ER", "SL", "SR", corresponding to the left (L) and right (R) endpoints of the windows of possible exposure (E) and symptom onset (S). Also, a "type" column must be specified and have entries with 0, 1, or 2, corresponding to doubly interval-censored, single interval-censored or exact observations, respectively. |
start.par2 |
starting value for 2nd parameter of desired distribution |
opt.method |
method used by optim |
par1.int |
the log-scale interval of possible median values (in the same units as the observations in dat). Narrowing this interval can help speed up convergence of the algorithm, but care must be taken so that possible values are not excluded or that the maximization does not return a value at an endpoint of this interval. |
par2.int |
the log-scale interval of possible dispersion values |
ptiles |
percentiles of interest |
dist |
what distribution to use to fit the data. Default "L" for log-normal. "G" for gamma, and "W" for Weibull. |
n.boots |
number of bootstrap resamples (0 means that asymptotic results are desired) |
... |
additional options passed to optim |
a cd.fit S4 object.
Reich NG et al. Statistics in Medicine. Estimating incubation periods with coarse data. 2009. https://pubmed.ncbi.nlm.nih.gov/19598148/
1 2 | data(fluA.inc.per)
dic.fit(fluA.inc.per, dist="L")
|
Computing Asymptotic Confidence Intervals
Coarse Data Model Parameter and Quantile Estimates:
est CIlow CIhigh StdErr
meanlog 0.380 0.306 0.454 0.037
sdlog 0.424 0.368 0.480 0.028
p5 0.728 0.639 0.816 0.045
p50 1.462 1.354 1.570 0.055
p95 2.936 2.598 3.274 0.171
p99 3.919 3.344 4.494 0.291
-2*Log Likelihood = 524.4
Note: dispersion parameter is exp(sdlog). In this case it is 1.528 (95% CI 1.442-1.614).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.