***************************************************************************************************************************************************** PARAMETRIC ESTIMATOR OF THE LOCAL FDR ***************************************************************************************************************************************************** DOWNLOAD: -------- The parametric local FDR estimator code is downloadable from the website http://www.people.vcu.edu/~jbukszar/ The file 'lFDRest_new.r' contains all of the codes necessary to run the parametric local FDR estimator. HOW TO USE THE CODE? -------------------- The syntax of the code is resu <- localFDR_estimator(inp_x,first,MeinRice=TRUE,rule=1,delrange=c(0, 20)) where THE OUTPUT resu: 4 by 'first' array (see first in the inputs), whose first row is the local FDR estimates in increasing order second row is indices of test statistic values 'inp_x' corresponding to the local FDR esimates third row is the test statistic values 'inp_x' corresponding to the local FDR esimates forth row is the estimated number of positive effects repeated 'first' times. THE INPUTS inp_x: an array containing the test statistic values (which are assumed to follow chi-square d.f. 1 (e.g. Pearson's test stat value from allele-based case-control studies) first: the number of the (highest) tests statistic values whose Local FDR's are estimated (if 'first' is negative, then the Local FDR estimate to every test statistic value is calculated) MeinRic: if MeinRic is TRUE then Meinshausen-Rice method is used to estimate the number of positive effects, if MeinRic is FALSE then Conservative method is used to estimate the number of positive effects rule: the number added to the estimate of the number of positive effects in the stopping rule (should be either 1 or 0) delrange: the range in which the effect sizes are searched HOW TO TEST THE CODE? -------------------- The code tests the local FDR estimator on simulated data. The syntax of the code is lfdrest <- tester_lfdr(m,delr,N,blocksiz=5,blockval=0,rule=1,delrange=c(0, 20)) where THE OUTPUT lfdrest: N by K array, where K=2*number of positive detectabilities and see N in the inputs. Each row of array 'lfdrest' corresponds to one simulated dataset and contains the local FDR estimates of the first K markers/hypotheses. THE INPUTS m: number of markers/hypotheses delr: array of positive detectabilities N: number of datasets simulated blocksiz: number of the markers/hypotheses in a group whose test statistics are correlated blockval: the correlation between the test statistics of the markers/hypotheses in a group rule: the number added to the estimate of the number of positive effects in the stopping rule (should be either 1 or 0) delrange: the range in which the effect sizes are searched