How this calculation works
A local false discovery rate compares the fitted null density with the overall score density at a particular z value. It is different from a tail-area summary that combines every observation beyond a threshold.
Must freeze estimator before implementation. Suggested bounded empirical procedure: histogram counts with fixed disclosed bins; fit Poisson log-density spline or degree-limited polynomial by IRLS with offset log(n*binWidth); fit a Gaussian empirical null using central-matching quadratic log density on a prespecified central interval. If central log density=a+bz+cz² with c<0 then mu=-b/(2c), sigma=sqrt(-1/(2c)), p0=exp(a+mu²/(2sigma²))*sigma*sqrt(2pi). Evaluate lfdr(z)=p0*normalPDF(z;mu,sigma)/fHat(z). Report any raw p0>1/model failure, and any [0,1] display clipping, rather than silently claiming a fitted valid mixture. This is a distinct transparent central-matching estimator, not complete A worked example
With the prefilled inputs, nullProportion = 0.8106646826843782.
Good to know
Fixed-domain [-12,12] quartic Poisson histogram density and truncated-normal central MLE, not locfdr package parity. Values clipped at1; empirical-null extrapolation may fail, dependence and global FDR control are not guaranteed.
Reference: Primary method reference or author-maintained documentation (opens in a new tab) ↗
Local evidence and tail evidence
A local false discovery rate compares the fitted null density with the overall score density at a particular z value. It is different from a tail-area summary that combines every observation beyond a threshold.
This distinction matters near a dense group of modest scores. Their local mixture composition can differ from the average composition of more extreme scores, even when the same null model underlies both calculations.
Compare with the Higher criticism global test calculator for sparse signals in p values. Estimate a two-groups empirical null and local posterior null probabilities for supplied z scores; existing higher criticism only tests a global sparse-signal null.
Supply comparable z scores
Use the prefilled input structure and preserve the declared column or index order. The input should be a collection of statistics put on a comparable z scale, with the same direction and transformation convention. Mixing unrelated scales gives the density estimator a shape with no coherent null interpretation.
Central matching assumes the middle of the distribution is sufficiently dominated by null cases. If the signal itself fills that region, the fitted null mean, spread and null proportion can all be distorted. This implementation bins scores on the fixed interval from minus twelve to twelve. A quartic polynomial in z divided by six models the log expected histogram count, and the fitted bin values are normalized to form a density on that grid. This fixed-domain procedure is a declared estimator rather than a claim of parity with a named statistics package. Results are evaluated at bin centers; the page does not attach a separately interpolated local probability to every original observation. Changing the bin count changes the estimation problem and can alter apparent evidence in sparsely populated regions.
Freeze the smoothing choices
A density curve depends on bin widths and smoothing flexibility. Fix those choices before evaluating which observations look interesting, and retain them with the resulting local-rate values.
The central null uses a truncated-normal likelihood, including the interval probability in its normalizing constant. A fitted parameter boundary or unsupported interval leaves that null fit unresolved.
From density ratio to local rate
The working ratio is p0 times the empirical-null density divided by the overall fitted density. The null proportion p0 is therefore part of the estimator, not an optional cosmetic adjustment.
An estimated ratio above one can arise because independently fitted curves are not a valid global mixture decomposition. Any clipping used for display should be visible so it cannot conceal incompatibility between the fitted components.
An exact normal reference
The standard-normal log density has constant term minus one-half log(2π), no linear term and quadratic coefficient minus one-half. Central matching of that exact curve returns mean zero, standard deviation one and null proportion one.
If the overall curve is also that same normal density, the local ratio equals one everywhere. This is an analytic component check; a finite sample fitted through bins will show estimation noise around that reference.
Interpret estimated null shifts
An empirical null wider than the standard normal can change the apparent evidence attached to extreme scores. Such widening may reflect dependence, model errors, nuisance variation or genuine contamination of the central region.
The fitted shift does not explain which mechanism caused it. Compare it with the theoretical null and investigate the original analyses instead of automatically treating the empirical fit as the correct scientific explanation.
Respect tail uncertainty
Where few scores occur, an estimated density can change substantially with the smoother. Treat very small tail densities and resulting local rates as sensitive estimates rather than exact constants.
This calculator cannot validate the original experiment, independence assumptions or scientific discoveries. Use its diagnostic curves to identify modeling questions and confirm important conclusions with a suitable multiple-testing analysis. The null fit maximizes a normal likelihood conditional on membership in the supplied central interval. Its normalization includes the normal probability of that interval, which is why the sample standard deviation of the central observations cannot simply be used as the full null standard deviation. At least fifty central observations are required. The raw null proportion is estimated from observed central frequency divided by the fitted null interval mass. A raw proportion just above one is reported and clipped for the working ratio; a materially incompatible estimate is rejected. Such an error is a model diagnostic, not a reason to replace valid data with more convenient scores. Fixed-domain [-12,12] quartic Poisson histogram density and truncated-normal central MLE, not locfdr package parity. Values clipped at1; empirical-null extrapolation may fail, dependence and global FDR control are not guaranteed.
A few questions, answered
Is local FDR the same as a corrected p-value?
No. It is a fitted local density ratio under a mixture model rather than a tail probability adjusted over tests.
Why are at least two hundred comparable scores required?
The empirical density and central-null fit need enough observations to distinguish shape from sampling noise.
What does a null proportion above one mean?
It indicates the independent density and central-normal fits are not forming a valid estimated mixture; it needs a diagnostic, not silent acceptance.
Will changing the bins change my result?
It can. The smoothing and central-window settings are part of the estimator and must be reported.