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.R
for Section 8.1: IntroductionexactInf.R
for Section 8.2: Exact Conditional InferenceapproxExact.R
for Section 8.3: Approximate Exact Conditional Inferencepenalized.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:
survival
logistf
nleqslv
coxphf
xtable
elrm
You can install all of these with the following:
install.packages(c("survival","logistf","nleqslv","coxphf","xtable","elrm"))