I’ve been using Thomas Lumley’s excellent mitools package in R for applying Rubin’s rules for multiple imputation ever since I wrote the smcfcs package in R. Somebody recently asked me about how they could obtain p-values corresponding to the Rubin’s rules results calculated by the MIcombine function in mitools. In this short post I’ll give some R code to calculate these.
What can we infer from proportional hazards?
Colleagues and I recently wrote a letter to the editor regarding difficulties of interpreting period specific hazard ratios from randomised trials as representing solely changes in treatment effect over time, as discussed in a previous post. The authors whose paper we were writing about responded to our letter. One of their points was the following:
Note that in a randomized controlled trial, if the proportional hazards assumption holds and there are no unobserved confounders (i.e., the patient population is homogeneous and there is no differential treatment effect across different subpopulations), a HR generated by Cox regression with treatment alone as a single covariate does have a causal interpretation. The hazard functions in this case do not depend on any confounder.
It is fairly implausible in any setting that a patient’s hazard does not depend on any of their characteristics. Indeed it is because we often have some understanding of what these variables are that they are used in stratified randomisation schemes and in the statistical analysis of the trial’s data.
Imputation of covariates for Fine & Gray cumulative incidence modelling with competing risks
Someone recently asked me about using substantive model compatible imputation, as implemented in smcfcs in R, to impute missing covariates, followed by fitting Fine and Gray models for the cumulative incidence functions using the crr function in the cmprsk package.