我想测试一阶自相关corAR1()的校正是否可以显着提高我的模型拟合度,但是不知道该怎么做。
Pinheiro&Bates(2000)p。 242应当使用标准的方差分析功能执行似然比测试。但是,有人告诉我,从理论的角度来看,这将导致结果不准确,因为违反了卡方分布假设。仍然我无法获得有关如何在R中考虑这一点的信息。
因此,我想问问是否有人可以帮助我替代使用anova-LRT的替代品?非常感谢。
dataset and if prefered r-script for the two models with and without corAR1() can be retrieved here
##reduced model-specific data-set:
datafclr <-read.csv("datafclr.csv", header = TRUE, sep = ",", dec = ".", fill = TRUE)
##without correction for autocorrelation:
tim1 <- lme(fixed=EERTmn ~ male + female +
(male:time7c) + (female:time7c) +
(male:IERT_Cp) + (female:IERT_Cp) +
(male:IERT_Cp_Partner) + (female:IERT_Cp_Partner)-1,
control=list(maxIter=100000), data=datafclr,
random=~male + female -1|dyade, na.action=na.omit)
summary(tim1)
#with correction for autocorrelation of first order:
tim2 <- lme(fixed=EERTmn ~ male + female +
(male:time7c) + (female:time7c) +
(male:IERT_Cp) + (female:IERT_Cp) +
(male:IERT_Cp_Partner) + (female:IERT_Cp_Partner)-1,
control=list(maxIter=100000), data=datafclr,
random=~male + female -1|dyade, correlation=corAR1(), na.action=na.omit)
summary(tim2)
非常感谢!
最好,帕特里克