Matlab Help Index Technical Documentation Index

FDR

NAME ^

FORMAT pt = FDR(p,q)

SYNOPSIS ^

function [pID,pN] = FDR(p,q)

DESCRIPTION ^

 FORMAT pt = FDR(p,q)
 
 p   - vector of p-values
 q   - False Discovery Rate level

 pID - p-value threshold based on independence or positive dependence
 pN  - Nonparametric p-value threshold
______________________________________________________________________________
 @(#)FDR.m    1.3 Tom Nichols 02/01/18

CROSS-REFERENCE INFORMATION ^

This function calls:

This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [pID,pN] = FDR(p,q)
0002 % FORMAT pt = FDR(p,q)
0003 %
0004 % p   - vector of p-values
0005 % q   - False Discovery Rate level
0006 %
0007 % pID - p-value threshold based on independence or positive dependence
0008 % pN  - Nonparametric p-value threshold
0009 %______________________________________________________________________________
0010 % @(#)FDR.m    1.3 Tom Nichols 02/01/18
0011 
0012 p = sort(p(:));
0013 V = length(p);
0014 I = (1:V)';
0015 
0016 
0017 cVID = 1;
0018 cVN = sum(1./(1:V));
0019 
0020 pID = p(max(find(p<=I/V*q/cVID)));
0021 pN = p(max(find(p<=I/V*q/cVN)));

Generated at 19:47:41 15-Oct-2003 by m2html © 2003