# Do multiple observations per individual imply pseudo-replication in time-varying Cox proportional survival model (coxme in R)?

I’m running a survival analysis using a cox mixed-effect proportional hazard model with time-varying covariates (using package and function coxme in R).

My question is: does having multiple observations per individual constitute pseudo-replication?

One solution would be to make ‘individual’ a random effect. However, in my study many individuals (~50%) died during the first interval and were thus measured only once, so within-individual variation is limited to those individuals surviving multiple time periods (max 8 time periods in our study). Perhaps this doesn’t matter, as the model still converges?

See below example with 2 time-varying covariates (tvc1 & tvc2), 1 time invariant covariate (sex), and one random effect (randef). Model coxme is currently run without individual (id) as a random effect. As you see, some individuals have multiple rows of data (which allows one to include multiple measurements of covariates). I’ve seen several other examples online using a similar set-up, but no one has mentioned the pseudo replication problem.

df <- data.frame(id=c(1,1,1,1,2,3,3,3,4,4,5,5,5,6,7,8,8,9,10,10),
start=c(1,10,20,30,1,1,10,20,1,10,1,10,20,1,1,1,10,1,1,10),
stop=c(9,19,29,39,9,9,19,29,9,19,9,19,29,9,9,9,19,9,9,19),
event=c(0,0,0,1,1,0,0,1,0,1,0,0,1,1,1,0,1,1,0,1),
sex=c(1,1,1,1,2,2,2,2,1,1,2,2,2,1,2,1,1,2,2,2),
tvc1=c(rnorm(20,0,1)),
tvc2=c(rnorm(20,5,2)),
randef=c(rep(1,10),rep(2,10))
)
mod <- coxme(Surv(start,stop,event)~sex+tvc1+tvc2+(1|randef), data=df)
summary(mod)


'Does multiple observations per individual constitute pseudo-replication?'. Probably. However, as with most things, the full answer is 'it depends'. What it depends on is the levels you want to generalize to.

If you only want to generalize to observations from these same participants, then you don't have any issue - you can treat participants as a fixed effect. However, if you want to generalize to other (unobserved) participants, then you do want to include participants as a random effect (with random slopes for each of your non-nested experimental variables).

Do be aware that model convergence alone is not an indicator of a correct model. For the purposes of mixed effect models (outside of the domain of survival analysis), cf. Barr et al (2013), Random effects structure for confirmatory hypothesis testing: Keep it maximal. Those authors make a strong argument that rigorous control of the type I error rate requires a full modeling of the relevant random effects structure - and comment that it is relatively common in small sample size experimental studies that such models will fail to converge.

• Thanks @rpierce for the thoughtful answer. However, I still struggling with why the observation units would be 'individual' because the model structure does not include information about individuals (i.e. no id term). Rather the model tries to estimate the base hazard function and the impact of time-varying covariates. These covariates will almost certainly be correlated within individuals over time (e.g. some individuals will have consistently higher/lower values than others). So, is there something fundamental about a survival analysis that allows us to ignore this correlation? thanks! – TAM Jun 26 '17 at 10:36
• @TAM You know what, you're right. I'd gone back and forth on this answer and psyched myself out. I'll edit. – russellpierce Jun 26 '17 at 16:14