The Student Room Group

Dummy Variables

My job is to create a dummy variable so that those who voted for the Labour Party are compared to a single reference group that includes all other voters.

1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = Green Party, 7 = UKIP, 8 = BNP, 9 = Other

In this situation, would the reference group include {1, 3, 4, 5, 6, 7, 8, 9}

So, the dummy variable would be:

{2} -- > 1 (is Labour)

{1, 3, 4, 5, 6, 7, 8, 9} -- > 0 (is not Labour)

Have I taken the right approach here? I am slightly confused because the reference group in this situation is included in the dummy variable. Usually, the reference group is not included because it is already assumed in the model.

Thanks!
(edited 5 years ago)
Reply 1
Original post by studentshello
My job is to create a dummy variable so that those who voted for the Labour Party are compared to a single reference group that includes all other voters.

1 = Conservative, 2 = Labour, 3 = Liberal Democrat, 4 = SNP, 5 = Plaid Cymru, 6 = Green Party, 7 = UKIP, 8 = BNP, 9 = Other

In this situation, would the reference group include {1, 3, 4, 5, 6, 7, 8, 9}

So, the dummy variable would be:

{2} -- > 1 (is Labour)

{1, 3, 4, 5, 6, 7, 8, 9} -- > 0 (is not Labour)

Have I taken the right approach here? I am slightly confused because the reference group in this situation is included in the dummy variable. Usually, the reference group is not included because it is already assumed in the model.

Thanks!


Sounds ok, but I'm not sure what model you're talking about in the last sentance? What purpose are you using the Labour/Not Labour data for?
Original post by mqb2766
Sounds ok, but I'm not sure what model you're talking about in the last sentance? What purpose are you using the Labour/Not Labour data for?

Multivariate Linear Regression in SPSS software.

Using the Transform>Decode into different variables function, I have to create a dummy variable to fit the criteria above.
Reply 3
Original post by studentshello
Multivariate Linear Regression in SPSS software.

Using the Transform>Decode into different variables function, I have to create a dummy variable to fit the criteria above.

Ahh, I think I see what you're asking. It really depends on how spss applies these transformations. It it applies them in batch, so that a new data set is created where the rules are applied to the original data then you'd be ok. If it creates an intermediate data set after each rule, then you'd have problems.

Setting 2->1 and then 1->0 (sequentially) would be incorrect, though I'd test it with a simple piece of data as I'm not a user of spss. Just have two records, one Conservative and one Labour. If they get mapped correctly, then you're ok, i.e. end up with one 1 and one 0.

Otherwise, do something like map the Conservatives to 10 to free up the 1 label, then Labour to 1 and 2..10 to 0.
(edited 5 years ago)

Quick Reply

Latest