# Regression model with time-varying covariates and fixed y

I want to fit a logistic regression model for discriminating between two groups (Control and Cancer) and one of my covariates is measured in five different times (it's a curve with concentrations of a specific metabolite in blood over a 24h time-period). I also have other covariates that are fixed.

The first approach that comes to my mind when having repeated measures is mixed models, but since my response variable is fixed, I don't think this would be a good idea.

What would be the best approach for modeling this? My main objective is developing a predictive model to use it in the diagnosis of cancer based on the concentration curves over time and the time-fixed covariates.

• Do you know how they should change over time? For e.g. does the concentration decrease exponentially?
– mkt
Commented Apr 4, 2018 at 12:35
• We only know that concentration should decrease over time. Looking at the data doesn't reveal any obvious pattern (linear, exponential, etc.). Commented Apr 4, 2018 at 16:42

My suggestion is that you consider one of the following:
1. Use a logistic model in which you have each of the 5 measurement points as their own independent variable in the model: $$Y \sim X_1 + X_2 + X_3 + X_4 + X_5 + ···$$ 2. Use a logistic model in which you have the average and 4 of the deviation scores from that average: $$Y \sim \bar{X} + d_2 + d_3 + d_4 + d_5$$ where $d_i = X_i - \bar{X}$. You can't include all 5 deviation scores, but if you think some "spike" from the average may be indicative of something, this may be a reasonable approach.
3. Use some reasonable transformation of the variables within the model as the independent variables. For example, you may want to use the average $X$ for each person, the range of $X$ observed over the time, and maybe something like the count of values at or above some threshold. (The last one would dependent on the context and specific research questions.)

Hope this offers some small benefit.

I think that it could be useful to model the biomarker (log) concentration before using it as a predictor variable. Probably the best would be a Longitudinal mixed effect models.

Thereafter it could be possible to use specific pharmacokinetic parameters as predictors of disease status. For example a popular PK parameter is the AUC (Area Under the Curve of the concentration against time not to be confused with the AUC-ROC curve).

Finally using the baseline covariates and AUC you could build one of the many available binary classifiers: logistic regression, Naive Bayes or Support Vector Machine to name a few.

To end, you can evaluate the predictive performance of the classifier now yes using the AUC ROC curve.

I hope it helps,

In my opinion, it depends on what you expect to be the most informative covariate or feature in your prediction model.

As you said, the concentration of curves may be informative, so I suggest to build several models to understand which information about the concentration is informative and then compare the AUC or the accuracy of the models.

The models can be build extracting different parameters from the curves (e.g. kurtosis, area under the curve, some frequency parameters, curve slope) that catch the differences in the different curve trends and then training a model (e.g. Logistic Regression, SVM, LDA) using these features.

If you have enough data you can build a deep model that extracts these features directly from the curve you have recorded, but I don't think is this the case.

Hope this helps.

I would normally think the use of control group is usually to test whether the theorized effect is in fact due to the measurement. But since you described a logistic regression this way, I would probably go with including the level and the change in the measurement for the last 24 hours. That is,

$$Y \sim Z_k +X_{0} + \Delta X_1 + \Delta X_2 + \Delta X_3 + \Delta X_4 + \epsilon$$

where $Z_k$ is your other predictors, $X_0$ is your initial measurement, and $\Delta X$'s are the change with respect to the last measurement. This is slightly different than Gregg H's 2nd suggestion in that I put the measurement directly, not the mean of measurements. It is different than Gregg H's 1st suggestion in that I used the level variable once, not to complicate the inference of the level variables and to avoid possible near multicollinearity.

Another possibility is that if you have a theoretical curve on the supposed concentration levels, then you might choose to do a separate estimation to fit the time-varying values into the curve and include the estimated parameters of that fit in your logistic regression. Or as Gregg H suggested, you might choose to calculate deviations from the theoretical curve.

I guess which model to use exactly would depend on the field knowledge, such as the confidence in measurement levels (if the measurement has large error bands, than perhaps take a mean of all measurements and use only the mean), whether concentrations are taken on specific times of the day (if the measurement is not exactly periodic and the concentration is expected to change within the day, then perhaps take a mean). My first suggestion is more intuitive when, for instance, the changes are supposed to indicate some probability of cancer, and the exact level may or may not be important. Or as Gregg H suggested, it could be the deviations from a population, not the change themselves, which might be important.