  In Cox regression it is sometimes of interest to study time-varying effects
(TVE) of exposures and to test the proportional hazards assumption. TVEs can be
investigated with log hazard ratios modelled as a function of time. Missing
data on exposures are common and multiple imputation (MI) is a popular approach
to handling this, to avoid the potential bias and loss of efficiency resulting
from a 'complete-case' analysis. Two MI methods have been proposed for when the
substantive model is a Cox proportional hazards regression: an approximate
method (White and Royston, Statist. Med. 2009;28:1982-98) and a
substantive-model-compatible method (Bartlett et al., SMMR 2015;24:462-87). At
present, neither method accommodates TVEs of exposures. We extend them to do so
for a general form for the TVEs and give specific details for TVEs modelled
using restricted cubic splines. Simulation studies assess the performance of
the methods under several underlying shapes for TVEs. Our proposed methods give
approximately unbiased TVE estimates for binary exposures with missing data,
but for continuous exposures the substantive-model-compatible method performs
better. The methods also give approximately correct type I errors in the test
for proportional hazards when there is no TVE, and gain power to detect TVEs
relative to complete-case analysis. Ignoring TVEs at the imputation stage
results in biased TVE estimates, incorrect type I errors and substantial loss
of power in detecting TVEs. We also propose a multivariable TVE model selection
algorithm. The methods are illustrated using data from the Rotterdam Breast
Cancer Study. Example R code is provided.
