covtest /wald;

## 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.

http://www.doe.k12.de.us/cms/lib09/DE01922744/Centricity/Domain/91/MA1275TAFINAL508.pdf

## STDCOEF to request standardized coefficients from PROC GLIMMIX

proc glimmix data=qc2 METHOD=RSPL;
class group_ID;
model Y = X
run;

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;
random int / subject = CAMPUS_14;
covtest /wald;
output out=gmxout_alglog residual=resid;
RUN;

## PROC datasets (to delete datasets)

proc datasets library = work kill nolist;
quit;

## 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.

http://support.sas.com/resources/papers/proceedings12/332-2012.pdf

glimmix data=xxx METHOD=RSPL  ITDETAILS;
class  xxx;
model xxx=  xxx
random int / subject = xxx;
NLOPTIONS MAXITER=100;
run;

## Tables available from PROC GLIMMIX

-------------
Name: ModelInfo
Label: Model Information
Template: Stat.Glimmix.ModelInfo
Path: Glimmix.ModelInfo
-------------

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

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

-------------
Name: Dimensions
Label: Dimensions
Template: Stat.Glimmix.Dimensions
Path: Glimmix.Dimensions
-------------

-------------
Name: OptInfo
Label: Optimization Information
Template: Stat.Glimmix.OptInfo
Path: Glimmix.OptInfo
-------------

-------------
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.

-------------
Name: ConvergenceStatus
Label: Convergence Status
Template: Stat.Glimmix.ConvergenceStatus
Path: Glimmix.ConvergenceStatus
-------------

-------------
Name: FitStatistics
Label: Fit Statistics
Template: Stat.Glimmix.FitStatistics
Path: Glimmix.FitStatistics
-------------

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

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

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

## SAS PROC GLIMMIX method=

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

http://support.sas.com/resources/papers/proceedings11/342-2011.pdf

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 "";
class GROUPING_D_RISK_PT;

model &out
=
GROUPING_D_RISK_PT

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