1
$\begingroup$

I'm using MCMCglmm to run a logistic model. The model includes 10 predictors and approximately 130,000 observations across 200 people. The burn in is set to 3000 and the thinning interval is set to 10. After 13000 iterations, the effective sample size is only 8 - 20 depending on the predictor (I've also set the thinning interval to 30 to reduce the autocorrelation and the total number of iterations to 1,500,000 - but this only resulted in an effective sample size of 500 - 1000). Does anyone know why the effective sample size is so low in these models (this is not the case when I use these data to run a linear regression)? And how can I improve the effective sample size?

Thanks!

$\endgroup$
2
  • $\begingroup$ Without knowing more about your model, it's hard to say. It might be that another parameterization would be better. You could also try another MCMC algorithm such as NUTS/HMC (the Stan based packages such as rstanarm or rstan itself offer that). $\endgroup$
    – Björn
    Commented Oct 9, 2017 at 14:58
  • $\begingroup$ What type of information do you need? To help clarify, the call to MCMCglmm looked like : MCMCglmm(Y ~ T + X1 + X2 + X3 + C1 + C2 + C3 + A1 + A2 + A3, random = ~ID, thin = 30, nitt = 1500000, family = categorical). Y and the predictors labeled "A" are binary variables that occur infrequently (approximately 5% of observations). The X variables are lognormally distributed, the C variables are categorical and occur on approximately 50% of observations, and T is time. $\endgroup$
    – TPM
    Commented Oct 9, 2017 at 15:10

1 Answer 1

2
$\begingroup$

Based on the model description You've specified for Björn, I would recommend to build and use an uninformative prior, in which You fix the residual variance (e.g. at one: R=list(V=1, fix=1) ). Also, increasing thinning interval usually helps to decrease autocorrelation in the MCMC chains, hence increasing the effective sample size. The function autocorr.diag(model$VCV) will show You the extent of autocorrelation in the different chains, in given thinning intervals; You should try and use a thinning interval that results low (~0.01 or less) autocorrelation values.

Cheers,

Zoltan

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.