# Will random effect estimates give me an estimate for change through time?

I have a research question where I investigate the links between a continuous changing variable X (taken as a log of a variable) and mortality. This variable X is measured every three years and in my research question, I wanted to see if the increasing/decreasing nature of this variable (the fluctuations/changes) predict mortality.

I opted out against using the Cox Proportional Hazards Model with time-dependent covariates because of the complexities it carries and as it doesn't quite fit my research question. I want to produce a single measure of change in this variable in time for every participant (designated as sortnr below) and I tried that using the mixed models approach in R as:

model.1=lme(X~time,random=~1+time|sortnr,data=Y)


The output of the model gives me random effects for both the intercept and the variable time. Now, is it correct to consider the random effects for time variable is the individual change over time by in my dependent variable X? Or is it proper to think that the change in variable X in time is the fixed effects of time added with the random effects of time. I have also seen that there is a coef(model.1) function that gives a different set of values than the ranef and fixef function.

I am not sure how to produce this change estimate definitively and whether the approach I am attempting is viable. I am very new to mixed models analysis and still learning some of its theoretical underpinnings so I would really appreciate any help regarding this. Thank you!

• Since you are modeling time series data, you may wish to (1) test whether your data are stationary, and (2) if they are not, to select a good time series modeling approach to account for it. For an approachable introduction, see De Boef, S. and Keele, L. (2008). Taking time seriously. American Journal of Political Science, 52(1):184–200. Dec 26, 2017 at 17:41
• The consequences to the validity of inference for ignoring nonstationarity in one's data can be quite severe. Dec 26, 2017 at 17:46

The model you have fit is indeed a special case of a growth model. The random slopes will tell you about growth, or rate of change, of $X$ over time. You can lookup the code for coef.merMod to see how exactly the output is generated. Basically, it predicts the cluster-specific effects as constrained by the model statement. If you somehow extrapolated a fixed effects model, it would repeat the slope and intercept term for each cluster. Recall the cluster specific effects are calculated as the sum of predicted random and fixed effects.
However, I don't understand exactly how you will feed such output into a survival analysis without allowing for time varying covariates. In a survival analysis, you cannot "peer forward" in time and create calculated variables as baseline, time-invariant exposures. I don't see how the Cox model with time varying $X$ fails to answer your question, as you say, nor how complexity is any rationale to discredit a method.