Date: Wed, 10 Mar 1999 00:01:18 +0800
Reply-To: ECON <joylin@MS2.SEEDER.NET>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: ECON <joylin@MS2.SEEDER.NET>
Subject: Doable regression?
Content-Type: text/plain; charset=BIG5
Hello,
I have a household data set and I would like to run
a regression as the followings:
Wife's wage = wife's education + husband's education + ...
However, when I merge the data sets by household ID and
member #, the results become full of missing values.
In the raw data set, it only provides the "education" and "wage"
of the whole respondents, i.e., it doesn't separate as husband's
or wife's data.
My programs are:
data a;
infile 'c:\mu87' lrecl=131;
input id $1-15 order 16-17 house 17-20 sex 21 edu 26 wage 71-75l
run;
data b;
set a;
if house =02 or house=08;
/*to restrict the observations to respondent's couple only */
run;
data d (keep=id order sex house ed hed wage hwage);
set b;
if sex=1; /*husband's data set */
hwage=wage;
hed=ed;
run;
data e (keep=id order sex house ed wed wage wwage);
set b;
if sex =2; /*wife's data set */
wwage=wage;
wed=ed;
run;
data f;
set d e;
proc sort data=d;
by id order;
proc sort data=e;
by id order;
data g;
merge d e;
by id order;
run;
data h;
set g;
proc reg;
model wwage=wed hed;
run;
-------> the result shows :"No valid observations are found".
Can anyone kindly advise me whether the regression is doable?
If so, what's wrong with my program? I would very much
appreciate it if you could point out my mistakes.
Thank you in advance.
Judy