View source: R/PLMIXfunctions.R
make_partial | R Documentation |
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 |
format_input |
Character string indicating the format of the |
nranked |
Numeric vector of length |
probcens |
Numeric vector of length |
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:
partialdata |
Numeric |
nranked |
Numeric vector of length |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.