Hi Jim, Laura, Walter, David, Wayne:
Thanks very much for writing and offering help.
I figured out the reason for the occasional difference between SAS Proc Glimmix and the Stata melogit command.
First, SAS uses the RSPL method by default (maximizing residual log pseudo-likelihood) and Stata uses quadrature, with a default of 7 quadrature points.
Stata does not change the number of quadrature points, unless the programmer specifies other values.
For GLMM, I have always used Proc Glimmix with Method=Quad (Adaptive Gaussian Quadrature). With this method, SAS will compute the number of quadrature points for the specific analysis situation. By running "Proc Glimmix Method=Quad(qpoints=7)", I got the same results as the melogit command in Stata.
Example Syntax:
proc glimmix data=RectalCancer method=quad NOCLPRINT;
Where CRM_AB NE 9;
class PUF_FACILITY_ID complianceAB(Ref='0');
model CRM_AB(Event='1') = complianceAB/ dist=binary link=logit solution CovB; /* Ref=Negative */
random int/subject=PUF_FACILITY_ID Solution;
covtest 0;
Ods Output ParameterEstimates=CRM_PosMar_FixedEffects SolutionR=CRM_PosMar_RandEffects CovB=CRM_CovB;
run;
Stata: melogit CRM_AB i.complianceAB || PUF_FACILITY_ID:
------------------------------
Brandy Sinco, BS, MA, MS
Statistician Senior
Michigan Medicine
------------------------------