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
- /
- SAS Programming
- /
- SAS Procedures
- /
- PROC REG - question on interactions and MIANALYZE

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

02-26-2009 02:15 PM

We are working with a linear regression model that includes interaction terms. The regression output in SAS gives us parameter estimates for the interaction term, but my question is what if we wanted to look at the different contrasts between the two variables.

Example:

Interaction treat*sex. treat has two levels exp and control. our output gives the estimate for treat*sex but what about the estimates for exp*sex and control*sex?

In other procs I know there are options available such as the contrast, estimate and lsmeans statements. Is there something similar in proc reg? We have solved this problem by writing some code but wanted to know if there was an option built into proc reg that we were not aware of.

Secondly, if there was how would we then summarize the data using proc mianalyze?

Example:

Interaction treat*sex. treat has two levels exp and control. our output gives the estimate for treat*sex but what about the estimates for exp*sex and control*sex?

In other procs I know there are options available such as the contrast, estimate and lsmeans statements. Is there something similar in proc reg? We have solved this problem by writing some code but wanted to know if there was an option built into proc reg that we were not aware of.

Secondly, if there was how would we then summarize the data using proc mianalyze?

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

02-26-2009 02:29 PM

There is no CONTRAST, ESTIMATE or LSMEANS statement in PROC REG.

Which leads me to ask, why don't you use PROC GLM or PROC MIXED or PROC GLIMMIX for this purpose? Message was edited by: Paige

Which leads me to ask, why don't you use PROC GLM or PROC MIXED or PROC GLIMMIX for this purpose? Message was edited by: Paige

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

02-27-2009 10:47 AM

Yes, I can definitely use proc glm but I am not sure how to then use MIANALYZE and summarize the lsmeans for all 5 imputations.

My model looks like this with txcode_ybocv26 and txcode_sex as my interaction terms:

proc reg data=yboc outest=outreg5 covout;

model ybocv8 = txcode ybocv26 comorbiddx sri2 qlqapv56 sex txcode_ybocv26 txcode_sex/clb; weight weight;

by _imputation_;

title "FINAL MODEL";

run;

proc mianalyze data=outreg5;

modeleffects intercept txcode ybocv26 comorbiddx sri2 qlqapv56 sex txcode_ybocv26 txcode_sex;

run;

My model looks like this with txcode_ybocv26 and txcode_sex as my interaction terms:

proc reg data=yboc outest=outreg5 covout;

model ybocv8 = txcode ybocv26 comorbiddx sri2 qlqapv56 sex txcode_ybocv26 txcode_sex/clb; weight weight;

by _imputation_;

title "FINAL MODEL";

run;

proc mianalyze data=outreg5;

modeleffects intercept txcode ybocv26 comorbiddx sri2 qlqapv56 sex txcode_ybocv26 txcode_sex;

run;