BookmarkSubscribeRSS Feed
tpakhomova
Fluorite | Level 6

Hi, 

 

I am very much a beginner to SAS, and need some help determining if I am coding things correctly, and if my model is valid. I am using PROC GLMSELECT for a multiple linear regression model that has categorical variables (which have more than 2 levels) as explanatory variables. I am examining the relationship between stress scores and sexual health variables.

 

Here is my model:

proc sort data=baseline; by gender;

data baseline; set baseline;
proc GLMSELECT data=baseline;
class gender /PARAM=ref ref=first;
model PSS_score = cons_sex_age rel_commit_all intergen_p_older trans_sex1 ever_threat ever_forced CES_D_dep / selection=stepwise select=SL showpvalues SLE=0.05;
Where gender=0;
title "Stepwise Regression SRH for young women, 0.05";
run;

 

I would like to run one model for women, and one for men (the one posted here is for women). Confounders for this model would include age, sexual orientation, student status, and income. How do I control for these confounders in a PROC GLMSELECT procedure? Would they just be added into the model? Or do I need to recode/run a number of models?

 

Again, I am very new to all this and the answer may be very obvious, so I appreciate any assistance. 

 

Thanks

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Yes, in general you add confounders into the model. You could run separate regresssions for males and females, or alternatively you could combine them into one larger regression where GENDER is in the model (perhaps with interactions with the other variables). All of this is somewhat personal preference how to do this, and of course also depends somewhat on what the data is telling you.

 

The one concern I have about this code is SELECTION=STEPWISE. I point this out because there are many people who think stepwise is a misleading waste of time, and if you go to your favorite internet search engine and search for "problems with stepwise regression", you will have enough to read to keep you busy for a week. More reasonable alternatives to stepwise is the Lasso (SELECTION=LASSO in PROC GLMSELECT) and also my personal preference, Partial Least Squares regression (PROC PLS).

--
Paige Miller
tpakhomova
Fluorite | Level 6
Thank you very much! I will add them in, and also try out LASSO and maybe PROC PLS and see what I get.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 588 views
  • 0 likes
  • 2 in conversation