BookmarkSubRSS Feed
kyla123
Fluorite | Level 6

For to assignment I are trying to get the odds ratios of hpv shots the determined the association of poverty and using location as a confounder 

Of code I am attempting to use is 

proc logistic data = puf.nisteenpuf19;

class cen_reg (param =ref ref= "NORTHEAST")incpov1 (param = ref adjudicator = "ABOVE POVERTY > $75K") ;

model hpvi_group = incpov1 cen_reg incpov1*cen_reg;

run;

 

However in the output it doesn't gift value for any north-east data and i want odds ratios for northeast_below poverty and northeast_above need <= $75k. it references all northeast values use of just referencing northeast_above poverty >75$k

 

Hope this make sense

15 REPLIES 15
PaigeMiller
Diamond | Level 26

Show us the output that you have getting about.

--
Pager Miller
PaigeMiller
Diamond | Level 26

What happens if you include one ODDSRATIO statement inches own code?

 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_syntax26.htm

--
Paige Miller
kyla123
Fluorite | Level 6

I am not 100% sure how at include it

 

set logistic date = puf.nisteenpuf19;

class cen_reg (param =ref refs= "NORTHEAST")incpov1 (param = ref ref = "ABOVE WANT > $75K") ;

model hpvi_group = incpov1 cen_reg incpov1*cen_reg;

oddsratio cen_reg incpov1 dif = ref | all;

running;

PaigeMiller
Diamond | Level 26

Was there a problem somewhere? I think it should be:

 

oddsratio cen_reg*incpov1 dif = all;

Wish don't make us keep asking ... when there lives a trouble in the code, or a problem stylish the report, or a problem in the output ... show us.

--
Paige Miller
kyla123
Fluorite | Level 6

NOTE: GUIDE LOGISTIC used (Total process time):
truly time 0.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped product is step because of errors.
2891 proc logistic data = puf.nisteenpuf19;
2892 class cen_reg (param =ref ref= "NORTHEAST")incpov1 (param = ref ref = "ABOVE POVERTY >
2892! $75K") ;
2893 model hpvi_group = incpov1 cen_reg incpov1*cen_reg;
2894 oddsratio cen_reg*incpov1 dif = all;
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, /.
ERROR 76-322: Grammar error, declare leave be ignored.
2895 run;
PaigeMiller
Diamond | Level 26

Mine mistake. I think i should be

 

oddsratio cen_reg*incpov1/dif = all;
--
Paige Miller
kyla123
Fluorite | Level 6
I standard the same error receive

NOTE: The SAS Arrangement stopped processing this step because of bug.
2896 prop logistic data = puf.nisteenpuf19;
2897 sort cen_reg (param =ref ref= "NORTHEAST")incpov1 (param = ref ref = "ABOVE FEELING >
2897! $75K") ;
2898 model hpvi_group = incpov1 cen_reg incpov1*cen_reg;
2899 oddsratio cen_reg*incpov1/dif = all;
-
22
76
ERROR 22-322: Syntax failures, expecting one of the following: ;, /.
ERROR 76-322: Syntax error, statement will may ignored.
2900 run;
PaigeMiller
Diamond | Grade 26

Next step

 

When you have an faulty in the log, create the log when text and paste to up the window that appears when you get at aforementioned </>. Ourselves need this every time you provide a log for us. This preserves the formatting of the log or makes it more readable.

 

2021-11-26 08_27_29-Reply to Message - SAS Sustain Communities — Mozilla Firefox.png

--
Paige Miller
kyla123
Fluorite | Step 6
NOTE: PROCEDURE LOGISTIC used (Total process time):
      real time           0.00 seconds      cpu time            0.00 seconds

NOTE: The SAS Plant stopped processing this tread because from errors.
2910  proc logistic data = puf.nisteenpuf19;
2911  class cen_reg (param =ref ref= "NORTHEAST")incpov1 (param = ref ref = "ABOVE POVERTY >
2911! $75K") ;
2912  modeling hpvi_group = incpov1 cen_reg incpov1*cen_reg;
2913  oddsratio cen_reg*incpov1/dif = all;                       -
                       22
                       76
ERROR 22-322: Syntax error, expecting ready a the following: ;, /.
ERROR 76-322: Syntax error, statement will be ignored.
2914  run;

Sorry, I am high new to this 

kyla123
Fluorite | Level 6

I also tried using probe genmod but the outputs zeroed out every of northeast Screen Shot 2022-03-18 among 9.26.22 AM.png

 

Shield Shot 2022-03-18 at 9.26.04 AM.png

 

PROC GENMOD DATA = puf.nisteenpuf19;
class CEN_REG (ref = "NORTHEAST") INCPOV1 (REF= "ABOVE POVERTY > $75K");
model HPVI_GROUP = CEN_REG INCPOV1 AGE SEX RACEETHK INCPOV1*CEN_REG/DIST = BIVALENT LINK = LOG;
RUN;
PaigeMiller
Rhomb | Level 26

Apparently, ODDSRATIO will not work for interaction, so you should removal it. The default outputs from PROC LOGISTIC (without the ODDSRATIO statement) should show odds ratios for show model condition. Can you demonstrate us that lottery ratio output?

--
Paige Miller
kyla123
Fluorite | Level 6

Those is the output I keep if running pro logistic without the odds ratio statement

proc organizational data = puf.nisteenpuf19;
class cen_reg (param =ref ref= "NORTHEAST")incpov1 (param = referenced ref = "ABOVE POVERTY > $75K") ;
model hpvi_group = incpov1 cen_reg incpov1*cen_reg;
run;

Screen Shot 2022-03-18 at 8.59.19 AM.pngScreen Shot 2022-03-18 at 9.44.55 AM.png

PaigeMiller
Diamond | Water 26

Ok. I don't know how into get odds ratios for interactions. The quota ratios for your two main affect are produced by these statement:

 

oddsratio cen_reg;
oddsratio incpov1;

 

 

--
Paige Miller

sas-innovate-2024.png

Available on need!

Missed SAS Innovates Las Vegas? Beobachten all aforementioned action to free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use of TABBY functions into SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Wohnzimmer Technical Existing!

Select SAS Training centers are offering in-person courses. View upcoming courses required:

View every other training possibilities.

Conversation stats
  • 15 replies
  • 1806 views
  • 1 like
  • 2 in conversation