I am running Proc Logistic and it works perfectly fine. However, I would like to define reference level. For example, I have a categorical variable of "Race" with 4 levels ; Chinese, Malay, Indian and Others. I would like to make SAS reads "Chinese" as my reference but now SAS is reading "Others" as my reference. I am using this statement.
proc logistic data=WORK.IMPORT3 descending; /* SAS treats the levels of Adenovirus_E in a descending order (high to low)*/
class HDB Sick_Season Race Smoker Service;
model Adenovirus_E= HDB Sick_Season Race HDB*Race Smoker Service age_at_date_of_reprot_sick / expb;
run;
Please let me know how to solve this? Many thanks!
Hi @SSin,
Use the REF= option after the variable name in the CLASS statement, e.g.
class HDB Sick_Season Race(ref='Chinese') Smoker Service;
Hi @SSin,
Use the REF= option after the variable name in the CLASS statement, e.g.
class HDB Sick_Season Race(ref='Chinese') Smoker Service;
@SSin wrote:I am running Proc Logistic and it works perfectly fine. However, I would like to define reference level. For example, I have a categorical variable of "Race" with 4 levels ; Chinese, Malay, Indian and Others. I would like to make SAS reads "Chinese" as my reference but now SAS is reading "Others" as my reference. I am using this statement.
proc logistic data=WORK.IMPORT3 descending; /* SAS treats the levels of Adenovirus_E in a descending order (high to low)*/
class HDB Sick_Season Race Smoker Service;
model Adenovirus_E= HDB Sick_Season Race HDB*Race Smoker Service age_at_date_of_reprot_sick / expb;
run;Please let me know how to solve this? Many thanks!
Use the ref= option on the class statement, like this:
proc logistic data=one;
class x (ref='1');
model y=x;
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: