/** * Multiple comparison correction for controlling family-wise error rate */ /** * Bonferroni correction for multiple comparisons. * * Controls family-wise error rate (FWER) by dividing alpha by the * number of tests. Very conservative but simple. * * @param pValues - Array of p-values from multiple tests * @param alpha - Original significance level (default: 0.05) * @returns Corrected alpha threshold and which tests are significant * * @example * ```typescript * const pValues = [0.001, 0.02, 0.045, 0.08, 0.12]; * const result = bonferroniCorrection(pValues, 0.05); * console.log(result.correctedAlpha); // 0.01 (0.05 / 5 tests) * console.log(result.significant); // [true, false, false, false, false] * ``` */ export declare const bonferroniCorrection: (pValues: number[], alpha?: number) => { correctedAlpha: number; significant: boolean[]; }; /** * Benjamini-Hochberg FDR correction. * * Controls false discovery rate (FDR) rather than FWER. Less conservative * than Bonferroni, making it more powerful for large numbers of tests. * * Procedure: * 1. Sort p-values in ascending order * 2. Find largest k such that p_k ≤ (k/m) * FDR * 3. Reject all hypotheses 1, 2, ..., k * * @param pValues - Array of p-values from multiple tests * @param fdr - Target false discovery rate (default: 0.05) * @returns Adjusted p-values and which tests are significant * * @example * ```typescript * const pValues = [0.001, 0.02, 0.045, 0.08, 0.12]; * const result = benjaminiHochberg(pValues, 0.05); * console.log(result.adjustedPValues); // [0.005, 0.05, 0.075, 0.1, 0.12] * console.log(result.significant); // [true, true, false, false, false] * ``` */ export declare const benjaminiHochberg: (pValues: number[], fdr?: number) => { adjustedPValues: number[]; significant: boolean[]; }; /** * Holm-Bonferroni method (step-down procedure). * * Less conservative than Bonferroni but still controls FWER. * More powerful than Bonferroni when not all hypotheses are rejected. * * Procedure: * 1. Sort p-values in ascending order * 2. Compare smallest p-value to α/m, next to α/(m-1), etc. * 3. Stop when you find first non-significant p-value * * @param pValues - Array of p-values from multiple tests * @param alpha - Original significance level (default: 0.05) * @returns Adjusted p-values and which tests are significant * * @example * ```typescript * const pValues = [0.001, 0.02, 0.045, 0.08, 0.12]; * const result = holmBonferroni(pValues, 0.05); * console.log(result.significant); // [true, false, false, false, false] * ``` */ export declare const holmBonferroni: (pValues: number[], alpha?: number) => { adjustedPValues: number[]; significant: boolean[]; }; /** * Storey's q-value method (FDR-based with estimation of true nulls). * * More powerful than BH when many hypotheses are truly null. * Estimates π₀ (proportion of true null hypotheses) from data. * * @param pValues - Array of p-values from multiple tests * @param fdr - Target false discovery rate (default: 0.05) * @param lambda - Tuning parameter for π₀ estimation (default: 0.5) * @returns Q-values and which tests are significant * * @example * ```typescript * const pValues = [0.001, 0.02, 0.045, 0.08, 0.12, 0.35, 0.42, 0.55]; * const result = storeyQValues(pValues, 0.05, 0.5); * console.log(result.qValues); // Estimated q-values * console.log(result.significant); // Which tests are significant at FDR=0.05 * ``` */ export declare const storeyQValues: (pValues: number[], fdr?: number, lambda?: number) => { qValues: number[]; significant: boolean[]; pi0: number; }; //# sourceMappingURL=multiple-comparison.d.ts.map