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.

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!

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
  • 1 reply
  • 256 views
  • 1 like
  • 2 in conversation