ranks {BRugs} | R Documentation

## Calculation of ranks

### Description

These functions are used to calculate ranks of vector valued quantities in the model.

### Usage

    ranksSet(node)
    ranksStats(node)
    ranksClear(node)

### Arguments

`node` | Character, name of a vector (one dimensional array) variable in the model.

### Details

`ranksSet` creates a monitor that starts building running histograms to represent the rank of each component of `node`. An amount of storage proportional to the square of the number of components of `node` is allocated. Even for large numbers of components this can require less storage than calculating the ranks explicitly in the model specification and storing their samples, and it is also much quicker.

`ranksStats` displays summarises of the distribution of the ranks of each component of `node`.

`ranksClear` removes the monitor calculating running histograms for `node`.

### Value

`ranksStats` returns a data frame with columns:

`val2.5pc` | 0.025 quantiles
`median` | medians
`val97.5pc` | 0.975 quantiles

### Note

Users should ensure their simulation has converged before using these functions. Note that if the MCMC simulation has an adaptive phase it will not be possible to make inference using values sampled before the end of this phase.

### See Also

`BRugs`, `help.WinBUGS`

[Package BRugs version 0.3-2 Index]