0
$\begingroup$

I have dataframe which contains numerical and categorical features. I am trying to get p-values of these variables using OLS.

I'm creating dummies to get p-values of categorical features. But in this way im getting p-value for all values in categorical features. My purpose is that get p-value of feature not all values of feature.

How should i interpret of OLS result which contains p-values of dummies? Should i use chi2 test for get the p-value of categorical features? If yes can i use p-values of numerical features from OLS and p-values of categorical features from chi2 test for all data?

| cite | improve this question | | | | |
$\endgroup$
  • $\begingroup$ What software are you using? $\endgroup$ – user2974951 Dec 23 '19 at 14:02
  • $\begingroup$ Python @user2974951 $\endgroup$ – talatccan Dec 23 '19 at 14:03
  • $\begingroup$ "Python" is a Turing-Complete programming language. You need to be a lot more specific than that. You had might as well say "what software?" ... "Computers" $\endgroup$ – Scott Dec 23 '19 at 14:54
  • $\begingroup$ I dont use any spesific software like SPSS, Weka etc. Im developing software using Python, Scikit-Learn, Imblearn, Statsmodels, Numpy etc. $\endgroup$ – talatccan Dec 24 '19 at 6:41
0
$\begingroup$

In case you aren't aware, the p-values returned for each category you are tested assess if the individual dummy is significantly different than your determined reference group. I believe you are looking for a global test to assess if the variable itself is significant. In this case you would use a "chunk test" AKA a "general linear F-test".

See this thread: What are chunk tests?

It is important to note that some dummies in your categorical variable may not be significant, but they should still be left in the model.

| cite | improve this answer | | | | |
$\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.