MyNixOS website logo
Description

Principal Component Analysis Applied to Ridit Scoring.

Implements the 'PRIDIT' (Principal Component Analysis applied to 'RIDITs') scoring system described in Brockett et al. (2002) <doi:10.1111/1539-6975.00027>. Provides functions for ridit scoring originally developed by Bross (1958) <doi:10.2307/2527727>, calculating 'PRIDIT' weights, and computing final 'PRIDIT' scores for multivariate analysis of ordinal data.

pridit

CRAN status R-CMD-check

An R package that implements the PRIDIT (Principal Component Analysis applied to RIDITs) analysis system as described in Brockett et al. (2002).

Installation

From CRAN (recommended):

install.packages("pridit")

From GitHub (development version):

# Install devtools if you haven't already
install.packages("devtools")

# Install the PRIDIT package
devtools::install_github("rlieberthal/PRIDIT")

Description

This package provides three main functions for calculating and analyzing Ridit scores and PRIDIT scores:

  • ridit() - Calculates Ridit scores for a given dataset using the method developed by Bross (1958) and modified by Brockett et al. (2002)
  • PRIDITweight() - Applies Principal Component Analysis (PCA) to Ridit scores to calculate PRIDIT weights for each variable
  • PRIDITscore() - Calculates final PRIDIT scores using the weights and ridit scores

Quick Start

library(pridit)

# Load your data (first column should be IDs)
data <- data.frame(
  ID = c("A", "B", "C", "D", "E"),
  var1 = c(0.9, 0.85, 0.89, 1.0, 0.89),
  var2 = c(0.99, 0.92, 0.90, 1.0, 0.93),
  var3 = c(1.0, 0.99, 0.98, 1.0, 0.99)
)

# Step 1: Calculate ridit scores
ridit_scores <- ridit(data)

# Step 2: Calculate PRIDIT weights
weights <- PRIDITweight(ridit_scores)

# Step 3: Calculate final PRIDIT scores
final_scores <- PRIDITscore(ridit_scores, data$ID, weights)

print(final_scores)

Data Format

Your input data should be structured as:

  • First column: Unique identifiers (IDs)
  • Remaining columns: Numerical variables to be analyzed
  • All variables should be numeric (convert factors/categories to numeric values like 0,1 or 1,2,3,4,5)

Output

The final PRIDIT scores range from -1 to 1, where:

  • The sign indicates class identity
  • The magnitude indicates the intensity of that identity

References

  • Bross, I. D. (1958). How to use ridit analysis. Biometrics, 14(1), 18-38. doi:10.2307/2527727
  • Brockett, P. L., Derrig, R. A., Golden, L. L., Levine, A., & Alpert, M. (2002). Fraud classification using principal component analysis of RIDITs. Journal of Risk and Insurance, 69(3), 341-371. doi:10.1111/1539-6975.00018
  • Lieberthal, R. D. (2008). Hospital quality: A PRIDIT approach. Health services research, 43(3), 988-1005.

License

This project is licensed under the Apache License 2.0.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows