BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
knighsson
Obsidian | Level 7

Hello,

in my code below, I assign (diabetes=1 and type=2) as diagnosis=2, which represents Type 2 diabetes, and use proc surveylogistic  statement to investigate the relationship between the Type 2 diabetes and gender. 

 

Then, I assign(diabetes=1 and type=2) as diagnosis=1 (so diagnosis =1 represent type 2 diabetes now), and use the same proc surveylogistic statement to investigate the relationship. 

 

The inferential analysis results are different, which indicate that it matters whether diagnosis=1 or diagnosis =2 represents type 2 diabetes. So I want to ask should I use diagnosis=1 or diagnosis =2 represent type 2 diabetes. Which one would SAS consider as default control group?

 

Thank you!

DATA nh.A;
SET nh.A;
IF (diabetes=1 and type=2) then diagnosis=2; **** have T2D diabetes;
else diagnosis=1;
run;

*** variable diagnosis specified type of diabetes T2D;

*** SLR;
proc surveylogistic data=nh.A nomcar;
class gender / param=glm;
    strata SDMVSTRA;
    cluster SDMVPSU;
    weight glucwt4yr;
domain eligible;
model diagnosis=gender/ vadjust=none link=glogit;
lsmeans gender / cl oddsratio adjust =tukey;
run; 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The default behavior will assign the 'last' value as the "reference". You have several options to control that such as

Descending, sets the largest value as reference, Event= First or Last , reference='variable value' or keywords first and last.

 

The specific value doesn't matter as much as interpreting the results correctly using the reference value. Changing the value range with the same code may result in changes in direction but at core the result is the same.

 

I think you may be a bit cavalier in the way Type 1 diabetes is being treated though. You might consider using your Diabetes variable as the response and include Type in model as well as a class variable.

View solution in original post

2 REPLIES 2
ballardw
Super User

The default behavior will assign the 'last' value as the "reference". You have several options to control that such as

Descending, sets the largest value as reference, Event= First or Last , reference='variable value' or keywords first and last.

 

The specific value doesn't matter as much as interpreting the results correctly using the reference value. Changing the value range with the same code may result in changes in direction but at core the result is the same.

 

I think you may be a bit cavalier in the way Type 1 diabetes is being treated though. You might consider using your Diabetes variable as the response and include Type in model as well as a class variable.

knighsson
Obsidian | Level 7

Thank you!

This is very helpful!

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 332 views
  • 1 like
  • 2 in conversation