0
$\begingroup$

I need some help with the following:

I have a regression problem of income and degree type. Degree is a factor with 4 levels: high school diploma, bachelor's degree, master's and phd. In order to run a regression model for this, there is the need for 3 dummy variables in the model (say that high school diploma is the reference category).

If I want to rerun the model but this time I don't want to have 3 dummies, but only 2: one for master's and one for phd. I found a function called model.matrix(model) which I can use to extract $x_3$ and $x_4$ dummies ($x_3$ for MSc and $x_4$ for phd), and then run a regression based only on these like this:

lm(income ~ model.matrix(model)[, c(-1, -2)]

However in this case, I am not sure how to interpret the results and specifically the intercept. I guess that somehow, the intercept now incorporates both high school and bachelor's dummy variables?

Thanks in advance.

$\endgroup$
4
  • $\begingroup$ Why not simply filter your dataset to include only those with a masters and PhD and rerun your model and interpret as you usually do? $\endgroup$ Commented Dec 11, 2020 at 21:52
  • $\begingroup$ I think thats something different, right? I ignore values this way, specifically the values for which diploma = high school. Ι dont want to exclude them, I basically want to run a regression with 2 dummies instead of 3. Im just not sure how to interpret the parameters for such a model. $\endgroup$
    – thenac
    Commented Dec 11, 2020 at 22:00
  • $\begingroup$ I guess it depends on what the goal of your analysis is. Can you explain more in an edit to your question what your intent/goal of your analysis is? $\endgroup$ Commented Dec 11, 2020 at 22:05
  • $\begingroup$ I am not sure. This is a homework for me and the purpose is not stated. Only that I have to exclude the non-significant dummy from the model, which is high school. By non-significant I mean that I already ran the model with the 3 dummies and the p-value for the highschool was very big. $\endgroup$
    – thenac
    Commented Dec 11, 2020 at 22:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.