Help using Base SAS procedures

PROC REG - question on interactions and MIANALYZE

Reply
N/A
Posts: 0

PROC REG - question on interactions and MIANALYZE

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?
Super Contributor
Posts: 281

Re: PROC REG - question on interactions and MIANALYZE

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
N/A
Posts: 0

Re: PROC REG - question on interactions and MIANALYZE

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;
Ask a Question
Discussion stats
  • 2 replies
  • 307 views
  • 0 likes
  • 2 in conversation