Coding a ref person and a spouse

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

Posts: 9
Joined: Wed Mar 07, 2012 5:44 am

Coding a ref person and a spouse

Postby kmmille3 » Sun Jun 17, 2012 2:49 pm

Hi everyone :) I can't promise this will be my last post, but I really appreciate everyone's help.

I have two sex variables: one for a reference person and one for the spouse of a reference person. I need to create a household measure for sex. And I don't know how to distinguish families with more or fewer men.

For education/age variables this is simple! But I don't know how to do this for a nominal variable like sex or race... Thanks if you can help me!
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Coding a ref person and a spouse

Postby GerineL » Mon Jun 18, 2012 8:19 am

need a bit more info, but it sounds like something that could be solved using if-statements: ... statements

if not, come back with some more info.
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: Coding a ref person and a spouse

Postby Penguin_Knight » Mon Jun 18, 2012 12:11 pm

You can recode all male to 1 and all female to 0, and then take an average of the two people's gender. If it's a heterosexual household, you should get 0.5. If it's 1, then both are male; if it's 0, then both are female.

Who is online

Users browsing this forum: No registered users and 1 guest