BookmarkSubscribeRSS Feed
kukie
Fluorite | Level 6

Hi, I am trying to find the estimates related to the effects of  gender on the relationship between two variables. 

I used an estimate statement in the code as follows....

 
proc surveyreg data=nhanes4 order=formatted;
cluster SDMVPSU;
strata SDMVSTRA;
weight WTSH2YR;
class vaper riagendr age race income cigs bmi;
model loglead= vaper|riagendr ridageyr bmxbmI race income cigs/
solution clparm;
format vaper vaperf. riagendr genderf. race racef. income
incomef. cigs cigsf. ;
estimate 'comparing males and females' riagendr -1 1/exp;
title "Model with Gender Interaction Term";
run;
 
somehow, I am not able to get the estimates for males and the estimates for females. Rather, it gives me a single estimate with male as the reference. Is there another way I can code this to give me two separate estimates, one each for male and females?
 
thanks
1 REPLY 1
ballardw
Super User

The statement to get subpopulation estimates in Surveyreg is the DOMAIN statement.

 

You likely would not want the domain variable on the model statement. So if you need an overall plus the subpopulation that would be two calls to proc surveyreg, one without domain and your gender variable on the model and another with domain and gender not on the model. The Estimate statement likely won't make much sense in terms of Domain analysis though.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 481 views
  • 1 like
  • 2 in conversation