Reputation: 491
I have a relatively small dataset consisting of x, y coordinates and organic matter content. I perform a simple multi-linear regression in Python using statsmodels.api ordinary least square (OLS) with organic matter content being the dependent variable and the others predictors. Firstly, I find the total sum of squares of my model (called mreg) with the built-in method 'mreg.centered_tss'. Now I have to find the sum of squares for my predictors, the x and y variable. Is it possible to do with the statsmodels.api or should I use a for loop instead?
I have used the .ess and the .centered_tss to determine the sum of squares of the model. I only need to know the sum of squares of my modelled variables x and y coordinates compared to the mean.
edit: I think what I am asking for is the residual sum of squares of my x coordinates and y coordinates from the model.
Thomas
Upvotes: 1
Views: 2492