Empirical Likelihood emplike#

Introduction#

Empirical likelihood is a method of nonparametric inference and estimation that lifts the obligation of having to specify a family of underlying distributions. Moreover, empirical likelihood methods do not require re-sampling but still uniquely determine confidence regions whose shape mirrors the shape of the data. In essence, empirical likelihood attempts to combine the benefits of parametric and nonparametric methods while limiting their shortcomings. The main difficulties of empirical likelihood is the computationally intensive methods required to conduct inference. statsmodels.emplike attempts to provide a user-friendly interface that allows the end user to effectively conduct empirical likelihood analysis without having to concern themselves with the computational burdens.

Currently, emplike provides methods to conduct hypothesis tests and form confidence intervals for descriptive statistics. Empirical likelihood estimation and inference in a regression, accelerated failure time and instrumental variable model are currently under development.

References#

The main reference for empirical likelihood is:

Owen, A.B. "Empirical Likelihood." Chapman and Hall, 2001.

Examples#

In [1]: import numpy as np

In [2]: import statsmodels.api as sm

In [3]: np.random.seed(50)  # for reproducibility

# Generate Data
In [4]: x = np.random.standard_normal(50)

# initiate EL
In [5]: el = sm.emplike.DescStat(x)

# confidence interval for the mean
In [6]: el.ci_mean()
Out[6]: (np.float64(-0.1791248835906482), np.float64(0.3921266815465118))

# test variance is 1
In [7]: res = el.test_var(1, result_object=True)

In [8]: print(f"llr: {res.llr}, pvalue: {res.pvalue}")
llr: 0.00022500642643482932, pvalue: 0.9880320094848857

Module Reference#

descriptive.DescStat(endog)

Return an instance to conduct inference on descriptive statistics

descriptive.DescStatUV(endog)

A class to compute confidence intervals and hypothesis tests involving mean, variance, kurtosis and skewness of a univariate random variable.

descriptive.DescStatMV(endog)

A class for conducting inference on multivariate means and correlation

descriptive.EmpLikeTestResult(llr, pvalue, ...)

Result of an empirical likelihood hypothesis test.

elanova.ANOVA(endog)

A class for ANOVA and comparing means

elanova.ANOVAResult(statistic, pvalue, mu, ...)

Result of ANOVA.compute_ANOVA.

originregress.ELOriginRegress(endog, exog)

Empirical Likelihood inference and estimation for linear regression through the origin

aft_el.emplikeAFT(endog, exog, censors)

Class for estimating and conducting inference in an AFT model