apf_fdr returns robust estimates of the Average Power Function (APF) and Bayes False Discovery Rate (FDR) for each value of the threshold Gamma on the p-value and Tau on the correlation coefficient.
type: Set "datf" if data is a matrix or dataframe containing the raw data (columns); "pvl" for a vector of p-values.
corr: The type of correlation to use when type = "datf". It can be set to either "spearman" or "pearson".
lobs: When type = "pvl", it indicates the number of datapoints used to compute the correlations.
seed: A seed (natural number) for the resampling.
gamm: The threshold gamma on the p-values to explore (typically ≤ 0.05 or 0.1). A min, max and step length value need to be set.
Returns
A list with four elements. A vector APF_gamma containing the robust estimates of APF (5th quantiles) for all the gamma values set in gamm. A vector FDR_gamma with the robust estimates of Bayes FDR (95th quantiles). A vector tau_gamma with the correlation coefficients tau for each gamma value explored and another vector with the relative values gamma (gammaval).
Examples
data("Ex1")APF_lst <- apf_fdr(Ex1,"pvl",lobs=100)# The example uses the dataset Ex1 (in the APFr package) which is# a vector of 100 p-values. The number of datapoints used to# compute each p-value in this example is set to 100. As a result,# a list of 4 objects is returned.
References
Quatto, P, Margaritella, N, et al. Brain networks construction using Bayes FDR and average power function. Stat Methods Med Res. Published online May 14th, 2019; DOI:10.1177/0962280219844288.