make_partial {PLMIX} | R Documentation |
Censoring of complete rankings/orderings
Description
Return partial top rankings/orderings from complete sequences obtained either with user-specified censoring patterns or with a random truncation.
Usage
make_partial(data, format_input, nranked = NULL, probcens = rep(1,
ncol(data) - 1))
Arguments
data |
Numeric |
format_input |
Character string indicating the format of the |
nranked |
Numeric vector of length |
probcens |
Numeric vector of length |
Details
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.
Value
A list of two named objects:
partialdata |
Numeric |
nranked |
Numeric vector of length |
Author(s)
Cristina Mollica and Luca Tardella
Examples
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)