Calculating Odds Ratios from Logistic Regression Results

One can obtain odds ratios from the results of logistic regression model.  Odds ratios derived are adjusted for predictors included in the model and explains the relationship between two groups (e.g., treatment and control group) and outcome (binary outcome).  I wrote the following Excel document that calculates odds ratio based on logit coefficients from the intercept and the predictor of interest (binary ones: e.g., impact coefficient, gender effect, etc.).

Appendix (p.27) of the following document includes description of odds ratio.

STDCOEF to request standardized coefficients from PROC GLIMMIX

proc glimmix data=qc2 METHOD=RSPL;
class group_ID;
model Y = X
/dist=binomial link=logit s ddfm=kr STDCOEF;

It is not clear how coefficients are standardized.  Based on my investigation, centering is definitely done around the variable's grand mean; however, SD used for standardization is not 1.  When I simulated it, SD was around 0.036 (meaning I created a z-score using mean=0 and STD=0.036 to get the same coefficient off STDCOEF,

Stat test on between-group variance

proc glimmix data=temp2 /*Method=RSPL*/ ;
class  CAMPUS;
model Y=/dist=binomial link=logit s ddfm=kr;
random int / subject = CAMPUS_14;
  covtest /wald;
output out=gmxout_alglog residual=resid;

PROC GLIMMIX non-convergence problem solutions

Tips and Strategies for Mixed Modeling with SAS/STAT® Procedures Kathleen Kiernan, Jill Tao, and Phil Gibbs, SAS Institute Inc., Cary, NC, USA

ABSTRACT Inherently, mixed modeling with SAS/STAT® procedures, such as GLIMMIX, MIXED, and NLMIXED is computationally intensive. Therefore, considerable memory and CPU time can be required. The default algorithms in these procedures might fail to converge for some data sets and models. This paper provides recommendations for circumventing memory problems and reducing execution times for your mixed modeling analyses. This paper also shows how the new HPMIXED procedure can be beneficial for certain situations, as with large sparse mixed models. Lastly, the discussion focuses on the best way to interpret and address common notes, warnings, and error messages that can occur with the estimation of mixed models in SAS software.

glimmix data=xxx METHOD=RSPL  ITDETAILS;
class  xxx;
model xxx=  xxx
/dist=binomial link=logit s ddfm=kr;
random int / subject = xxx;

Tables available from PROC GLIMMIX

Output Added:
Name: ModelInfo
Label: Model Information
Template: Stat.Glimmix.ModelInfo
Path: Glimmix.ModelInfo

Output Added:
Name: ClassLevels
Label: Class Level Information
Template: Stat.Glimmix.ClassLevels
Path: Glimmix.ClassLevels

Output Added:
Name: NObs
Label: Number of Observations
Template: Stat.Glimmix.NObs
Path: Glimmix.NObs

Output Added:
Name: Dimensions
Label: Dimensions
Template: Stat.Glimmix.Dimensions
Path: Glimmix.Dimensions

Output Added:
Name: OptInfo
Label: Optimization Information
Template: Stat.Glimmix.OptInfo
Path: Glimmix.OptInfo

Output Added:
Name: IterHistory
Label: Iteration History
Template: Stat.Glimmix.IterHistory
Path: Glimmix.IterHistory
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
NOTE: At least one element of the gradient is greater than 1e-3.

Output Added:
Name: ConvergenceStatus
Label: Convergence Status
Template: Stat.Glimmix.ConvergenceStatus
Path: Glimmix.ConvergenceStatus

Output Added:
Name: FitStatistics
Label: Fit Statistics
Template: Stat.Glimmix.FitStatistics
Path: Glimmix.FitStatistics

Output Added:
Name: CovParms
Label: Covariance Parameter Estimates
Template: Stat.Glimmix.CovParms
Path: Glimmix.CovParms

Output Added:
Name: ParameterEstimates
Label: Solutions for Fixed Effects
Template: Stat.Glimmix.ParameterEstimates
Path: Glimmix.ParameterEstimates

Output Added:
Name: Tests3
Label: Type III Tests of Fixed Effects
Template: Stat.Glimmix.Tests3
Path: Glimmix.Tests3


The default technique is METHOD=RSPL, corresponding to maximizing the residual log pseudo-likelihood with an expansion about the current solutions of the best linear unbiased predictors of the random effects. In models for normal data with identity link, METHOD=RSPL and METHOD=RMPL are equivalent to restricted maximum likelihood estimation, and METHOD=MSPL and METHOD=MMPL are equivalent to maximum likelihood estimation.


The following SAS Usage Note:


provide information on testing covariance parameters when using PROC MIXED and PROC GLIMMIX.


Using PROC LOGISTIC to Estimate the Rasch Model by Pan and Chen

Can this be right?  If right, it helps reduce the computational demand off the procedure.   Page 4:

"When thousands of persons take a test, the procedure takes a long time to estimate the parameters. It is well known that the Rasch model gives the same parameter estimates for each person who receives the same total score. So, variable ‘person’ is able to be replaced with variable ‘total’ when all examinees answer all items as shown by Nord (2008). After the model is fit, the estimate of the parameter for each person is equal to the estimate of the parameter of the total score corresponding to the person’s total score. The third code example and its output are shown as follows:"

Logistic regression, comparing group means

proc glimmix data=asdf namelen=32;
where disaster_type /*age_desc*/ ne "";

model &out

/solution ddfm=kr dist=binomial link=logit s STDCOEF ;

lsmeans GROUPING_D_RISK_PT / ilink diff;

output out=gmxout residual=resid;
ods output