## Regression with three dummy variables

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

peterheterjag
Posts: 5
Joined: Mon Nov 17, 2014 10:17 am

### Regression with three dummy variables

Hi!

I want to use three dummy variables representing country of birth in a regression analysis. When I include all three the regression won't include non of them, but when I inlcude only one of them, doesnt matter which, the regression includes it and there is no problem. When I include all three I get a warning-window with the text as below. I have recoded the variables into: 0= reference country, 1=country of birth. Can somebody please explain what I might be doing wrong?

Regards,
Peter

Warnings
For models with dependent variable Välbefinnande, the following variables are constants or have missing correlations: Annat_land_norden, Annat_land_europa, Annat_land_världen. They will be deleted from the analysis.
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

### Re: Regression with three dummy variables

Not entirely sure, but check:

- VIF / Multicollinearity (maybe one of the variables is redudant?)
- Is one of them a constant? (i.e., check frequencies).
peterheterjag
Posts: 5
Joined: Mon Nov 17, 2014 10:17 am

### Re: Regression with three dummy variables

I think you are spot on once again. When I construct a correlation matrix it turns out that they are constants. but I don't understand what that means in this context, I have treated those dummies in the same manner as my gender-dummy and that one works fine. what does constants mean in this context, and how do I "unconstant" them? as you might guess, I'm a rookie
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

### Re: Regression with three dummy variables

A constant means that it has the same value for every case.
For instance, if you include a variable for "taiwan" but there is nobody from taiwan (and it gets a 0 for everybody), this creates a problem, because you have no cases to estimate effects in Taiwan (i.e., they all have a 0). Thus, there is no variation in Taiwan.

I think something may have gone wrong when you created your dummies.
I did not really understand what you were saying when you said: "0= reference country, 1=country of birth".

Maybe take a look at this document, that explains how you can create dummy variables if you have more than 2 categories:

https://www.moresteam.com/whitepapers/d ... iables.pdf
peterheterjag
Posts: 5
Joined: Mon Nov 17, 2014 10:17 am

### Re: Regression with three dummy variables

I have four groups regarding country of birth. they are: sweden, outside sweden in nordic countries, outside sweden in europe, outside europe. I have created three dummies with the categories 0=sweden and 1= nordic/europe/outside europe. every 0 and 1 are represented with a number of cases in every variable. but I will try to recreate the dummies and hopefully that solves it

thanks!

regards,
Peter
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

### Re: Regression with three dummy variables

Oke, good luck!
Make sure every category is represented in the data, by the way, otherwise you can get that problem.

### Who is online

Users browsing this forum: No registered users and 3 guests