BookmarkSubscribeRSS Feed
Pt_Prof
Calcite | Level 5

Hello

 

I am looking at the interaction between age (dichotomized as above OR below 65 years) and sex (men versus women) on the functional outcomes of therapy. In my model, I would like to insert 3 independent variables: age sex agexsex

 

While creating the interaction variable, I just created a column of data representing agexsex. Following this, I conducted regression analysis using SAS code:

 

Proc reg data = Knee_gender_interaction2;
model IADL_6months = age sex agexsex/stb clb;
model functions_6months = age sex agexsex/stb clb;

run;

 

The problem I run into is that SAS is not allowing me to get the beta estimate for the interaction term agexsex, by suggesting that the age-sex is the linear product of age and sex which are also present in the model. 

 

I read somewhere that I should create a summy variables to test the effect of all 3 independent variables: age, sex, and agexsex.

 

Can somebody suggest teh SAS coding for creating the dummay variable and subsequent regression model?

 

Thank you much.

 

Saurabh

3 REPLIES 3
Reeza
Super User
Have you tried proc GLM with CLASS variables?
thwasser
Calcite | Level 5

Did you create your sex indicator as a {0 ,1 } indicator? If not, do so-- and use this new sex indicator to also create your interaction product. Then retry in proc reg.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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
  • 3 replies
  • 1407 views
  • 0 likes
  • 4 in conversation