0
$\begingroup$

So I'm a totally newbie to the field of statistics. I'm working on a project where I have a quantitative dependent variable that I'm supposed to predict using a mixture between quantitive and qualitative independent variables. My aim so far is to reduce the number of independent variables (they are acuatually 11) and to find the best model. I'm using a multiple regression. So I started with eliminating a quantitative variable that has a high p-value and that is highly correlated with another variable. However, I don't know how to proceed with the qualitative ones. I tried to do the same or to apply a backword or a forward method for elimination but I don't know how to do it since R takes into consideration the categories of the qualitative variable. So for example I can have a variable that has a very high p-value for a category and a very low one for another category. Any idea how to proceed ? Thank you in advance

$\endgroup$
  • $\begingroup$ Look into dummy coding (or effect coding). $\endgroup$ – Patrick Coulombe Oct 31 '17 at 17:40
  • $\begingroup$ @PatrickCoulombe thank you for the comment. Would you please clarify ? As I said I'm newbie. $\endgroup$ – MarGa Oct 31 '17 at 18:34
  • $\begingroup$ A humble warning: Your strategy is flawed in the sense that the stated p values, R-squared, coefficients etc. are only meant to be valid before you have started to modify the model. The question you have to ask yourself is: "Do I want to have a model that looks useful or do I want to have a useful model". Your strategy is ideal for the first criteria and problematic for the second. There are many posts in this direction, see e.g. stats.stackexchange.com/questions/115843/… that gives great hints about manual or automatic variable selection. $\endgroup$ – Michael M Oct 31 '17 at 19:20

Your Answer

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

Browse other questions tagged or ask your own question.