Dear everyone, I have a comparative phylogenetic model with a binary response variable, 5 binary explanatory variables as fixed effects and the phylogeny as a random effect. The issue I have is that with a nitt=300,000,000, I check the heidel.diag(mcmc.list(model$Sol)) and the plot(model) and the model does not converge. All the variables pass the Stationarity test but 2 of them fail the Halfwidth test. The same 2 variables also have bad trace plots. I wonder if changing the priors will improve the convergence.Currently I use these priors: prior<-list(R=list(V=1, fix=1),G=list(G1=list(V=1, nu=1000, alpha.mu=0, alpha.V=1))) As you can see, I am using the default priors for the fixed effects. Should I change them, due to the binary nature of my fixed effects? What's the best priors for binary fixed effects? I will be immensely grateful if someone could help, as this issue's been bothering me for some time now. Kind regards, Yannis Dimopoulos PhD Student - The University of Hull
Setting priors for binary fixed effects
4 messages · Yannis Dim., Pierre de Villemereuil
Dear Yannis,
I have a comparative phylogenetic model with a binary response variable, 5 binary explanatory variables as fixed effects and the phylogeny as a random effect
Which family are you using? In my experience, the family "threshold" tend to yield the best results in terms of MCMC mixing in MCMCglmm.
All the variables pass the Stationarity test but 2 of them fail the Halfwidth test.
The Halfwidth test is not a test of convergence. It tests whether the sampling was "large enough", but in my experience, it's not a very robust test and I tend to rely on effective sample size to evaluate whether the MCMC was long enough or not. So, if you do not see trends in your traceplots, I would say that convergence is not a problem here.
Should I change them, due to the binary nature of my fixed effects? What's the best priors for binary fixed effects?
More informative priors for the fixed effect can help the mixing of the MCMC (at the cost of possible underestimation and issues with CI coverage if the priors are too informative), but as I said above, I'm unsure whether there is a problem here. Hope this helps, Pierre. Le mardi 8 septembre 2020, 08:48:01 CEST Yannis Dim. a ?crit :
Dear everyone, I have a comparative phylogenetic model with a binary response variable, 5 binary explanatory variables as fixed effects and the phylogeny as a random effect. The issue I have is that with a nitt=300,000,000, I check the heidel.diag(mcmc.list(model$Sol)) and the plot(model) and the model does not converge. All the variables pass the Stationarity test but 2 of them fail the Halfwidth test. The same 2 variables also have bad trace plots. I wonder if changing the priors will improve the convergence.Currently I use these priors: prior<-list(R=list(V=1, fix=1),G=list(G1=list(V=1, nu=1000, alpha.mu=0, alpha.V=1))) As you can see, I am using the default priors for the fixed effects. Should I change them, due to the binary nature of my fixed effects? What's the best priors for binary fixed effects? I will be immensely grateful if someone could help, as this issue's been bothering me for some time now. Kind regards, Yannis Dimopoulos PhD Student - The University of Hull [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Dear Pierre, Thank you very much for your reply. I was using family="categorical", but I will try your suggestion and I will try family="threshold". Thank you for explaining Halfwidth test to me. So I should only check the traceplots to check the convergence? Kind regards, Yannis ???? ???, 8 ??? 2020 ???? 4:40 ?.?., ?/? Pierre de Villemereuil < pierre.devillemereuil at ephe.psl.eu> ??????:
Dear Yannis,
I have a comparative phylogenetic model with a binary response variable,
5
binary explanatory variables as fixed effects and the phylogeny as a
random
effect
Which family are you using? In my experience, the family "threshold" tend to yield the best results in terms of MCMC mixing in MCMCglmm.
All the variables pass the Stationarity test but 2 of them fail the
Halfwidth test. The Halfwidth test is not a test of convergence. It tests whether the sampling was "large enough", but in my experience, it's not a very robust test and I tend to rely on effective sample size to evaluate whether the MCMC was long enough or not. So, if you do not see trends in your traceplots, I would say that convergence is not a problem here.
Should I change them, due to the binary nature of my fixed effects?
What's
the best priors for binary fixed effects?
More informative priors for the fixed effect can help the mixing of the MCMC (at the cost of possible underestimation and issues with CI coverage if the priors are too informative), but as I said above, I'm unsure whether there is a problem here. Hope this helps, Pierre. Le mardi 8 septembre 2020, 08:48:01 CEST Yannis Dim. a ?crit :
Dear everyone, I have a comparative phylogenetic model with a binary response variable,
5
binary explanatory variables as fixed effects and the phylogeny as a
random
effect. The issue I have is that with a nitt=300,000,000, I check the heidel.diag(mcmc.list(model$Sol)) and the plot(model) and the model does not converge. All the variables pass the Stationarity test but 2 of them fail the Halfwidth test. The same 2 variables also have bad trace plots. I wonder if changing the priors will improve the convergence.Currently I use these priors: prior<-list(R=list(V=1, fix=1),G=list(G1=list(V=1, nu=1000, alpha.mu=0, alpha.V=1))) As you can see, I am using the default priors for the fixed effects. Should I change them, due to the binary nature of my fixed effects?
What's
the best priors for binary fixed effects?
I will be immensely grateful if someone could help, as this issue's been
bothering me for some time now.
Kind regards,
Yannis Dimopoulos
PhD Student - The University of Hull
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
So I should only check the traceplots to check the convergence?
Assessing convergence in MCMC is not a very easy problem. I'd say checking the traceplot is generally a very good idea, but it lacks in reproducibility. Using the stationarity test (the first part) from heidel.diag() can help in that regard, especially for MCMCglmm were you typically have one chain. If you have more than one chain (e.g. several parallel runs of MCMCglmm), another possible approach is to use the gelman.diag() function to check for stationarity. Cheers, Pierre