BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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?
2 REPLIES 2
Paige
Quartz | Level 8
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
deleted_user
Not applicable
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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1106 views
  • 0 likes
  • 2 in conversation