2

I want to decompose the error sum of the squares into the lack of fit error and pure error. I am using the statsmodel library.

model = sm.OLS(y, X)
res= model.fit()

I know how to decompose the total sum of squares(res.centered_tss) into the regression(res.ssr) and residual error(res.ess).

But I want to decompose it into pure error and lack of fit. My data has multiple y values for each x value so it is perfect for this type of analysis. How can I do this in statsmodel.

Formula of what I am looking for.

Borut Flis
  • 15,715
  • 30
  • 92
  • 119

0 Answers0