mcmc_rank_prob {netrankr}R Documentation

Estimate rank probabilities with Markov Chains

Description

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.

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.

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.

Author(s)

David Schoch

References

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

See Also

exact_rank_prob, approx_rank_relative, approx_rank_expected

Examples

## Not run: 
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))

## End(Not run)

[Package netrankr version 1.2.3 Index]