pii | R Documentation |
Computes the Predictive Information Index using one of three methods: "r2" (R-squared ratio), "rm" (RMSE-based), or "v" (variance ratio).
pii(y, score_pred, full_pred = NULL, type = c("r2", "rm", "v"))
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". |
A numeric value between 0 and 1.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.