Skip to contents

This function identifies columns in a probability matrix that are: (1) statistically significant based on a column-wise p-value aggregation method (e.g., Simes), and (2) concentrated, in the sense that the credible set formed from their PIPs does not include all variables. If no column is significant, a fallback selects the column whose p-values are most non-uniform.

Usage

iskept(pmp, pval, alpha = 0.05)

Arguments

pmp

A numeric matrix of posterior inclusion probabilities (PIPs), dimension p × L.

pval

A numeric matrix of p-values, dimension p × L, where each column corresponds to a single effect.

alpha

Significance threshold for both p-value aggregation and credible set construction (default = 0.05).

Value

A logical vector of length L indicating selected columns:

  • TRUE if a column is retained (significant and non-diffuse),

  • FALSE otherwise.

Column names are preserved if present. At least one column is always selected.

Details

Columns are first assessed using combine_simes to combine p-values across rows. Among the significant columns (p-value < alpha), each is further evaluated by forming a credible set from its posterior inclusion probabilities (PIPs). The credible set consists of variables ranked by PIP and included until the cumulative sum reaches at least 1 - alpha.

If the credible set includes all variables, the column is excluded as too diffuse. This prevents keeping effects that do not concentrate signal on a subset of variables.

If no columns remain after filtering, the function selects the column with the most non-uniform p-value distribution (based on variance from mean).

Note

Assumes each column of pval and pmp corresponds to the same single-effect model.