Walid Crampton-Mawass
Ph.D. candidate in Evolutionary Biology
Population Genetics Laboratory
University of Qu?bec at Trois-Rivi?res
3351, boul. des Forges, C.P. 500
Trois-Rivi?res (Qu?bec) G9A 5H7
Telephone: 819-376-5011 poste 3384
On Tue, Mar 23, 2021 at 12:57 PM Abra?o de Barros Leite <abarrosib at gmail.com>
wrote:
> Unfortunately, I am able to have convergence in my model just with sample
> size = 200. This sample size is so bad?
>
> Thanks,
> Abra?o
>
> Em ter, 23 de mar de 2021 13:21, Abra?o de Barros Leite <
> abarrosib at gmail.com> escreveu:
>
>> Thanks, I will make these changes and monitor how the models will
>> converge.
>>
>> All the best,
>> Abra?o
>>
>> Em ter, 23 de mar de 2021 12:42, Walid Crampton-Mawass <
>> walidmawass10 at gmail.com> escreveu:
>>
>>> Hello,
>>>
>>> Indeed there is very high autocorrelation in your animal term. And your
>>> scale seems to be quite large given the estimates and HPDs. A good step
>>> would be to scale down your continuous variables to see if that helps with
>>> convergence in any way. Another possible practice is to drop one of the
>>> random terms in your model to see how that changes the behavior of your
>>> model. A side note, in your prior, there is no need to add n=0.002 to your
>>> residual term since you already fixed it to 1.
>>>
>>> Good luck
>>> --
>>> Walid Crampton-Mawass
>>> Ph.D. candidate in Evolutionary Biology
>>> Population Genetics Laboratory
>>> University of Qu?bec at Trois-Rivi?res
>>> 3351, boul. des Forges, C.P. 500
>>> Trois-Rivi?res (Qu?bec) G9A 5H7
>>> Telephone: 819-376-5011 poste 3384
>>>
>>>
>>> On Mon, Mar 22, 2021 at 3:09 PM Abra?o de Barros Leite <
>>> abarrosib at gmail.com> wrote:
>>>
>>>> Hello, this is my script, and my dataset has 235 species.
>>>>
>>>> prior3.1 <- list(G = list(G1 = list(nu=0.002, V=1),G2 = list(nu=0.002,
>>>> V=1)),#fatores de vari?ncias a priori#
>>>> R = list( V=1,nu=0.002, fix=1))
>>>> m1<-MCMCglmm(progofic~1+Dieta+trafic+log(massakg)+endg,data=databird,
>>>> family="categorical",pedigree=contree,random=~animal+measureID,verbose = F,
>>>> nitt=2500000,burnin=250000,thin=10000,prior =prior3.1)
>>>> summary(m1)
>>>> acf(m1$Sol[,1],lag.max =100)
>>>>
>>>> *Results:*
>>>> Iterations = 250001:2490001
>>>> Thinning interval = 10000
>>>> Sample size = 225
>>>>
>>>> DIC: 6.619977
>>>>
>>>> G-structure: ~animal
>>>>
>>>> post.mean l-95% CI u-95% CI eff.samp
>>>> animal 7713 999.2 15303 10.58
>>>>
>>>> ~measureID
>>>>
>>>> post.mean l-95% CI u-95% CI eff.samp
>>>> measureID 319.5 0.0005769 1505 81.04
>>>>
>>>> R-structure: ~units
>>>>
>>>> post.mean l-95% CI u-95% CI eff.samp
>>>> units 1 1 1 0
>>>>
>>>> Location effects: progofic ~ 1 + Dieta + trafic + log(massakg) + endg
>>>>
>>>> post.mean l-95% CI u-95% CI eff.samp pMCMC
>>>> (Intercept) -32.757 -127.914 59.857 152.759 0.4889
>>>> DietaInvertebrate -73.571 -153.500 -4.571 9.841 0.0356 *
>>>> DietaNectarivorous -156.649 -527.852 191.174 4.441 0.6489
>>>> DietaOmnivore -6.580 -43.869 33.693 83.293 0.7644
>>>> DietaVert -13.890 -87.780 73.738 62.163 0.8000
>>>> traficyes -1.761 -30.506 31.131 102.410 0.8711
>>>> log(massakg) 25.917 6.443 43.469 18.590 <0.004 **
>>>> endgEN -3.139 -42.611 37.907 25.394 0.8889
>>>> endgVU -35.510 -73.109 1.471 24.992 0.0444 *
>>>> ---
>>>> Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>>>> > acf(m1$Sol[,1],lag.max =100)
>>>> > autocorr(m1$VCV)
>>>> ,* , animal*
>>>> animal measureID units
>>>> Lag 0 1.00000000 -0.022820572 NaN
>>>> Lag 10000 0.80567811 -0.045602281 NaN
>>>> Lag 50000 0.58800623 0.037466483 NaN
>>>> Lag 1e+05 0.37539889 0.221289380 NaN
>>>> Lag 5e+05 -0.08870539 -0.005622699 NaN
>>>> ,* , measureID*
>>>> animal measureID units
>>>> Lag 0 -0.022820572 1.000000000 NaN
>>>> Lag 10000 -0.004848064 0.369835208 NaN
>>>> Lag 50000 -0.052249906 0.006497318 NaN
>>>> Lag 1e+05 -0.053667796 -0.001787120 NaN
>>>> Lag 5e+05 -0.015126358 -0.027780522 NaN
>>>> ,* , units*
>>>> animal measureID units
>>>> Lag 0 NaN NaN NaN
>>>> Lag 10000 NaN NaN NaN
>>>> Lag 50000 NaN NaN NaN
>>>> Lag 1e+05 NaN NaN NaN
>>>> Lag 5e+05 NaN NaN NaN
>>>>
>>>> Thanks,
>>>> Abra?o
>>>> On Mon, Mar 22, 2021 at 3:32 PM Walid Crampton-Mawass <
>>>> walidmawass10 at gmail.com> wrote:
>>>>
>>>>> Yes possibly, or the sample size is too small for the model structure
>>>>> you are attempting. It would help if you share your model structure and
>>>>> results of autocorr() to check if autocorrelation between chain iterations
>>>>> is high.
>>>>>
>>>>> Additionally, when replying in this thread, use the reply all option
>>>>> so our thread and discussion is included in the r-sig archives.
>>>>> --
>>>>> Walid Crampton-Mawass
>>>>> Ph.D. candidate in Evolutionary Biology
>>>>> Population Genetics Laboratory
>>>>> University of Qu?bec at Trois-Rivi?res
>>>>> 3351, boul. des Forges, C.P. 500
>>>>> Trois-Rivi?res (Qu?bec) G9A 5H7
>>>>> Telephone: 819-376-5011 poste 3384
>>>>>
>>>>>
>>>>> On Mon, Mar 22, 2021 at 2:14 PM Abra?o de Barros Leite <
>>>>> abarrosib at gmail.com> wrote:
>>>>>
>>>>>> Hello Walid, I used your thin, burnin, nitt values, the model arrived
>>>>>> sample size=1000, and there wasn't convergence still.
>>>>>> Do think if the problem is the priori values?
>>>>>>
>>>>>> Thanks,
>>>>>> Abra?o
>>>>>>
>>>>>>
>>>>>> Em seg, 22 de mar de 2021 14:30, Walid Crampton-Mawass <
>>>>>> walidmawass10 at gmail.com> escreveu:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> One way to improve the convergence of your phylogenetic model would
>>>>>>> be to increase the burn in iterations of the chain and take it into account
>>>>>>> in your total number of iterations. So in your case, I would set
>>>>>>> nitt=2500000, burnin= 500000 and nitt=2000, that way you would have a
>>>>>>> sample of 1000 iterations saved from the total chain iterations (of course
>>>>>>> you can increase the thin interval based on the sample size of saved
>>>>>>> iterations you want).
>>>>>>>
>>>>>>> Good luck
>>>>>>> --
>>>>>>> Walid Crampton-Mawass
>>>>>>> Ph.D. candidate in Evolutionary Biology
>>>>>>> Population Genetics Laboratory
>>>>>>> University of Qu?bec at Trois-Rivi?res
>>>>>>> 3351, boul. des Forges, C.P. 500
>>>>>>> Trois-Rivi?res (Qu?bec) G9A 5H7
>>>>>>> Telephone: 819-376-5011 poste 3384
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 22, 2021 at 11:24 AM Abra?o de Barros Leite <
>>>>>>> abarrosib at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello Mathew
>>>>>>>> My name is Abra?o, I saw your answer aboute MCMCGLMM sample size.
>>>>>>>> So, please can you help me?
>>>>>>>> I am working with relation between brain mass and nest birds in my
>>>>>>>> doctorate.
>>>>>>>> My dataset has 250 species, but in my analysis MCMCGLMM with
>>>>>>>> phylogenetic
>>>>>>>> control, I haven't convergence, with nitt=2000000, thin=3500,
>>>>>>>> burnin=4000.
>>>>>>>> Please, can you help me?
>>>>>>>> How I can to improve my convergence?
>>>>>>>> Sample size=100 in the end it's ok?
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> [[alternative HTML version deleted]]
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> R-sig-mixed-models at r-project.org mailing list
>>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>>>>>>
>>>>>>>
>>>>
>>>> --
>>>> Abra?o de Barros Leite
>>>> Universidade Federal de S?o Carlos (UFSCAR)
>>>> Programa de P?s-Gradua??o em Ecologia e Recursos Naturais- S?o Carlos
>>>> (PPGERN)
>>>>
>>>
[[alternative HTML version deleted]]