average_ranks: Average Ranks

View source: R/average_ranks.R

average_ranksR Documentation

Average Ranks

Description

The function evaluates the average rank, and other distribution details, for each element of the poset.

Usage

average_ranks(x, ...)
## S3 method for class 'cover'
average_ranks(x, level = 0.9, error = 10^(-5), ...)
## S3 method for class 'incidence'
average_ranks(x, level = 0.9, error = 10^(-5), ...)

Arguments

x

an incidence or cover matrix representing a partial order.

level

coverage probability of the rank intervals.

error

the "distance" from uniformity in the sampling distribution of linear extensions used to evaluate the average ranks. See idn for details.

...

any of above.

Details

The function computes the rank distribution for each element of the poset, through function idn. Next, it checks whether there are any equivalent profiles, using function equivalences, and makes their rank distribution equal. Finally it provides a dataframe comprising, for each element of the poset: the average rank avrg, the extremes inf and sup of the rank interval, the effective coverage probability of the rank interval prob, the estimated minimum and maximum rank values (min and max) and the rank range.

The output is a dataframe of class average_ranks /for which a method of function plot is available. See plot.average_ranks for details).

Value

A dataframe of class average_ranks whose columns are:

avrg

the average rank;

inf

the lower extreme of the rank interval;

sup

the upper extreme of the rank interval;

prob

the effective coverage probability of the rank interval;

min

the minimum rank;

max

the maximum rank;

range

the rank range.

Author(s)

Fattore M., Arcagni A.

See Also

idn, equivalences, plot.average_ranks

Examples

profiles <- var2prof(varlen = c(3, 2, 2))
Z <- getzeta(profiles)
res <- average_ranks(Z)
plot(res)

parsec documentation built on Aug. 19, 2023, 5:07 p.m.