rank_stability {parsec} | R Documentation |
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 class 'FODposet'
rank_stability(x,
selection = 1:length(x$covers),
coverage_probability = 0.9,
error = 10^(-5), ...
)
Arguments
x |
object of class |
selection |
numeric vector or a vector of names to select the cover matrices in argument |
coverage_probability |
least coverage probability of the rank intervals with extremes |
error |
the "distance" from uniformity in the sampling distribution of linear extensions used to evaluate the average ranks. See |
... |
any of above. |
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. |
Author(s)
Fattore M., Arcagni A.
See Also
Examples
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