BookmarkSubscribeRSS Feed
Ashwini_uci
Obsidian | Level 7

Hi ,

I have a 4 level- variable that I want to use as one of the independent variable (renalicd9 ) in proc logiotic model,

The variable is coded as

0, (Normal renal finction)

1- Stage 3 chrnoic renal disease

2. Stage 4 chrnoic renal disease

3- Stage 5 chr rnal dis with dialysis.

I want to obtain the Odds ratio for mortality (variable "died")  for each of this category compared against those with normal renal function.(code = 0)

Can I use this multilevel variable as it is in the regression model or should I convert into 3 separate binary variables (coded as 0 and 1) and the run 3 different models?

What would give me  correct results?

At present after including the multilevel variable (highlighted) the the SAS code looks like this:

proc logistic data =library.nismicathcabg4 descending;

class  female  (ref= first) renalicd9 (ref=first) dm dmcx htn_c  aids alcohol ANEMDEF arth race1(ref=first)  ZIPINC_QRTL(ref=first) hosp_location h_contrl(ref=first) hosp_teach

bldloss chf chrnlung coag depress drug hypothy liver lymph lytes mets neuro obese para perivasc psych pulmcirc renlfail tumor

ulcer valve wghtloss cararrhythmia/param=ref;

model died=  age female dm dmcx htn_c  aids alcohol ANEMDEF arth  race1 zipinc_qrtl hosp_location h_contrl hosp_teach  TOTAL_DISC

bldloss chf chrnlung coag depress drug hypothy liver lymph lytes mets neuro obese para perivasc psych pulmcirc renalicd9 tumor ulcer valve wghtloss cararrhythmia;

weight discwt;

title 'Logi Reg in-hosp mortality vs renalicd9 in MI patients with race + income';

run;

quit;

The output i got after running this is attached here..

Thanks

2 REPLIES 2
Reeza
Super User

Recoding as binary is effectively what SAS does.


See the design matrix for the variable recoded on page1/2 of your output and your estimates on page 10.

YOU DO NOT NEED TO RUN THREE DIFF MODELS.

Ashwini_uci
Obsidian | Level 7

Thanks Reeza. Yes, I already had a look at the design variables and estimates and it looks good. But as i never used a multilevel indepedent variable in the model before, just wanted to confirm if it is alright to do and if the results are correct.

So, great, it means i can report the 3 Odds Ratios from page 10 of the output..

Thanks much.

Ashwini

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 1197 views
  • 0 likes
  • 2 in conversation