gelman.plot {coda} | R Documentation |

## Gelman-Rubin-Brooks plot

### Description

This plot shows the evolution of Gelman and Rubin's shrink factor as
the number of iterations increases.

### Usage

gelman.plot(x, bin.width = 10, max.bins = 50,
confidence = 0.95, transform = FALSE, auto.layout = TRUE, ask = TRUE,
col, lty, xlab, ylab, type, ...)

### Arguments

`x` |
an mcmc object |

`bin.width` |
Number of observations per segment, excluding the
first segment which always has at least 50 iterations. |

`max.bins` |
Maximum number of bins, excluding the last one. |

`confidence` |
Coverage probability of confidence interval. |

`transform` |
Automatic variable transformation (see `gelman.diag` ) |

`auto.layout` |
If `TRUE` then, set up own layout for
plots, otherwise use existing one. |

`ask` |
Prompt user before displaying each page of plots. |

`col` |
graphical parameter (see `par` ) |

`lty` |
graphical parameter (see `par` ) |

`xlab` |
graphical parameter (see `par` ) |

`ylab` |
graphical parameter (see `par` ) |

`type` |
graphical parameter (see `par` ) |

`...` |
further graphical parameters. |

### Details

The Markov chain is divided into bins according to the arguments
`bin.width`

and `max.bins`

. Then the Gelman-Rubin shrink factor
is repeatedly calculated. The first shrink factor is calculated with
observations 1:50, the second with observations *1:(50+n)* where n is
the bin width, the third contains samples *1:(50+2n)* and so on.

### Theory

A potential problem with `gelman.diag`

is that it may mis-diagnose
convergence if the shrink factor happens to be close to 1 by chance.
By calculating the shrink factor at several points in time,
`gelman.plot`

shows if the shrink factor has really converged, or
whether it is still fluctuating.

### References

Brooks, S P. and Gelman, A. (1998) General Methods for Monitoring
Convergence of Iterative Simulations. Journal of Computational and
Graphical Statistics. 7. p434-455.

### See Also

`gelman.diag`

.

[Package

*coda* version 0.8-3

Index]