# statsmodels.regression.linear_model.OLSResults.el_test¶

method

OLSResults.el_test(b0_vals, param_nums, return_weights=0, ret_params=0, method='nm', stochastic_exog=1, return_params=0)[source]

Tests single or joint hypotheses of the regression parameters using Empirical Likelihood.

Parameters
b0_vals1darray

The hypothesized value of the parameter to be tested

param_nums1darray

The parameter number to be tested

print_weightsbool

If true, returns the weights that optimize the likelihood ratio at b0_vals. Default is False

ret_paramsbool

If true, returns the parameter vector that maximizes the likelihood ratio at b0_vals. Also returns the weights. Default is False

methodstring

Can either be ‘nm’ for Nelder-Mead or ‘powell’ for Powell. The optimization method that optimizes over nuisance parameters. Default is ‘nm’

stochastic_exogbool

When TRUE, the exogenous variables are assumed to be stochastic. When the regressors are nonstochastic, moment conditions are placed on the exogenous variables. Confidence intervals for stochastic regressors are at least as large as non-stochastic regressors. Default = TRUE

Returns
restuple

The p-value and -2 times the log-likelihood ratio for the hypothesized values.

Examples

>>> import statsmodels.api as sm