R Code from Chapter 8: Small Sample Methods
Jinko Graham, Brad McNeney, Robert Platt
This directory contains some of the R code used to produce the figures and analyses of the chapter “Small Sample Methods” in the book “Handbook of Statistical Methods for Case-Control Studies” published by Chapman and Hall.
There are four R scripts with the following correspondences to sections of the chapter:
intro.Rfor Section 8.1: IntroductionexactInf.Rfor Section 8.2: Exact Conditional InferenceapproxExact.Rfor Section 8.3: Approximate Exact Conditional Inferencepenalized.Rfor Section 8.5: Bias-reduced and Other Penalized Likelihood Approaches.
The R scripts read data from the Data directory and functions from the Functions directory. Figures generated by the R scripts are saved in the Figures directory. The scripts rely on the following R packages:
survivallogistfnleqslvcoxphfxtableelrm
You can install all of these with the following:
install.packages(c("survival","logistf","nleqslv","coxphf","xtable","elrm"))