[R-sig-ME] individual variation in reaction norm

Simona Kralj Fiser simonakf at gmail.com
Tue Jul 26 16:53:05 CEST 2016


I wanted to analyse individual variance in reaction norm for activity in a
novel environment test. I measured ACTIVITY in trial 1 and then again on
the same individuals (ID) on trial2 (=trialN). I used below scripts and
compared their DICs. However, I am not even sure what is the difference
between models, and which tells me the variance in the reaction norm? In
one case DIC is even negative. I guess that's bad…Any hints?



E.g.



prior.1<-list(R=list(V=1, nu=0.002),G=list(G1=list(V=1, nu=0.002)))

*ma2rs<- MCMCglmm(ACTIVITY~ trialN, random=~idh(trialN):ID, data = F,
family="gaussian", prior = prior.1, nitt=530000,thin=5000,burnin=30000,
verbose = FALSE)*



summary(ma2rs)

Iterations = 30001:525001

 Thinning interval  = 5000

 Sample size  = 100



 DIC:
*84.24017 *



 G-structure:  ~us(trialN):ID



                   post.mean l-95% CI u-95% CI eff.samp

trialN:trialN.ID   0.02541 0.008237  0.04164      100



 R-structure:  ~units



      post.mean l-95% CI u-95% CI eff.samp

units    0.0862  0.06513   0.1306      100



 Location effects: ACTIVITY ~ trialN



            post.mean l-95% CI u-95% CI eff.samp pMCMC

(Intercept)   1.31808  1.16730  1.48222      100 <0.01 **

trialN       0.11417  0.01064  0.21595      100  0.02 *

---

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1



> posterior.mode(ma1rs$VCV)

trialN:trialN.ID              units

        0.02282208         0.08220128

> HPDinterval(ma1rs$VCV)

                         lower      upper

trialN:trialN.ID 0.008236589 0.04163621

units              0.065134787 0.13057164

attr(,"Probability")

[1] 0.95



*ma3rs<- MCMCglmm(ACTIVITY ~ trialN, random=~ID, data = F,
family="gaussian", prior = prior.1, nitt=530000,thin=5000,burnin=30000,
verbose = FALSE)*

summary(ma3rs)

Iterations = 30001:525001

 Thinning interval  = 5000

 Sample size  = 100



 DIC: *55.74573*



 G-structure:  ~ID



   post.mean l-95% CI u-95% CI eff.samp

ID   0.09563  0.03688   0.1353      100



 R-structure:  ~units



      post.mean l-95% CI u-95% CI eff.samp

units   0.06223  0.04318  0.08476    133.3



 Location effects: ACTIVITY ~ trialN



            post.mean l-95% CI u-95% CI eff.samp pMCMC

(Intercept)    1.3194   1.2170   1.4839      100 <0.01 **

trialN        0.1110   0.0329   0.1783      100  0.02 *

---

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> posterior.mode(ma3rs$VCV)

        ID      units

0.10238123 0.05860673

> HPDinterval(ma3rs$VCV)

           lower      upper

ID    0.03688181 0.13526359

units 0.04318352 0.08476018

attr(,"Probability")

[1] 0.95



*ma4rs<- MCMCglmm(ACTIVITY ~ trialN, random=~trialN:ID, data = F,
family="gaussian", prior = prior.1, nitt=530000,thin=5000,burnin=30000,
verbose = FALSE)*

summary(ma4rs)

Iterations = 30001:525001

 Thinning interval  = 5000

 Sample size  = 100



* DIC: -76.73263 *



 G-structure:  ~trialN:ID



           post.mean  l-95% CI u-95% CI eff.samp

trialN:ID     0.073 0.0004997   0.1634      100



 R-structure:  ~units



      post.mean  l-95% CI u-95% CI eff.samp

units   0.08064 0.0006196    0.174      100



 Location effects: ACTIVITY ~ trialN



            post.mean l-95% CI u-95% CI eff.samp pMCMC

(Intercept)   1.31570  1.11754  1.53055      100 <0.01 **

trialN       0.10979 -0.01834  0.25725      100  0.12

---

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> posterior.mode(ma4rs$VCV)

 trialN:ID       units

0.002223456 0.003016048

> HPDinterval(ma4rs$VCV)

                  lower     upper

trialN:ID 0.0004997280 0.1633640

units      0.0006195642 0.1739676

attr(,"Probability")

[1] 0.95


-- 
Thanks.
S

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list