PRIDITscore: Compute PRIDIT scores

View source: R/PRIDITscore.R

PRIDITscoreR Documentation

Compute PRIDIT scores

Description

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.

Usage

PRIDITscore(ridit_data, id_vector, weight_vec)

Arguments

ridit_data

A data frame returned by ridit: first column is the ID, remaining columns are ridit scores.

id_vector

A vector of observation identifiers (same length and order as the rows of ridit_data).

weight_vec

A named numeric vector of PRIDIT weights returned by PRIDITweight.

Value

A data frame with columns id and PRIDITscore.

See Also

ridit, PRIDITweight, pridit

Examples

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)


pridit documentation built on May 31, 2026, 5:07 p.m.