LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 Mar 1999 18:06:28 +0000
Reply-To:     John Whittington <medisci@POWERNET.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         John Whittington <medisci@POWERNET.COM>
Subject:      Re: Doable regression?
Comments: To: ECON <joylin@MS2.SEEDER.NET>
Content-Type: text/plain; charset="us-ascii"

Whoops - the code I just posted was just a little *too* simple; I forgot to combine together the male and female observations! I think the simplest way is just (after sorting) to RETAIN the husbands values of wage and ed (i.e. hwage and hed) and then (assuming that there are both male and female records for each household) eliminate one of each pair of records - i.e.

data a ; infile 'c:\mu87' lrecl=131 ; input id $1-15 order 16-17 house 17-20 sex 21 edu 26 wage 71-75 ; run ; proc sort data = a ; by id sex ; * (assuming ID is a household identifier) ; run ; data a (drop = sex wage ed) ; retain hwage hed ; set a ; if sex = 1 then do ; hwage = wage ; hed = ed ; end ; if sex = 2 then do ; wwage = wage ; wed = ed ; end ; if house in (2, 8) and sex = 2 ; run; prog reg data = a ; model wwage = wed hed ; run ;

If you cannot be sure that there will be two (one husband and one wife) observations for each household, then it becoames slightly more complicated, but is still do-able. Let me know if that is the situation.

Sorry about the previous oversight.

Regards, John

---------------------------------------------------------------- Dr John Whittington, Voice: +44 (0) 1296 730225 Mediscience Services Fax: +44 (0) 1296 738893 Twyford Manor, Twyford, E-mail: medisci@powernet.com Buckingham MK18 4EL, UK mediscience@compuserve.com ----------------------------------------------------------------


Back to: Top of message | Previous page | Main SAS-L page