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:

  1. intro.R for Section 8.1: Introduction
  2. exactInf.R for Section 8.2: Exact Conditional Inference
  3. approxExact.R for Section 8.3: Approximate Exact Conditional Inference
  4. penalized.R for 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:

You can install all of these with the following:

install.packages(c("survival","logistf","nleqslv","coxphf","xtable","elrm"))