def _partial_regression(endog, exog_i, exog_others):
 res1a = OLS(endog, exog_others).fit()
 res1b = OLS(exog_i, exog_others).fit()
 res1c = OLS(res1a.resid, res1b.resid).fit()
 return (res1c, (res1a, res1b))

def _partial_regression ( endog , exog_i , exog_others ) : res1a = OLS ( endog , exog_others ) . fit ( ) res1b = OLS ( exog_i , exog_others ) . fit ( ) res1c = OLS ( res1a . resid , res1b . resid ) . fit ( ) return ( res1c , ( res1a , res1b ) )
partial regression .