Type of Tool  SAS Macro 
Title  Mixed Effects Binary 
Programmer/Email  PeterBacchetti, RossBoylan 
Contributing Site  UCSF 
Description 
This macro analyzes binary outcomes and tests for the possibility that each case has an unobserved random effect. This is standard logistic regression augmented with a casespecific random intercept, as would be appropriate for clustered observations, for example. The macro estimates the variance of the random intercept and tests the null hypothesis that the variance is zero (i.e., that there is no random intercept). The test is a likelihood ratio test, modified to account for the fact that zero is at the boundary of the range of possible values for the variance [REFERENCE: Stram DO, and Lee JW. Variancecomponents testing in the longitudinal mixed effects model. Biometrics 50, 11711177, 1994]. This is a mixed model, because it combines userspecified fixed effects with a random intercept. Currently, the macro does not create publication quality output. You should check the SAS log to confirm that the model converged properly. To improve execution speed and convergence, this macro uses starting values defined as the estimated coefficients from same model but without the random intercept. 
Example  Example code 
Classification Graph Type 

References 

Datasets 

Data 

Software Program  SAS 
Software  SAS 
Macro Parameters 

RCode  Attachment 

RCode 

SASCode  Attachment  UCSF_Mixed Effects Binary_Main Macro 
SASCode 

StataCode  Attachment 

StataCode 

Other Code  Attachment 

Other Code 

Called Data Manipulation 

Called Tool/Utility 

Called Checking Macro 

Called Other 

CreationDate 

RevisionDate 

Example Code  SAS Example Code 
Example Output 

SAS Examples 

SAS_Example_Code  UCSF_Mixed Effects Binary Test Logimix_SAS Example Code 
SAS_Example_Output 

R Examples 

R_Example_Code 

R_Example_Output 

Stats Examples 

Special Features 

Special Features Attached 

Special Features Text 

Notes1Legend  Section with calls to needed macros 
Notes1 

Notes2Legend  Macro call with fully specified parameters 
Notes2 

Notes3Legend  Section with definitions of global macro parameters 
Notes3 

Notes4Legend  Section with definitions of local macro variables 
Notes4 

See Also 
Possible further work * Add assumptiontesting features of the main (fixed effects) logistic macro, as applicable. * Create postprocessing companion macros to produce publicationready output and linked and highlighted html output. 
Checklists 

Stat Tools Disclaimer 

Discliamer 
The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated. 
Permission 
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
Reference Image 
