hidimstat.quantile_aggregation#

hidimstat.quantile_aggregation(pvals, gamma=0.05, n_grid=20, adaptive=False)[source]#

Implements the quantile aggregation method for p-values.

This method is based on :footcite:t:meinshausen2009pvalues.

The function aggregates multiple p-values into a single p-value while controlling the family-wise error rate. It supports both fixed and adaptive quantile aggregation.

Parameters:
pvalsndarray of shape (n_sampling*2, n_test)

Matrix of p-values to aggregate. Each row represents a sampling instance and each column a hypothesis test.

gammafloat, default=0.05

The quantile level (between 0 and 1) used for aggregation. For non-adaptive aggregation, a single gamma value is used. For adaptive aggregation, this is the starting point for the grid search over gamma values.

n_gridint, default=20

Number of grid points to use for adaptive aggregation. Only used if adaptive=True.

adaptivebool, default=False

If True, uses adaptive quantile aggregation which optimizes over multiple gamma values. If False, uses fixed quantile aggregation with the provided gamma value.

Returns:
ndarray of shape (n_test,)

Vector of aggregated p-values, one for each hypothesis test.

Notes

The aggregated p-values are guaranteed to be valid p-values in [0,1]. When adaptive=True, gamma is treated as the minimum gamma value to consider.

References