Use the nCoV_simple dataset for the following questions.
In class, we used parametric bootstrap (with a Weibull model) to study the \(90th\) percentile of the incubation period. We now use the nonparametric bootstrap to study the \(90th\) percentile.
What is the \(90th\) percentile of the incubation period among patients in the dataset? Recall, in R, you can use the quantile function.
Obtain \(B=1000\) (nonparametric) bootstrap samples; record the \(90th\) percentile of each bootstrap sample. What is the SD of the \(90th\) percentile based on your bootstrap samples?
Compared to the median (we have estimated its SD in class), does the \(90th\) percentile have more or less variation?
Obtain a \(95\%\) confidence interval for the \(90th\) percentile of the incubation period.
# The 90th percentile has more variation than the median.# dquantile(bootresult, probs =c(0.025, 0.975))
2.5% 97.5%
5.500 9.104
Suppose we want to use nonparametric bootstrap to study the maximum incubation period.
What is the maximum incubation period among patients in the dataset?
Obtain \(B=1000\) bootstrap samples and construct a \(95\%\) confidence interval for the maximum incubation period.
Briefly explain why bootstrap does not work well for estimating the maximum incubation period.
Show solution
The maximum incubation period in the dataset is 11 days. The bootstrap confidence interval is 8.5 to 11 days, which underestimates uncertainty because bootstrap samples cannot produce a maximum greater than 11.
In this question, we use parametric bootstrap to obtain confidence intervals for the parameters of a log-normal model.
What is the plug-in distribution in this case?
Generate one bootstrap sample from the plug-in distribution and re-fit the log-normal model. What are the new parameter estimates?
Repeat (b) for 1000 times to obtain 1000 estimates for each of the log-normal model parameters. Construct \(99\%\) confidence intervals for each of the parameters.
Show solution
The plug-in distribution is a log-normal distribution with parameters meanlog = 1.209 and sdlog = 0.731.