| PRIDITscore | R Documentation |
Applies a vector of PRIDIT weights to a ridit-scored data frame and returns
a composite score in (-1, 1) for each observation. The score is
normalised by the largest eigenvalue so that the mean score is zero by
construction.
PRIDITscore(ridit_data, id_vector, weight_vec)
ridit_data |
A data frame returned by |
id_vector |
A vector of observation identifiers (same length and order
as the rows of |
weight_vec |
A named numeric vector of PRIDIT weights returned by
|
A data frame with columns id and PRIDITscore.
ridit, PRIDITweight, pridit
dat <- data.frame(
id = c("A", "B", "C", "D", "E"),
x1 = c(0.90, 0.85, 0.89, 1.00, 0.89),
x2 = c(0.99, 0.92, 0.90, 1.00, 0.93)
)
rs <- ridit(dat)
wts <- PRIDITweight(rs)
PRIDITscore(rs, dat$id, wts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.