hidimstat.quantile_aggregation#

hidimstat.quantile_aggregation(pvals, gamma=0.05, 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

Quantile level for aggregation. Must be in range (0,1].

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