BookmarkSubscribeRSS Feed
Statooed
Calcite | Level 5

Dear All,

While using PROC NLMIXED  or GEE is there a specific way the clustering variable should be coded.

Does coding effects the results. For instance say I have  subject=PHYSICIAN in my PROC NLMIXED option or repeated subject=PHYSICIAN in PROC GEE will it effect my results or will it create issues with convergence if I code PHYSICIAN as (1,2,3,4) or PHYSICIAN as (64055, 65471,56432).

If it does effect then how can I change the coding scheme for a variable in SAS. As currently my PHYSICIAN is coded with  5 digit numeric codes (eg physician A has code 64055, physican B has code 65275 and so on). There are 58 physicians (clusters) and the cluster size (number of patients being treated by each physician) varies from 1 to 39.

Looking forward for your ocmments and suggesitons.

Best Regards,

Tasneem

1 REPLY 1
SteveDenham
Jade | Level 19

So long as the clustering variable is explicitly included in the CLASS statement, it should be OK.  I worry somewhat about the 'repeated' statement, but I believe you will be using PHYSICIAN as in SUBJECT=PHYSICIAN part.  If not, then careful consideration needs to be made as to the possible covariance structures and the effect of coding on them.

Steve Denham

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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