#NEWLINE# def fit( self ) : #NEWLINE# #INDENT# '\n        Fits the model and provides regression results.\n\n        Returns\n        -------\n        Results: class\n            Empirical likelihood regression class\n\n        ' #NEWLINE# exog_with = add_constant ( self . exog , prepend = True ) #NEWLINE# restricted_model = OLS ( self . endog , exog_with ) #NEWLINE# restricted_fit = restricted_model . fit ( ) #NEWLINE# restricted_el = restricted_fit . el_test ( np . array ( [ 0 ] ) , np . array ( [ 0 ] ) , ret_params = 1 ) #NEWLINE# params = np . squeeze ( restricted_el [ 3 ] ) #NEWLINE# beta_hat_llr = restricted_el [ 0 ] #NEWLINE# llf = np . sum ( np . log ( restricted_el [ 2 ] ) ) #NEWLINE# return OriginResults ( restricted_model , params , beta_hat_llr , llf )