Giampaolo Levorato
Giampaolo Levorato

Reputation: 1622

How to access the Coefficient and Std Error in the statsmodels.API OLS summary

I have trained a Linear Regression as follows:

import statsmodels.api as sm
model = sm.OLS(Y_Train,X_Train)
result = model.fit()
result.summary()

The results look like this:

enter image description here

I need to calculate the Z-Score for each feature: Coefficient / Std Error.

To do so, I need to iterate through this table:

enter image description here

Does anybody know how to do it in pandas, please?

Upvotes: 0

Views: 22

Answers (0)

Related Questions