Censoring of complete rankings/orderings
Return partial top rankings/orderings from complete sequences obtained either with user-specified censoring patterns or with a random truncation.
make_partial(data, format_input, nranked = NULL, probcens = rep(1, ncol(data) - 1))
data |
Numeric NxK data matrix of complete sequences to be censored. |
format_input |
Character string indicating the format of the |
nranked |
Numeric vector of length N with the desired number of items ranked by each sample unit after censoring. If not supplied ( |
probcens |
Numeric vector of length (K-1) with the probability of each censoring pattern to be employed for the random truncation of the complete sequences (normalization is not necessary). It works only if |
The censoring of the complete sequences can be performed in: (i) a deterministic way, by specifying the number of top positions to be retained for each sample unit in the nranked
argument; (ii) a random way, by sequentially specifying the probabilities of the top-1, top-2, ..., top-(K-1) censoring patterns in the probcens
argument. Recall that a top-(K-1) sequence corresponds to a complete ordering/ranking.
A list of two named objects:
|
Numeric NxK data matrix of partial (censored) sequences with the same format of the input |
|
Numeric vector of length N with the number of items ranked by each sample unit after censoring. |
Cristina Mollica and Luca Tardella
data(d_german) head(d_german) d_german_cens <- make_partial(data=d_german, format_input="ordering", probcens=c(0.3, 0.3, 0.4)) head(d_german_cens$partialdata) ## Check consistency with the nominal censoring probabilities round(prop.table(table(d_german_cens$nranked)), 2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.