weighted_significance: Compute cross-validation weighted significance scores

View source: R/weighted_significance.R

weighted_significanceR Documentation

Compute cross-validation weighted significance scores

Description

This function combines the empirical distribution of selected component counts with a matrix of bootstrap significance indicators. Rows in matind are matched to component counts using names such as "YT1", "YT2", and so on.

Usage

weighted_significance(cv_counts, matind)

Arguments

cv_counts

named vector or table of cross-validation component counts.

matind

matrix-like object whose rows are named by model/component labels and whose columns are predictors. Values are typically logical significance indicators returned by confints2signifind and combined with rbind.

Value

Named numeric vector containing weighted significance scores for each predictor. When no row of matind matches cv_counts, the function returns a named vector of NA_real_ values.

Author(s)

Frédéric Bertrand
frederic.bertrand@lecnam.net
https://fbertran.github.io/homepage/

See Also

confints2signifind, cvtable, and signpred.

Examples


cv_counts <- c("1" = 87, "2" = 13)
matind <- rbind(
  YT1 = c(X1 = TRUE, X2 = TRUE),
  YT2 = c(X1 = TRUE, X2 = FALSE)
)
weighted_significance(cv_counts, matind)


plsRglm documentation built on June 17, 2026, 5:06 p.m.