BookmarkSubscribeRSS Feed
andreas_zaras
Pyrite | Level 9

Hello,

 

I run a logistic regression using the interace of SAS Studio. I get the code at the ned of the question. How can i i add odds ratios in the output?

 

I add the oddratio statement as described in the following link but i get the error:

 

91 link=logit clb;
92 oddsratio;
---------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.

 

https://documentation.sas.com/doc/en/pgmsascdc/v_023/casstat/casstat_logselect_examples08.htm

 

Thanks in advance,

 

Andreas

 

ods noproctitle;

proc logselect data=CASUSER.PVA97NK_26_VIYA_PARTITION;
partition fraction(validate=0.3);
class DemCluster DemGender DemHomeOwner StatusCat96NK;
model TARGET_B(event='1')=DemCluster DemGender DemHomeOwner StatusCat96NK
DemAge DemMedHomeValue DemMedIncome DemPctVeterans GiftAvg36 GiftAvgAll
GiftAvgCard36 GiftAvgLast GiftCnt36 GiftCntAll GiftCntCard36 GiftCntCardAll
GiftTimeFirst GiftTimeLast 'Partition Indicator'n PromCnt12 PromCnt36
PromCntAll PromCntCard12 PromCntCard36 PromCntCardAll StatusCatStarAll /
link=logit clb;
selection method=stepwise
(stop=sbc choose=sbc) hierarchy=none;
output out=CASUSER.sot predicted;
run;

 

ods noproctitle;

proc logselect data=CASUSER.PVA97NK_26_VIYA_PARTITION;
partition fraction(validate=0.3);
class DemCluster DemGender DemHomeOwner StatusCat96NK;
model TARGET_B(event='1')=DemCluster DemGender DemHomeOwner StatusCat96NK
DemAge DemMedHomeValue DemMedIncome DemPctVeterans GiftAvg36 GiftAvgAll
GiftAvgCard36 GiftAvgLast GiftCnt36 GiftCntAll GiftCntCard36 GiftCntCardAll
GiftTimeFirst GiftTimeLast 'Partition Indicator'n PromCnt12 PromCnt36
PromCntAll PromCntCard12 PromCntCard36 PromCntCardAll StatusCatStarAll /
link=logit clb;
selection method=stepwise
(stop=sbc choose=sbc) hierarchy=none;
output out=CASUSER.sot predicted;
run;
ods noproctitle;

proc logselect data=CASUSER.PVA97NK_26_VIYA_PARTITION;
	partition fraction(validate=0.3);
	class DemCluster DemGender DemHomeOwner StatusCat96NK;
	model TARGET_B(event='1')=DemCluster DemGender DemHomeOwner StatusCat96NK 
		DemAge DemMedHomeValue DemMedIncome DemPctVeterans GiftAvg36 GiftAvgAll 
		GiftAvgCard36 GiftAvgLast GiftCnt36 GiftCntAll GiftCntCard36 GiftCntCardAll 
		GiftTimeFirst GiftTimeLast 'Partition Indicator'n PromCnt12 PromCnt36 
		PromCntAll PromCntCard12 PromCntCard36 PromCntCardAll StatusCatStarAll / 
		link=logit clb;
	selection method=stepwise
     (stop=sbc choose=sbc) hierarchy=none;
	output out=CASUSER.sot predicted;
run;

 

4 REPLIES 4
PaigeMiller
Diamond | Level 26

The documentation at your link says: 

 

This documentation is for a version of the software that is out of support. Select a version from the version selector in the banner, or access the latest documentation.

 

At this link: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/casstat/casstat_logselect_toc.htm there is no ODDSRATIO statement.

--
Paige Miller
StatDave
SAS Super FREQ

An ODDSRATIO statement is available in PROC LOGSELECT in recent versions of SAS Viya.

andreas_zaras
Pyrite | Level 9
What about sas viya for learners?
StatDave
SAS Super FREQ

It should work there since I believe it will give you access to the current or recent release of SAS Viya.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 503 views
  • 3 likes
  • 3 in conversation