turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC GLM or PROC REG to get 95%CIs for independent...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2016 01:06 PM

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

Accepted Solutions

Solution

05-09-2016
02:54 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2016 01:59 PM

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;

All Replies

Solution

05-09-2016
02:54 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2016 01:59 PM

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2016 02:19 PM

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;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2016 02:27 PM - edited 05-09-2016 02:29 PM

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;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2016 02:54 PM

Thank you so much!