Type: | Package |
Title: | Predictive Information Index ('PII') |
Version: | 0.3.0 |
Maintainer: | Kevin E. Wells <kevin.e.wells@usm.edu> |
Description: | A simple implementation of the Predictive Information Index ('PII'). |
Encoding: | UTF-8 |
License: | MIT + file LICENSE |
Imports: | stats (≥ 3.6.0) |
VignetteBuilder: | knitr |
Suggests: | knitr, rmarkdown |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-07-01 23:27:54 UTC; w10105397 |
Author: | Kevin E. Wells [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2025-07-01 23:40:02 UTC |
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")
Plot Score vs Outcome for Visual PII Insight
Description
Plot Score vs Outcome for Visual PII Insight
Usage
pii_plot(score, outcome, bins = 10)
Arguments
score |
Numeric score vector |
outcome |
Numeric outcome vector |
bins |
Number of bins for discretization |
Value
A base R plot