BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Niveus
Calcite | Level 5

When I tried to include an interaction term (VTQ200A*income) in the PROC SURVEYLOGISTIC statement, it wouldn't include the ORs for the VTQ200A variable when I stratified it by the income variable using the DOMAIN statement. It would only include VTQ200A when VTQ200A*income was not part of the model.

 

I also tried making another dataset that was exactly same as the other one I was using but had an added variable, VTQ200A_income, that was equal to the interaction term (VTQ200A_income = VTQ200A*income). 

 

I only really learned how to do PROC LOGISTIC and not PROC SURVEYLOGISTIC, so I'm not sure how to account for effect modification and stratification correctly. This was just my attempt using what I learned about PROC LOGISTIC. Since income seems to be an effect modifier of VTQ200A, I want to stratify the analysis by income. Is this even on the right track?

 

proc surveylogistic data=ile.fulldata3; *adjusted model w/o interaction term;
class VTQ200A (ref="2") RIAGENDR (ref="2") race (ref="1")  income (ref="2") PAlevel (ref='1')/param=ref;
model hbp=VTQ200A income palevel RIAGENDR race  RIDAGEYR DBD895;*using this model w/o VTQ200A*income for now;
weight WTINTPRP;
run;
proc surveylogistic data=ile.fulldata3; *adjusted model w/interaction term_test1; class VTQ200A (ref="2") RIAGENDR (ref="2") race (ref="1") income (ref="2") PAlevel (ref='1')/param=ref; model hbp= VTQ200A income RIAGENDR race palevel RIDAGEYR DBD895 VTQ200A*income; *the VTQ200A*income causes the OR for VTQ200A to not show up?; weight WTINTPRP; domain income; run;
data ile.fulldata_int; set ile.fulldata3; VTQ200A_income =VTQ200A*income; run;
proc surveylogistic data=ile.fulldata_int; *adjusted model w/interaction term_test2?; class VTQ200A (ref="2") RIAGENDR (ref="2") race (ref="1") income (ref="2") PAlevel (ref='1')/param=ref; model hbp= VTQ200A income RIAGENDR race palevel RIDAGEYR DBD895 VTQ200A_income; weight WTINTPRP; domain income; run; *VTQ200A isnt in the OR table when I add VTQ200A*income, so I made a new var VTQ200A_income. The ORs are the same as the model without VTQ200A*income;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Niveus
Calcite | Level 5

Never mind, my professor answered the question for me. He said that the interaction term (VTQ200A*income) shouldn't be included in the stratified model. He also said the variable being stratified by (in this case, income) should not be in the MODEL statement because it's in the DOMAIN statement.

View solution in original post

1 REPLY 1
Niveus
Calcite | Level 5

Never mind, my professor answered the question for me. He said that the interaction term (VTQ200A*income) shouldn't be included in the stratified model. He also said the variable being stratified by (in this case, income) should not be in the MODEL statement because it's in the DOMAIN statement.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 532 views
  • 0 likes
  • 1 in conversation