Example: tourism industry

An Introduction to Generalized Linear Mixed Models Using ...

Copyright 2008, SAS Institute Inc. All rights Introduction to Generalized Linear Mixed Models Using SAS PROC GLIMMIXPhil GibbsAdvanced Analytics ManagerSAS Technical SupportNovember 22, 2008UC RiversideCopyright 2008, SAS Institute Inc. All rights We Will Cover Today What is PROC GLIMMIX and how do I get access to the procedure? What does the procedure do and how does it compare to PROC Mixed ? What are the new features in PROC GLIMMIX? Are there any pitfalls in Using PROC GLIMMIX?Copyright 2008, SAS Institute Inc. All rights first .. Let s talk about SAS Technical SupportCopyright 2008, SAS Institute Inc. All rights Can contact Tech Support? Available to all SAS customers Free, Unlimited Support Telephone: (919)-677-8008 Email: Web: 2008, SAS Institute Inc. All rights is Tech Support Available?

Tech Support is a career at SAS Statistics Group – average of 12 years experience in tech support Talk to an actual live person

Tags:

  Introduction, Linear, Mixed, Generalized, An introduction to generalized linear mixed

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of An Introduction to Generalized Linear Mixed Models Using ...

1 Copyright 2008, SAS Institute Inc. All rights Introduction to Generalized Linear Mixed Models Using SAS PROC GLIMMIXPhil GibbsAdvanced Analytics ManagerSAS Technical SupportNovember 22, 2008UC RiversideCopyright 2008, SAS Institute Inc. All rights We Will Cover Today What is PROC GLIMMIX and how do I get access to the procedure? What does the procedure do and how does it compare to PROC Mixed ? What are the new features in PROC GLIMMIX? Are there any pitfalls in Using PROC GLIMMIX?Copyright 2008, SAS Institute Inc. All rights first .. Let s talk about SAS Technical SupportCopyright 2008, SAS Institute Inc. All rights Can contact Tech Support? Available to all SAS customers Free, Unlimited Support Telephone: (919)-677-8008 Email: Web: 2008, SAS Institute Inc. All rights is Tech Support Available?

2 New Problems 9:00 AM - 8:00 PM ET (limited support from 6:00-8:00 PM) Tracked Problems 9:00 AM - 5:00 PM ET Emergencies (system down situations) 24 hour supportCopyright 2008, SAS Institute Inc. All rights sets SAS Tech Support Apart? Tech Support is a career at SAS Statistics Group average of 12 years experience in tech support Talk to an actual live personCopyright 2008, SAS Institute Inc. All rights Back to GLIMMIXC opyright 2008, SAS Institute Inc. All rights is PROC GLIMMIX? PROC GLIMMIX is a procedure for fitting Generalized Linear Mixed Models GLiM s (or GLM s) allow for non-normal data and random effects GLiM s allow for correlation amongst responsesCopyright 2008, SAS Institute Inc. All rights can I access PROC GLIMMIX? SAS Download add-on (Windows, Unix, Linux) from Supported on a limited number of platforms and platform configurations SAS (available now for most academic sites)Copyright 2008, SAS Institute Inc.

3 All rights Supported in PROC GLIMMIX Discrete Binary Binomial Poisson Geometric Negative Binomial Multinomial (nominal and ordinal) Continuous Beta Normal Lognormal Gamma Exponential Inverse Gaussian Shifted TDistributions specified through DIST= (and LINK=) options on the MODEL statementCopyright 2008, SAS Institute Inc. All rights : PROC GLIMMIX vs. PROC MIXEDPROC GLIMMIXPROC MIXEDBYBYCLASSCLASSCONTRAST CONTRASTEFFECT ESTIMATEESTIMATEFREQIDIDLSMEANSLSMEANSLS MESTIMATEMODELMODELNLOPTIONSOUTPUTPARMSP ARMSPRIORRANDOMRANDOMREPEATEDWEIGHTWEIGH T<Programming Statements>Ooops!Did we miss something?Copyright 2008, SAS Institute Inc. All rights and R-side Random Effects in Mixed and GLIMMIX Mixed uses RANDOM statement for G-side effects and REPEATED statement for R-side 2008, SAS Institute Inc.

4 All rights and R-side Random Effects in Mixed and GLIMMIXBoth types of effects are specified with the RANDOM statement in GLIMMIXG-SideR-SideCopyright 2008, SAS Institute Inc. All rights are G- and R-side Random Effects? Remember from Mixed Models : Y = X*Beta + Z*Gamma + E G-side effects enter through Z*Gamma R-side effects apply to the covariance matrix on E G-side effects are inside the link function, making them easier to interpret and understand R-side effects are outside the link function and are more difficult to interpretCopyright 2008, SAS Institute Inc. All rights PROC GLIMMIX Is Not .. PROC GLIMMIX is NOT PROC Mixed with a DIST= and LINK= option PROC GLIMMIX is NOT a direct replacement for the %GLIMMIX macro PROC GLIMMIX has its own set of specialized options and features not found in other procedures or macrosCopyright 2008, SAS Institute Inc.

