Multilevel logistic regression with a spatial power correlated error structure?

150 views
Skip to first unread message

Dennis Rünger

unread,
Feb 26, 2018, 3:52:56 PM2/26/18
to brms-users
Hi,

My question, in brief, is: Is it possible to specify a spatial power correlated error structure in a multilevel logistic regression model with brms?

Some context: I'm analyzing data from a study with a variable-interval intensive longitudinal design. For 8 weeks, participants were asked five times a day (at random timepoints) whether they craved a drug (yes/no). At the most basic level, I want to know whether the likelihood of craving changed across time.

From what I've read "the standard first-order autoregessive AR(1) error structure is inappropriate in variable-interval longitudinal designs." (Bolger & Laurencau, 2011, p. 92) and that a spatial power structure is needed for unequal time intervals.

In my line of research, people seem to rely on SAS Proc MIXED a lot, specifying:
REPEATED /SUBJECT=id TYPE=sp(pow)(time)

Essentially, I'm looking for the same in R/brms.

However, looking at cor_brms, I don't see an option for a spatial covariance structure.

Thanks a lot!
Dennis

Paul Buerkner

unread,
Feb 26, 2018, 4:49:11 PM2/26/18
to Dennis Rünger, brms-users
I am a little bit confused. Do you mean continuous-time autocorrelation? Spatal autocorrelations seems inappropriate for me to apply to time-series since the former is symmetric (A affects B in the same way as B affects A), while for time-series only the former time points influence the latter, but not the other way round.

Even for variable-interval structures, AR(1) is often an OK approximation, but of course it is far from optimal. You may also consider using a spline, i.e. add s(time) to your model formula. This usually works quite nicely as well.


drueng...@gmail.com

unread,
Feb 26, 2018, 5:46:53 PM2/26/18
to brms-users
Thanks for your reply, Paul. Yes, I'm looking for a way to account for continuous-time autocorrelation for the residuals, and I gleaned from several sources that the way to do this is to use a spatial power structure. For example, it is stated here that ...

When time intervals are not evenly spaced, a covariance structure equivalent to the AR(1) is the spatial power (SP(POW)). The concept is the same as the AR(1) but instead of raising the correlation to powers of 1, 2,, 3, … , the correlation coefficient is raised to a power that is actual difference in times (e.g. |t1t2| for the correlation between time 1 and time 2). This method requires having a quantitative expression of the times in the data so that it can be specified for calculation of the exponents in the SP(POW) structure. If an analysis is run wherein the repeated measures are equally spaced in time, the AR(1) and SP(POW) structures yield identical results.

I'm also relying heavily on the chapter by Schwartz and Stone (2007; Google Books link) on The Analysis of Real-Time Momentary Data who use the spatial power structure in their SAS Proc MIXED code (documentation of Proc MIXED). (As a matter of fact, it's probably the Schwartz-and-Stone analysis blueprint that other people have taken up as well).

Maybe it's just a terminological issue, as I found a post on CrossValidated suggesting to use corCAR1()in the context of a gls model. I've seen corCAR1() used in a linear mixed-effects model, but not in a generalized lme model, though. 

Thanks for pointing me to splines which I have never used. I do think that I need to address continuous -time autocorrelation because a participant's drug craving is likely to be more similar when assessed a few hours apart during the same day compared to when it's measured in the evening and then again in the morning of the following day.

Paul Buerkner

unread,
Feb 26, 2018, 6:00:17 PM2/26/18
to drueng...@gmail.com, brms-users
I see. That makes sense. The problem with both AR and continous AR is that outside of linear models, their definition / implementation is not straight forward. However, the same problem holds for the power AR as well, if I am not mistaken, since AR is just a special case of power AR with two consequtive time points having a difference of one. It may be worth implemting power AR in brms (feel free to open an issue on github), but it is unlikely to work with logistic regression anytime soon.

Within the brms framework, I think your best shots are spline, ~ s(time), and Gaussian processes, ~ gp(time), although the latter requires much more time to fit.

--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.
To post to this group, send email to brms-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/2986c734-bf9f-4d60-8d7b-443c59e77b67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages