statsmodels.stats.multitest.RegressionFDR#

class statsmodels.stats.multitest.RegressionFDR(endog, exog, regeffects, method='knockoff', rng=None, **kwargs)[source]#

Control FDR in a regression procedure

Parameters:
endogarray_like

The dependent variable of the regression

exogarray_like

The independent variables of the regression

regeffectsRegressionEffects instance

An instance of a RegressionEffects class that can compute effect sizes for the regression coefficients.

methodstr

The approach used to assess and control FDR, currently must be ‘knockoff’.

rng{None, int, array_like[int], numpy.random.Generator, numpy.random.RandomState}, optional

If rng is None, a new Generator is created using fresh entropy from the operating system. If rng is an int or array of ints, a new Generator is created, seeded with rng. If rng is already a Generator or RandomState instance, that instance is used.

**kwargs

Additional keyword arguments. Currently supports design_method, the approach used to construct the augmented design matrix, either ‘equi’ (the default) or ‘sdp’.

Methods

threshold(tfdr)

Return the threshold statistic for a given target FDR

summary

Returns:
Returns an instance of the RegressionFDR class. The fdr attribute
holds the estimated false discovery rates.

Notes

This class implements the knockoff method of Barber and Candes. This is an approach for controlling the FDR of a variety of regression estimation procedures, including correlation coefficients, OLS regression, OLS with forward selection, and LASSO regression.

For other approaches to FDR control in regression, see the statsmodels.stats.multitest module. Methods provided in that module use Z-scores or p-values, and therefore require standard errors for the coefficient estimates to be available.

The default method for constructing the augmented design matrix is the ‘equivariant’ approach, set design_method=’sdp’ to use an alternative approach involving semidefinite programming. See Barber and Candes for more information about both approaches. The sdp approach requires that the cvxopt package be installed.

Methods

summary()

threshold(tfdr)

Return the threshold statistic for a given target FDR