Alternative to GLM with non-independant observation

I would like to perform a regression to study association between 3 categorical variables and a presence/absence response variable. I was planning on using a GLM. However, my observation unit being minutes within hours-long recording sessions, the assumption for independency of observation is not met (The presence/absence in a given minute is likely to influence the following minute). Moreover, my recording sessions being scattered in time, I don't have a full time series. Would it be interesting or completly out of scope to use a GLMM with recording session or hour as random effect ?

Would anyone have any suggestion of a statistical test I could apply ?

Thank you very much for your help!

I think we need to know more about your analytical question in order to properly give advice; the first thing that I realized is that I don't believe I fully understand your data; You say that you plan on using a GLM to study the relationship between three categorical variables and a binary outcome variable, but then go on to imply that there will be at least one additional (continuous) variable in your regression: time. You also imply that the value of the outcome variable persists from measurement to measurement despite having taken scattered measurements.

Is this a somewhat accurate (albeit pretend) depiction of your data?

|---------|-----------|----|-------------|-------------|-------------|-------|
|Condition|Observation|Time|Categorical 1|Categorical 2|Categorical 3|Outcome|
|---------|-----------|----|-------------|-------------|-------------|-------|
|A        | 1         | 0  |    x        |     y       |     z       |  0    |
|---------|-----------|----|-------------|-------------|-------------|-------|
|A        | 2         | 10 |    x        |     y       |     z       |  0    |
|---------|-----------|----|-------------|-------------|-------------|-------|
|A        | 3         | 22 |    x        |     y       |     z       |  1    |
|---------|-----------|----|-------------|-------------|-------------|-------|
|A        | 4         | 37 |    x        |     y       |     z       |  1    |
|---------|-----------|----|-------------|-------------|-------------|-------|
|B        | 1         | 0  |    a        |     b       |     c       |  0    |
|---------|-----------|----|-------------|-------------|-------------|-------|
|B        | 2         | 28 |    a        |     b       |     c       |  0    |
|---------|-----------|----|-------------|-------------|-------------|-------|
|B        | 3         | 57 |    a        |     b       |     c       |  1    |
|---------|-----------|----|-------------|-------------|-------------|-------|


Assuming the above table looks kinda like your data, what are you trying to find, as a researcher? The effect of categoricals 1, 2, and 3 on the outcome status? The effect of time on outcome status? Differences between the time at which the outcome status changes from 0 to 1, between conditions?

Depending on what you are trying to determine, a GLM may or may not be a good approach here. There are a number of questions related to your data that are necessary in order to go further here. One that leaps to mind is: Is the recorded time at which the outcome switches from 0 to 1 (as in observation 3 of condition A, above) the actual time at which the change occurred, or is it simply the first measurement at which the change was detected? This will tell you whether or not your data are censored, which will be a key feature of the strategy you use.

In short, we need more information about your data and what you want to learn from your data. There is no one-size-fits-all tool that "matches" to the type of data you seem to have (or any data, for that matter).

• Thank you very much for your answer ! I will try to be more precise. So I have recordings that lasts for several hours and that were collected across several day/month. I don't have every day of every month, and the sessions are not same duration, this is why I consider my time series uncomplete. However, for each recording (of several hours) I have every minute inside within the session, following each other so several data points very close in time. May 6, 2019 at 19:00
• Basically I have a line in my table for every minute recorded with an exact time year/month/day/hour/minute and then 3 categorical variables and a binary outcome. The representation you did is accurate, unless sometime times will be very close to each other (every minute in a session), if that make sense. What I am trying to test is the effect of the three variables on the presence/absence outcome, which would be in this case environmental parameters effect on the detection of a species. May 6, 2019 at 19:00
• I am not interested by the effect of time in that case, just worried that it might influence the model. Hope it brought some clarification, don't hesitate if you need more details and thanks again for your help ! May 6, 2019 at 19:00
• Thanks for the additional detail. It sounds like you may have some experimental design issues related to your outcome. The core issue--like you said-- is that your observations are dependent on one another through time. What this means for your study is that even though you took many measurements, your "effective" sample size is much smaller. May 8, 2019 at 18:16
• For example, suppose your variables are {high/medium/low} cloud cover, {yes/no} rain, and {high/medium/low} temperature, and the outcome variable is the presence/absence of some species of frog. A measurement at 09:00 shows high cloud cover, rain, and high temp, and the frog is present. Another measurement at 09:01 shows the same. That second measurement is meaningless--it is still hot/rainy/cloudy, and the frog is still there; not because temperature/rain/clouds have anything to do with frogs, but because the environment doesn't have the opportunity to "reset" before being observed again. May 8, 2019 at 18:18