背景 实验:使用4种处理(N,L,M和ML)和3 rep / trt的CRD。因此共有12个跑步/试验/受试者。在第0、1、2、6、7、8、9、10和13天确定每次运行的浓度,结果总计9x12 = 108 obs /数据点。
所有trt和日期组合的箱线图,如下所示。
运行了以下模型。
gls不相关
conc.gls1 <-gls(Conc〜factor(Trt)*天, 数据=数据, method =“ REML”)
残差vs.拟合图和QQ图。
作为受试者的每次试验/运行均带有ar(1)的gls
conc.gls3 <-gls(Conc〜factor(Trt)* Day, 数据=数据, 权重= varIdent(形式=〜1 | factor(Trt)* factor(Day)), 相关= corAR1(form =〜Day | subject))
lme,其中天是随机因素
conc.lme <-lme(Conc〜factor(Trt)*天, 数据=数据, 随机=〜1 |天, 权重= varIdent(形式=〜1 |天))
残差vs.拟合图和QQ图
以天为平滑变量的游戏
conc.gam <-mgcv :: gam(Conc〜factor(Trt)+ s(Day,k = 6), data = data)
残差vs.拟合图和QQ图
这里是AIC
df AIC
conc.gls1 9.000000 3799.592
conc.gls2 45.000000 3731.522
conc.lme 18.000000 3533.088
conc.gam 9.936895 3998.234
All the models except the first one seem justified.
The lme model seems to be the best: residuals vs fitted, qq plot, AIC all look great. But is it justified to treat day as a random factor?
The gls2 seems to fit the experimental well, but the results were not satisfactory, probably due to the poor fit of the time series. Does anyone have a better way to model?
感谢任何评论/建议!