check.psrf computes and summarizes univariate potential scale reduction factor. It also checks whether the multivariate potential scale reduction factor can be calculated.

1 |

`post1` |
an mcmc.list with posterior samples from all Markov chains, or a data frame containing the draws from the 1st Markov Chain. |

`post2` |
Monte Carlo Posterior draws (data frame) from the 2nd Markov Chain, if the post1 is a data frame; specify post2 only needed |

`post3` |
Monte Carlo Posterior draws (data frame) from the 3rd Markov Chain, if the post1 is a data frame; specify post3 only needed |

`post4` |
Monte Carlo Posterior draws (data frame) from the 4th Markov Chain, if the post1 is a data frame; specify post4 only needed |

`post5` |
Monte Carlo Posterior draws (data frame) from the 5th Markov Chain, if the post1 is a data frame; specify post5 only needed |

The posterior samples from each chain are stored in a data frame, with columns representing parameters from the model, and rows presenting posterior draws on the parameters. If the input post1 is a data frame contains the draws from one chain, then check.psrf can take up to 5 chains though it is not necessary to have 5 chain; but at least 2 chains are necessary.

The function outputs

`psrf.s` |
univaraite psrf values and the 95% confidence interval from all model parameters. |

`psrf.m` |
multivariate psrf if the covariance matrix of the parameters are positive definite. |

`psrf.s.summ` |
the summary of the univariate psrf across parameter. |

Fang Liu (fang.liu.131@nd.edu)

1 2 3 4 5 6 | ```
## Not run:
post1= data.frame(cbind(rnorm(400,0,1), rbeta(400,2,3)))
post2= data.frame(cbind(rnorm(400,0,1), rbeta(400,2,3)))
check.psrf(post1,post2)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.