% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/selectX_stats.r
\name{estimateFDR2}
\alias{estimateFDR2}
\title{Estimate FDR by scanning observed vs null effect sizes}
\usage{
estimateFDR2(obs, exp, nSim, maxFDR = 0.25)
}
\arguments{
\item{obs}{Vector of observed effect sizes}

\item{exp}{Vector of null model effect sizes (all permutations concatenated)}

\item{nSim}{Number of permutations used to generate exp}

\item{maxFDR}{FDR cutoff; scanning stops once FDR exceeds this value}
}
\value{
Vector of FDR values, one per element of obs.
}
\description{
Estimate FDR by scanning observed vs null effect sizes
}
\examples{
set.seed(1)
obs <- c(0.8, 0.5, 0.3, 0.1)
exp <- runif(400)
estimateFDR2(obs, exp, nSim = 100)

}
