Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Stan1 model checking
library (coda)
gelman.diag (mcmc.list (mcmc (extract (stan.model, pars="alpha", permuted=F)[,1,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,2,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,3,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,4,1])))
heidel.diag (mcmc.list (mcmc (extract (stan.model, pars="alpha", permuted=F)[,1,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,2,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,3,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,4,1])))
geweke.diag (mcmc.list (mcmc (extract (stan.model, pars="alpha", permuted=F)[,1,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,2,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,3,1]),
mcmc (extract (stan.model, pars="alpha", permuted=F)[,4,1])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment