data aa;
input BSYCATN type;
cards;
2010 1
2010 1
2010 1
2010 1
2010 1
2010 1
2010 1
2010 1
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2010 2
2011 1
2011 1
2011 1
2011 1
2011 1
2011 1
2011 1
2011 1
2011 2
2011 2
2011 2
2011 2
2011 2
2012 2
2012 2
2012 2
2012 2
2012 2
2012 1
2012 1
2012 1
2012 1
2012 1
2012 1
2012 1
2012 1
2012 2
2012 2
2012 2
2012 2
2012 2
;
proc sort;
by BSYCATN type;
run;
data aa;
set aa;
if BSYCATN = 2010 then cat8_1 = 1;
else if BSYCATN ^= . then cat8_1 = 2;
if BSYCATN = 2011 then cat8_2 = 1;
else if BSYCATN ^= . then cat8_2 = 2;
run;
ods output ParameterEstimates = P1 OddsRatios = Odds1;
proc logistic data = aa descending;
class BSYCATN;
model type = BSYCATN;
run;quit;
ods output close;
ods output ParameterEstimates = P2 OddsRatios = Odds2;
proc logistic data = aa descending;
class cat8_1 cat8_2;
model type = cat8_1 cat8_2;
run;quit;
数据随便打的
求大神帮忙解答~~~~