5 All rights Example: Logistic Regression with Random Effect Observed a binary response Y on 3 groups of patients (j= 1 to 3) 10 patients in each group Each patient could have received 1 of 3 treatments (i=1 to 3) Two covariates X1 and X2 Assume patient group is a random effect LOG(p/(1-p)) = B0 + TRTi + B1*X1 + B2*X2 + GRPj GRPj ~ N(0,SIGMA**2)Copyright 2008, SAS Institute Inc. All rights Example: Simulating DataCopyright 2008, SAS Institute Inc. All rights Example: The DataCopyright 2008, SAS Institute Inc. All rights Example: PROC GLIMMIX CodeOops!Copyright 2008, SAS Institute Inc. All rights Example: Specifying the LINK= and DIST= OptionsYou will not get the correct model without the LINK=and DIST=options!Copyright 2008, SAS Institute Inc. All rights Example: OutputCopyright 2008, SAS Institute Inc.

6 All rights Example: Output (cont.)Where are the information criteria statistics???This model estimated Using pseudo-likelihood, so no IC s availablePseudo-likelihoods are not comparable across modelsCopyright 2008, SAS Institute Inc. All rights Example: Quadrature ApproximationMETHOD=QUAD uses Quadrature to approximate the likelihood, ala PROC NLMIXEDQ uadrature only works on subset of Models that GLIMMIX can fitCopyright 2008, SAS Institute Inc. All rights Example: Quadrature OutputCopyright 2008, SAS Institute Inc. All rights Example: Adding Odds Ratios and Predicted ProbabilitiesOdds RatiosPredicted ProbabilitiesCopyright 2008, SAS Institute Inc. All rights Example: Odds Ratio OutputCopyright 2008, SAS Institute Inc. All rights Example: Predicted Probabilities OutputStatistics on Predicted ProbabilitiesInterpretation depends on the distribution and link function usedCopyright 2008, SAS Institute Inc.

7 All rights Features in GLIMMIX: EFFECT Statement The EFFECT statement allows you to create constructed effects from sets of columns in the design matrix COLLECTION effects allow you to collect one or more columns and create a single effect for testing and inference with multiple df MULTIMEMBER effects allow for effects with possibly more than one nonzero column for an observation SPLINE effects POLYNOMIAL effects for multivariate polynomialsCopyright 2008, SAS Institute Inc. All rights : Creating Spline EffectsTwo groups of data measured on X and Y Copyright 2008, SAS Institute Inc. All rights : Plotting the DataCopyright 2008, SAS Institute Inc. All rights : Fitting the Spline ModelEFFECT statement fits b-spline of degree 3 with 7 knot pointsCopyright 2008, SAS Institute Inc. All rights : Seeing the FitCopyright 2008, SAS Institute Inc.

8 All rights Statement: Polynomial Effects Polynomial effects provide a programatic way to express polynomial fits in a model model y = x1 x2 x3 x1*x1 x1*x2 x1*x3 x2*x2 x2*x3 x3*x3; effect MyPoly = polynomial(x1-x3/degree=2); model y = MyPoly; Copyright 2008, SAS Institute Inc. All rights Features in GLIMMIX: LSMEANS Statement Options SLICE= gives tests of simple effects Assume a model where A has 4 levels and B has 3 levelsSLICE= will give tests for differences among the levels of B for each level of ACopyright 2008, SAS Institute Inc. All rights Statement: SLICE= Option ResultsCopyright 2008, SAS Institute Inc. All rights Statement Options: SLICEDIFF= Use SLICEDIFF= to explore the differences in the levels of one effect inside the levels of another effectCopyright 2008, SAS Institute Inc. All rights Statement: SLICEDIFF= Option ResultsWithin each level of A we get pairwise comparisons of the levels of BUse the PDIFF= option to get multiplicity adjustments within each level of ACopyright 2008, SAS Institute Inc.

9 All rights Features in GLIMMIX: LSMESTIMATE Statement Allows ESTIMATES that involve coefficients on the LSMEANS rather than on the parameter estimates Can dramatically shorten the length and complexity of an ESTIMATE statementCopyright 2008, SAS Institute Inc. All rights Statement Syntax[ coefficient level_of_effect_A level_of_effect_B ] Copyright 2008, SAS Institute Inc. All rights Features in GLIMMIX: Multiplicity Adjustments in ESTIMATE Statement Multiple DF contrasts have been allowed before Now the ESTIMATE statement can accept multiple tests within the same statement This family of tests can be adjusted for multiplicityCopyright 2008, SAS Institute Inc. All rights Adjustments on an ESTIMATE StatementCopyright 2008, SAS Institute Inc. All rights Adjustments on an LSMESTIMATE StatementCopyright 2008, SAS Institute Inc.

10 All rights Features in PROC GLIMMIX: ODS Graphics DIFFOGRAM from LSMEANS statement Interaction plots from LSMEANS statement Analysis of means plots from LSMEANS statement (Residual and Box Plots)Copyright 2008, SAS Institute Inc. All rights Diffogram PlotCopyright 2008, SAS Institute Inc. All rights Statement OutputCopyright 2008, SAS Institute Inc. All rights PlotCopyright 2008, SAS Institute Inc. All rights in Working with PROC GLIMMIX Simplify, Simplify, Simplify!!! Just because you can syntactically estimate a model does not mean you will get results or that you should even try to Check your data for sufficient variability before estimating a model NLOPTIONS TECH=NRRIDG for discrete responses Always specify DIST= and LINK= on MODEL statementCopyright 2008, SAS Institute Inc. All rights 2008, SAS Institute Inc.


Related search queries