最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

r - How to deal with autocorrelation in piecewise growth curve model (linear mixed effect approach) - Stack Overflow

programmeradmin1浏览0评论

I'm running a piecewise growth curve model in R using nlme. I have nested data with seven repeated measures (saliva cortisol levels) for each of my subjects (no missing data). I have a "classic" cortisol response (see image)

I observe an expected increase from t1 to t4 and a decrease from t4 to t7. my main aim is to check whether the slope from t1-t4 is different between the two groups. I specify the model using the following code (score = cortisol level):

model = lme(score ~ time1 + time2 + time1 * group,
            random = ~ 1 + time1 + time2 + time1 * group | subject,
            data = mydata, 
            control = lmeControl(opt = "optim", maxIter = 100, msMaxIter = 100))

time1 and time2 are dummy variables which are coded so that they represent slope 1 from baseline to peak i.e. time1 = -3, -2, -1, 0, 0, 0, 0 and slope 2 from peak to last measure i.e. time 2 = 0, 0, 0, 0, 1, 2, 3). group is a dummy coded variable representing the two groups I'm comparing (1, 2).

The model converges, shows decently normal residual distribution, no clear indications of heteroskedacticity. however, when using plot(ACF(mymodel)) to check for autocorrelation i observe a problem at lag2 (see image).

I have several related questions:

  1. How can i know if autocorrelation at lag2 is truly a problem? i know that using acf() from the stats package also gives me confidence intervals. however, acf() does not seem to work properly for my nested data, because it outputs 26 lags (which does not make sense because I only have 7 repeated measures per participant). is it also possible to get CIs using ACF from nlme?

  2. if I do have a problem with autocorrelation at lag2, how can i deal with it properly? as far as i am concerned using correlation = corAR1(form = ~ timenum | subject) in my model only takes care of autocorrelation at lag1. if i do that, the plot still shows autocorrelation at lag2. how can i properly deal with lag2 autocorrelation?

  3. What are the practical implications of this violation? I am basically only interested in my fixed interaction effect of time1*group. the effect is not significant (also if i try other analysis strategies, e.g. by comparing difference scores of t4-t1 in both groups). is there a chance that not taking care of the autocorrelation leads to an increased risk of type II errors?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论