Check the consistency of partial ordering data with a top-ordering dataset.
is.top_ordering(data,...)
Arguments
data: An object containing the partial orderings whose consistency with a top-ordering dataset has to be tested. The following classes are admissible for data: numeric matrix, data.frame, RandData from the rankdist package and rankings from the PlackettLuce package.
...: Further arguments passed to or from other methods (not used).
Returns
Logical: TRUE if the data argument is consistent with a top-ordering dataset (with a possible warning message if the supplied data need a further treatment with the coercion function as.top_ordering before being processed with the core functions of PLMIX) and FALSE otherwise.
Details
The argument data requires the partial sequences expressed in ordering format. When the value of is.top-ordering is FALSE, the membership function returns also a message with the conditions that are not met for the data to be a top-ordering dataset. NA's in the input data are tacitly converted into zero entries.
Examples
## A toy example of data matrix not satisfying the conditions to be a top-ordering datasettoy_data=rbind(1:5,c(0,4,3,2,1),c(4,3.4,2,1,5),c(2,3,0,0,NA),c(4,4,3,2,5),c(3,5,4,2,6),c(2,-3,1,4,5),c(2,0,1,4,5),c(2,3,1,1,1),c(2,3,0,4,0))is.top_ordering(data=toy_data)## A dataset from the StatRank package satisfying the conditions to be a top-ordering datasetlibrary(StatRank)data(Data.Election9)is.top_ordering(data=Data.Election9)