BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Manhort
Obsidian | Level 7

Hi everyone,

 

 

I have the following code for a logistic regression, 

 

proc logistic data=have descending;
  class var1(ref='3') var2/ param=reference;
  model treatment = var1 var2;
run;

In my model, the treatment one receives IS the outcome variable. 

Now, some people in the data have more than one occasion of receiving treatment for the medical condition in question. There are 20,000 people and 20,500 cases. It is a very small proportion of people with a "cluster" of cases, but I would like to account for it anyway, regarding standard error estimates. Can anyone point me in the direction of the proper code?

 

Thanks

1 ACCEPTED SOLUTION
2 REPLIES 2
svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10
I think you are looking for the PROC GLIMMIX procedure, which allows you to build mixed effects logit models to account for the fact that some of your observations are not independent. It does seem like you should ask yourself why some of these subjects have more than one observation in your data and how that could influence the outcomes. E.g., if there was some kind of cumulative benefit of receiving additional treatments, that could make your sub-set of respondents a biased sample and not just a sample with random error.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1437 views
  • 3 likes
  • 3 in conversation