The rats data set in the survival package in R can be loaded by typing
“data(rats)”. It contains data on 300 rats—3 selected from each of 100 litters—that were followed for tumor incidence. The variable time is the follow-up times and the variable status is the event indicator.
- How many rats had tumors? What was the total rat-time contributed by all the animals? What was the incidence rate for tumors?
- Calculate a Wald 95% confidence interval for the true incidence rate λ
(which is also the exponential rate parameter and hazard).
- Calculate a log-transformed 95% confidence interval for λ.
- Use the function survreg to fit an exponential distribution and calcu- late the 95% confidence interval for λ. Does it agree with the Wald or log-transformed confidence intervals?
- Fit a Weibull distribution and get point estimates and 95% confidence intervals for the rate and shape parameters. Is the exponential distri- bution a good model for this data?
************** THIS PROBLEM MUST BE DONE IN THE “R” OR “R” STUDIO SOFTWARE, NOT BY HAND!!!!!********** THANK YOU!