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

Hi all,

I am working on a national database looking at continuous outcome and many independent predictors like age, race group, income category, insurance status, etc. So my predictors are a mix of  continuous and categorical variables. I need to check which of these variables are significant precitors and also get the 95% CIs for these predictors.

 

I used Proc GLM to test the association but I am finding difficulty in getting the 95% CIs for the independent predictors. I would appreciate if anyone can help me with this.

 

Also is there a way I can control the which category within a variables (eg. Race ) will be a reference category just like proc logistic?

ods rtf;
proc sort data = ulcer; by descending ulcernew descending agecat1 descending Racecat  descending INCCAT1 
descending INSURE descending MARRIED1 descending smoke1 descending backpain4 descending diabetes; run;
* Multiple linear regression;
proc glm data = ulcer order=data;
  class ulcernew agecat1 Racecat INCCAT1 INSURE MARRIED1 smoke1 backpain4 diabetes;
  model pcs36v2 mcs36v2 pf36 mh36 re36 rp36 sf36a vt36 
      = agecat1  Racecat INCCAT1 INSURE MARRIED1 smoke1 backpain4 diabetes ulcernew / solution ss3;
run;
quit;
ods rtf close;

 

Thanks,

Sat

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Yes. In the CLASS statement use the REF= option in parentheses to define the reference level:

 

class  Racecat(ref="white") MARRIED1(ref="yes") ...;

 

As for the confidence intervals, I assume that you want 95% CIs for the parameter estimates. Use the CLPARM option on the MODEL statement:

 

model pcs36v2 ... = agecat1  ... / solution ss3 CLPARM;

 

 

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

Yes. In the CLASS statement use the REF= option in parentheses to define the reference level:

 

class  Racecat(ref="white") MARRIED1(ref="yes") ...;

 

As for the confidence intervals, I assume that you want 95% CIs for the parameter estimates. Use the CLPARM option on the MODEL statement:

 

model pcs36v2 ... = agecat1  ... / solution ss3 CLPARM;

 

 

smunigala
Obsidian | Level 7

Hi Rick,

Thanks for the reply. I am getting the 95% CIs for the parameters, but when I assign the ref=option, I think it is not working. Ref=option should be highlighted in blue right? It is not in my code. Do I have any error? I use SAS 9.4.

 

Thanks,

Sat

proc glm data = ulcer;
  class ulcernew agecat1 Racecat(ref="Black") INCCAT1 INSURE MARRIED1 (ref="1") smoke1 backpain4 diabetes;
  model pcs36v2 
      = agecat1  Racecat INCCAT1 INSURE MARRIED1 smoke1 backpain4 diabetes ulcernew / solution ss3 CLPARM;
run;
quit;

 

 

Rick_SAS
SAS Super FREQ

Don't worry about the color. It works. Run it and you'll see.

 

FYI, suboptions do not always get coloration in the text editor. For example the following uses the WHERE= data set option, which is a valid option but is not colored blue in my version of SAS Windowing Environment (DMS), although the WHERE= (and REF=) statements are colored blue in SAS Studio and in this Support Communities window:

 

proc glm data=sashelp.class(where=(weight<200));
class sex(ref="M");
model weight = height | sex / solution;
run;

 

smunigala
Obsidian | Level 7

Thank you so much!

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
  • 4 replies
  • 10458 views
  • 2 likes
  • 2 in conversation