使用gls,lme和gam拟合重复的单因素实验

时间:2018-10-19 20:30:56

标签: glsl lme4 gam

背景 实验:使用4种处理(N,L,M和ML)和3 rep / trt的CRD。因此共有12个跑步/试验/受试者。在第0、1、2、6、7、8、9、10和13天确定每次运行的浓度,结果总计9x12 = 108 obs /数据点。

这是数据图。 enter image description here

所有trt和日期组合的箱线图,如下所示。

enter image description here

运行了以下模型。

  1. gls不相关

    conc.gls1 <-gls(Conc〜factor(Trt)*天,             数据=数据,             method =“ REML”)

残差vs.拟合图和QQ图。

enter image description here

enter image description here

  1. 作为受试者的每次试验/运行均带有ar(1)的gls

    conc.gls3 <-gls(Conc〜factor(Trt)* Day,             数据=数据,             权重= varIdent(形式=〜1 | factor(Trt)* factor(Day)),             相关= corAR1(form =〜Day | subject))

残差vs.拟合图和QQ图。 enter image description here

enter image description here

  1. lme,其中天是随机因素

    conc.lme <-lme(Conc〜factor(Trt)*天,                 数据=数据,                 随机=〜1 |天,                 权重= varIdent(形式=〜1 |天))

残差vs.拟合图和QQ图

enter image description here

enter image description here

  1. 以天为平滑变量的游戏

    conc.gam <-mgcv :: gam(Conc〜factor(Trt)+ s(Day,k = 6),                  data = data)

残差vs.拟合图和QQ图

enter image description here

enter image description here

这里是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?

感谢任何评论/建议!

0 个答案:

没有答案