pii: Predictive Information Index (PII)

View source: R/pii.R

piiR Documentation

Predictive Information Index (PII)

Description

Computes the Predictive Information Index using one of three methods: "r2" (R-squared ratio), "rm" (RMSE-based), or "v" (variance ratio).

Usage

pii(y, score_pred, full_pred = NULL, type = c("r2", "rm", "v"))

Arguments

y

Observed outcome vector.

score_pred

Predictions from score-based model.

full_pred

Predictions from the full model.

type

Character. One of "r2", "rm", or "v".

Value

A numeric value between 0 and 1.

Examples

set.seed(1)
y     <- rnorm(100)
full  <- y + rnorm(100, sd = 0.3)
score <- y + rnorm(100, sd = 0.5)
pii(y, score, full, type = "r2")
pii(y, score, full, type = "rm")
pii(y, score, full, type = "v")

piiR documentation built on July 2, 2025, 1:08 a.m.