2
$\begingroup$

I'm fitting some GLM models with different link functions (logit, probit and cloglog) with JAGS package. I have no experience at all with MCMC based models then I have three main doubts:

1) After I fitting the model, I will have the posterior estimates for the parameters. I can use this values to create a function to generate predictions and residuals like $$logit(y)=X\beta\Rightarrow \hat{Y}=\frac{e^{X\hat{\beta}}}{1+e^{X\hat{\beta}}}$$ $$e=Y-\hat{Y}$$ or it is not valid?

2) How I can compare the same model with different link functions to choose the best?

3) Why are most diagnoses in Bayesian models via MCMC not using residual analysis? How do you evaluate the predictions in Bayesian models in general?

$\endgroup$
1
  • $\begingroup$ Your last question is very broad; I believe it is already addressed on site (though I think it's too broad to actually properly answer as it stands). Please remove it from this question, see if you can find the present posts on it and if not, after you make explicit what "better than" actually means, you can try asking it in its own question (with a link back to this one if you think it adds any necessary context). With question (3) how are you deciding what is most done? I have a bit experience of MCMC but I wouldn't have enough breadth in the topic to be confident about what's done the most. $\endgroup$
    – Glen_b
    Commented Apr 17, 2017 at 1:52

1 Answer 1

2
$\begingroup$

The usual way to do posterior predictive model checks is to first create posterior predictive simulations by

1000x:

  1. Draw parameters from the posterior
  2. Calculate model predictions based on these parameters
  3. Simulate from the stochastic process assumed by the model (in your case likely binomial)

Once you have these "posterior predictive simulations", which essentially cover the range of values you would expect if the model were true, you can check where the observed values fall within this distribution (some people call these values Bayesian p-values). This is explained in the vignette of the DHARMa package. You can do the calculation by hand, but the package also offers an option to read in posterior predictive simulations created by Jags, see here.

$\endgroup$

Your Answer

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