Hi everyone,
I'm running simulations using INLA to fit phylogenetic models with one covariate and two random effects (species IID and phylogenetic using a correlation matrix). In approximately 2 per cent of runs, the model returns large random effect variance estimates >10 (e.g., either for species or phylo or for both), but without any convergence warnings. I’ve attached the model output and the code of one model with simulated data that shows a large variance estimate for the phylo random effect even though I have used a penalised complexity (PC) prior on the phylo effect.
To improve the estimates, I am thinking of:
· Changing the prior to param = c(1, 0.1), given I simulated the variances of the random components to be lower than 1.
· Adding a PC prior to the species random effect.
· Centering the simulated covariate (mean = 0)
My question:
Are there built-in INLA diagnostics or object components (beyond `model_inla$ok`
and `model_inla$mode$mode.status`)
that I can query to automatically flag runs with unstable or extreme precision estimates? I’d like a single logical flag or numeric indicator in the
fitted object for use in my simulation, without plotting or inspecting
marginals manually.
Thank you in advance for your help and insights.
Coralie
Session info:
R 4.4.2
R-INLA 24.06.27
Thank you very much for your response, it was helpful. I tested these approaches both in combination and on their own using the same set of simulated datasets.
Using the default priors reduced the number of very large random effect variance estimates. Scaling the covariate and setting different starting values also helped, but to a smaller extent. Adding constr=T did not seem to make a difference in these datasets.
For the purpose of my simulation study, I’ve decided to use default priors and scale the covariate, which reduced extreme cases to fewer than 0.05% across 10,000 runs (and I will exclude these cases from the results).
Thanks again for your insights, they have been helpful beyond this project!
Coralie