BookmarkSubscribeRSS Feed
pamelated
Calcite | Level 5

I'm currently running a surveylogistic regression with a binary by variable. I'd like to compare the coefficients beween the two models (ie when the by variable =1 versus when the by variable =0). Below is an example of the code:

 

proc surveylogistic data=data1;
by b;
model y (desc) = x1 x2 x3;
cluster x4;
run;

Where both b and y are binary 0/1 variables.

 

The output shows two separate regressions, one for when b=0 and one for when b=1. Again, I'd like to compare the coefficients across those two regressions, but can't seem to figure out how. I do not want to simply include interactions between b and all the x variables, as I'd like the regressions to be separate.

 

Does anyone know how to do this?

Thanks in advance!!!

1 REPLY 1
SteveDenham
Jade | Level 19

 

Why do the regressions separately if you wish to test for differences between the two instances?  That just doesn't make sense to me.  The interaction method should give you exactly what you need.

 

Steve Denham

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!

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.

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