fastreg icon indicating copy to clipboard operation
fastreg copied to clipboard

How to extract residuals

Open vincLohm opened this issue 2 years ago • 2 comments
trafficstars

I'm thoroughly enjoying this library. I couldn't find residuals or fitted values by scanning dir(output of fr.ols). It would be nice if there was sth like .resid just like in the statsmodels version.

vincLohm avatar May 29 '23 19:05 vincLohm

Glad to hear you're liking it! You can get residuals by passing output="dict" to the ols routine. The return value will then be a dict of information instead of a DataFrame with just the inference information. The residuals are then under e_hat in the returned dict.

iamlemec avatar Jun 01 '23 22:06 iamlemec

Thanks ! That worked. Apologies for getting back to you so late after you replied so quickly. I was on holiday.

vincLohm avatar Jun 24 '23 07:06 vincLohm