Learn R Programming

parsec (version 1.2.7)

rank_stability: Rank stability analysis in posetic FOD

Description

The function computes the average ranks and the positions in the ranking of the elements of the alpha-cuts.

Usage

rank_stability(x, ...)
# S3 method for FODposet
rank_stability(x,
    selection = 1:length(x$covers),
    coverage_probability = 0.9,
    error = 10^(-5), ...
)

Value

alpha

vector of the alpha values defining the alpha-cuts.

average_ranks

data frame of average ranks of the poset elements (by columns) at different alpha values (by rows).

lower_ranks

data frame of the lower bounds of the rank interval, of each poset element (by columns) at different alpha values (by rows).

upper_ranks

data frame of the upper bounds of the rank interval, of each poset element (by columns) at different alpha values (by rows).

ranking

data frame of the positions of poset elements (by columns), in the ranking extracted from the posets associated to alpha-cuts (by rows).

resolution

number of elements of the posets associated to the alpha-cuts.

Arguments

x

object of class FODposet generated by function FOD.

selection

numeric vector or a vector of names to select the cover matrices in argument x.

coverage_probability

least coverage probability of the rank intervals with extremes lower_ranks and upper_ranks.

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.

Author

Fattore M., Arcagni A.

See Also

FFOD, idn

Examples

Run this code
v1 <- as.ordered(c("a", "b", "c", "d"))
v2 <- 1:3
prof <- var2prof(varmod = list(v1 = as.ordered(c("a", "b", "c", "d")), v2 = 1:3))
np <- nrow(prof$profiles)

k <- 10 # number of populations
set.seed(0)
populations <- as.data.frame(lapply(1:k, function(x) round(runif(np)*100)))
rownames(populations) <- rownames(prof$profiles)
names(populations) <- paste0("P", 1:k)

x <- FFOD(profiles = prof, distributions = populations)

res <- rank_stability(x)
res

Run the code above in your browser using DataLab