View source: R/PLMIXfunctions.R
make_complete | R Documentation |
Return complete rankings/orderings from partial sequences relying on a random generation of the missing positions/items.
make_complete(
data,
format_input,
nranked = NULL,
probitems = rep(1, ncol(data))
)
data |
Numeric |
format_input |
Character string indicating the format of the |
nranked |
Optional numeric vector of length |
probitems |
Numeric vector with the |
The completion of the partial top rankings/orderings is performed according to the Plackett-Luce scheme, that is, with a sampling without replacement of the not-ranked items by using the positive values in the probitems
argument as support parameters (normalization is not necessary).
A list of two named objects:
completedata |
Numeric |
nranked |
Numeric vector of length |
Cristina Mollica and Luca Tardella
## Completion based on the top item frequencies
data(d_dublinwest)
head(d_dublinwest)
top_item_freq <- rank_summaries(data=d_dublinwest, format_input="ordering", mean_rank=FALSE,
pc=FALSE)$marginals["Rank_1",]
d_dublinwest_compl <- make_complete(data=d_dublinwest, format_input="ordering",
probitems=top_item_freq)
head(d_dublinwest_compl$completedata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.