0
$\begingroup$

There are several discussions with similar headings, e.g. overall effects of categorical variables or Overall Significance vs. Individual Variable Significance in Mutliple Regression or Categorical Significance Test

...none of which fully answer me, and with subtly conflicting answers, I think.

Question: Once I've run a multiple regression which includes a categorical variable (5 levels in my case), what is the right test to see whether the variable, not the levels, is statistically significant to the model?

Below a screenshot of my regression (fit in python using statsmodels, and it's the AG Rating fella I'd like to check out).

enter image description here

Update: This may well be a duplicate. I ask this is the context of OLS (not logistic regression, the topic of the questions linked) and, python.

$\endgroup$
4
  • 2
    $\begingroup$ Possible duplicate of Significance of categorical predictor in logistic regression $\endgroup$ – COOLSerdash Aug 26 '19 at 15:02
  • 1
    $\begingroup$ Is AG rating always present? Your AG_Rating seems to be an ordinal variable. You can try to model it as a continuous variable and look at the confidence interval for the resulting coefficent. That makes it easier to interpret. You can also do an extra sum of squares F test comparing your current model and one excluding all of the AG_Rating variables. $\endgroup$ – M Waz Aug 26 '19 at 15:03
  • 1
    $\begingroup$ Fit the model once without and once with the categorical predictor and perform an likelihood-ratio test. I found an example with Python and statsmodels here. $\endgroup$ – COOLSerdash Aug 26 '19 at 15:05
  • 1
    $\begingroup$ Also relevant: stats.stackexchange.com/questions/31690/… $\endgroup$ – COOLSerdash Aug 26 '19 at 15:14
1
$\begingroup$

I would do hierarchical regression analysis, creating let's say 2 models, one without this categorical variable, and another with it. Then run anova to see whether adding this variable significantly improved the model. I did it in R, and can't tell how to do it with Python.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.