# What kind of model is best suited for this type of data and research question?

I have data for hundreds of individuals over several (often tens) of years. My dependent variable is a binary event that may or may not have happened for each individual in some given year. The event can only happen once per individual. Independent variables include individual characteristics that do not vary over time (e.g., gender) and measures for each individual that vary over time (e.g., output of that person in year t).

Minimum viable example of my data for two individuals with far less observations per individual and considerably less independent variables than I truly have:

Event Year Individual Gender Output
0 2020 Person X Male 10
0 2021 Person X Male 15
1 2022 Person X Male 20
0 2023 Person X Male 15
... ... ... ... ...
0 2020 Person Y Female 12
1 2021 Person Y Female 21
0 2022 Person Y Female 23
0 2023 Person Y Female 28

My aim is to test whether each independent variable explain the occurence of the event. I would also like to keep the possibility to assess whether the fixed characteristics like gender could explain the event even when the time-varying measures are similar between individuals.

At this point, I am not sure which model to use. I was considering logistic regression, but the observations are probably not independent as there are several measurements across individuals. Other options that have come across thus far have been survival models and mixed-effects models, but I am not familiar with them, so I cannot properly judge whether these models would suit my problem better.

What model(s) should I consider given my data and objectives? I am happy to provide any further details if necessary.

This seems to be a classic case of a survival model with time-varying covariates where you are interested in the time between some reference time and the time of the event. If you only have annual data, that's probably best analyzed with a discrete-time survival model.

A discrete-time survival model can be implemented as a binomial regression model on a data set like yours with one row per time period per individual. You need to have a column for the time elapsed since the reference time. For example, if these are employees of a corporation, that might be the time since hire. Also, if the event can happen at most once per individual, then an individual doesn't provide data about event risk at times after the event. So no data rows should be included for an individual after the event time.

You then perform a binomial regression with the elapsed time included as a predictor, perhaps flexibly modeled with a regression spline. This page outlines the principles based on logistic regression, and provides some references. This web page has links to some classic presentations by Singer and Willett. A complementary log-log link (instead of a logit link) is more aligned with the Cox type of proportional hazard survival analysis, as described on this page and its links.

One warning: make sure that any predictors in your model are in fact predictors of the event. With this type of data, it's possible for a covariate's value during the time period of the event to be a result of the event's occurrence during the time period rather than a cause of the event. Think carefully about whether your data are at risk of that type of misinterpretation.

• Thanks for the thorough answer. It seems that you correctly understood the essence of the data. Nevertheless, here are some clarifications that may or may not affect your suggestions: 1) Data is about researchers, where most time-varying independent variables are measures of research output / accomplishments 2) Event is sort of a promotion or a prize. Most of all I want to understand what variables explain receiving that promotion / prize. Not so much the time between a reference date (say e.g., PhD completion year) and the event - albeit this could be the reference date if one is needed Commented Apr 27, 2023 at 16:28
• Regarding your warning, I do not believe that the occurence of the event would greatly affect the independent variables in the same time period, because the event is not that significant. Moreover, the link is clearly stronger and quite obvious in the other direction. However, I will consider this more carefully for sure. Given all of these clarifications, would your suggestions change in any way? You can ask me for more details if needed. Commented Apr 27, 2023 at 16:34
• @EulersNumber the advantage of treating this like a survival model is that you naturally take into account things like time since receiving a doctoral degree (if that's the type of researcher in question). The problem with either a binomial or a survival model is that they evaluate covariate values in place at the event time. Academic promotions or prizes depend on cumulative achievement. So you need some cumulative measure of "output" instead of year-by-year, however you choose to set up the model. With that caution, a discrete-time binomial survival model seems like a good choice.
– EdM
Commented Apr 27, 2023 at 19:21
• @EdM I Have arrived to bug you again with my new question stats.stackexchange.com/questions/614329/… Commented Apr 27, 2023 at 20:14
• @EdM Thank you for the response. I indeed have cumulative time-varying covariates, which represent cumulative research output, e.g., cumulative citations up to time t, the cumulative number of publications in top journals up to time t, etc. Most of my covariates are in fact cumulative in nature, which was not clear from my mock data. Given this, I suppose I am set to proceed with a discrete-time binomial survival model. Commented Apr 28, 2023 at 8:06