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

Postby peterheterjag » Mon Nov 17, 2014 12:45 pm

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

Postby GerineL » Mon Nov 17, 2014 1:11 pm

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

Postby peterheterjag » Mon Nov 17, 2014 3:24 pm

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

Postby GerineL » Mon Nov 17, 2014 5:01 pm

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

Postby peterheterjag » Mon Nov 17, 2014 8:03 pm

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

Postby GerineL » Tue Nov 18, 2014 9:20 am

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 1 guest

cron