Great question. One hopes that there are substantial intermediate calculations in both outputs so that you can determine or at least narrow down the reason for the discrepancy. You may well have found a software bug, and I encourage you to look into it further. Sometimes, you can contact tech support at both SAS and Stata, and ask if they have an explanation. I am not suggesting adding to the complexity. Have you tried estimating in R?
------------------------------
Chris Barker, Ph.D.
Adjunct Professor of Biostatistics
University of Illinois Chicago, UIC-SPH
www.barkerstats.com---
"In composition you have all the time you want to decide what to say in 15 seconds, in improvisation you have 15 seconds."
-Steve Lacy
------------------------------
Original Message:
Sent: 04-27-2026 15:38
From: Brandy Sinco
Subject: Compare Results from SAS Proc Glimmix with Stata melogit
Hi Colleagues:
Has anyone run logistic regression models with random effects, using SAS Proc Glimmix and comparing with the Stata melogit command? Sometimes the results are identical and sometimes, there is a small difference, such as an odds ratio of 0.83 in SAS and 0.87 in Stata. Both software use quadrature estimation for logistic regression with random effects.
Does anyone have an ideas about why the results are sometimes slightly different between SAS and Stata?
------------------------------
Brandy Sinco, BS, MA, MS
Statistician Senior
Michigan Medicine
------------------------------