Comparing Cox PH regression models with random effect
When to use:
Model comparison serves to choose the set of independent variables, as in comparing Cox PH regression models: we compare a full model with a reduced model, or use automatic selection. The random effect (gamma frailty for the indicated grouping variable) is shared by all compared models – in each of them the variance \(\theta\) is re-estimated, but the group structure remains the same. Selection concerns the independent variables only; whether the random effect is needed is decided by the LR test \(\theta=0\) in the Cox regression with random effect report.
Definitions of measures
Models are compared on the basis of the integrated log-likelihood, the information criteria AIC, AICc, BIC (the smaller, the better) and the likelihood ratio test for nested models: \(2(\ell_{full}-\ell_{reduced})\) follows a \(\chi^2\) distribution with degrees of freedom equal to the number of removed variables.
How to set up the analysis
Statistics \(\to\) Mixed models \(\to\) Cox PH regression with random effect – comparing models.

We indicate the survival time, the censoring variable with the Complete value, the variables of the full and reduced models (or the automatic selection criterion) and the Grouping variable (ID), shared by all models.
Results and interpretation
The report contains a fit table of the compared models (integrated log-likelihood, AIC, AICc, BIC, \(\theta\) of each model) with the LR test between them, and the coefficient tables of the models with conditional hazard ratios.
Example 1. continuation of example 1 (kidneyCatheter.pqs file)
In the model of the risk of catheter infection, age turned out to be non-significant. We compare the full model (age and sex) with the reduced model (sex only); the patient random effect in both.

Full model: log-likelihood \(-182.05\), AIC \(=370.11\); model with sex only: \(-182.16\), AIC \(=368.33\). LR test: \(\chi^2=0.22\), \(df=1\), \(p=0.64\) – removing age does not worsen the fit, and the AIC of the simpler model is lower. We choose the model with sex only: \(HR=0.216\) (95% CI: 0.091–0.512), \(\theta=0.388\). For contrast, the model with age only has a log-likelihood of \(-187.86\) and AIC \(=379.72\), hardly better than the model without variables (\(-187.95\)): age alone contributes nothing.
PQStat