Performs a probabilistic rank analysis based on an almost uniform sample of possible rankings that preserve a partial ranking.

## Usage

`mcmc_rank_prob(P, rp = nrow(P)^3)`

## Arguments

- P
P A partial ranking as matrix object calculated with neighborhood_inclusion or positional_dominance.

- rp
Integer indicating the number of samples to be drawn.

## Value

- expected.rank
Estimated expected ranks of nodes

- relative.rank
Matrix containing estimated relative rank probabilities:

`relative.rank[u,v]`

is the probability that u is ranked lower than v.

## Details

This function can be used instead of exact_rank_prob
if the number of elements in `P`

is too large for an exact computation. As a rule of thumb,
the number of samples should be at least cubic in the number of elements in `P`

.
See `vignette("benchmarks",package="netrankr")`

for guidelines and benchmark results.

## References

Bubley, R. and Dyer, M., 1999. Faster random generation of linear extensions.
*Discrete Mathematics*, **201**(1):81-88

## Examples

```
if (FALSE) {
data("florentine_m")
P <- neighborhood_inclusion(florentine_m)
res <- exact_rank_prob(P)
mcmc <- mcmc_rank_prob(P, rp = vcount(g)^3)
# mean absolute error (expected ranks)
mean(abs(res$expected.rank - mcmc$expected.rank))
}
```