One of the most expensive pieces of estimating a generalized linear mixed model is evaluating the likelihood function. There are six different methods for taking on this calculation in PROC GLIMMIX that vary from pseudo-likelihood evaluation to estimating the exact likelihood. When choosing from these methods, you need to take into consideration the effects of estimation bias with certain response types. You also need to weigh the cost of the likelihood evaluation. Some of these methods require more memory and run time than others. Finally, depending on which type of model you are working with, you might be limited to a subset of these methods.
A very popular method is to use adaptive quadrature by specifying the METHOD=QUAD option in PROC GLIMMIX. This approach can yield very exact evaluations of the log-likelihood through integral approximation, but that exactness comes at a price. Quadrature is an expensive method to use, both in terms of run time and memory. For some multilevel models, quadrature might not be memory-feasible.
Beginning with SAS/STAT 14.1 in SAS 9.4 TS1M3, the FASTQUAD quad-option for the METHOD=QUAD option can often alleviate long run times and memory constraints. FASTQUAD uses the multilevel adaptive quadrature algorithm proposed by Pinheiro and Chao (2006). For a multilevel model, this algorithm reduces the number of random effects over which the integration of the marginal log-likelihood computation is carried out. This reduction in the dimension of the integral can lead to a substantial reduction in the number of conditional log-likelihood evaluations.
A 2-level model serves as a good example to show how the FASTQUAD method works. The simulation below generates a data set with 500 hospitals, 30 doctors at each hospital and a range of 21-30 patients for each doctor. This data is used to estimate a 2-level random intercept model with a binomial response using PROC GLIMMIX.
If you fit the following model using METHOD=QUAD, the result is an “insufficient resources” or “out-of-memory” message from the procedure:
Prior to the 14.1 release of SAS/STAT, METHOD=LAPLACE might provide a satisfactory alternative. However, with 14.1 we can try the FASTQUAD method as follows:
This second attempt at PROC GLIMMIX dramatically reduces the amount of memory needed to estimate the model, and the procedure complete with no errors.
To understand the big difference in memory requirement, we can look at the computations for quadrature evaluation. The number of conditional log-likelihood evaluation in the quadrature estimation is Nr, where N is the number of quadrature points. For a two-level model, METHOD=QUADRATURE without the FASTQUAD suboption defines the number of random effects as r = r1 + n2r2 where r1 is the number of level-1 random effects and r2 is the number of level-2 random effects within each level-1 subject. For the example above, the number of random effects is r = r1 + n2r2 = 1 + 30*1, since there are one level-1 random effect (the hospital-level random intercept) and one level-2 random effect (the doctor-level random intercept), and there are n2 = 30 doctors within each hospital. When you invoke the FASTQUAD suboption, the number of random effects is r = r1 + r2 = 2.
As a consequence, the number of conditional log-likelihood reduces from 3(1+30) to 3(1+1). One important note is that in order to take advantage of the FASTQUAD method, you need to specify one RANDOM statement for each level. This is shown in the GLIMMIX procedure example above.
The significant reduction in the exponent through FASTQUAD allows the use of more quadrature points, increasing the accuracy of the evaluation of the integral and increasing the accuracy of the log-likelihood.
See the PROC GLIMMIX documentation for additional details.
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | SAS/STAT | z/OS | 14.1 | 9.4 TS1M3 | ||
z/OS 64-bit | 14.1 | 9.4 TS1M3 | ||||
Microsoft® Windows® for x64 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8 Enterprise 32-bit | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8 Enterprise x64 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8 Pro 32-bit | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8 Pro x64 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8.1 Enterprise 32-bit | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8.1 Enterprise x64 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8.1 Pro 32-bit | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 8.1 Pro x64 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows 10 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2008 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2008 R2 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2008 for x64 | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2012 Datacenter | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2012 R2 Datacenter | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2012 R2 Std | 14.1 | 9.4 TS1M3 | ||||
Microsoft Windows Server 2012 Std | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Enterprise 32 bit | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Enterprise x64 | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Home Premium 32 bit | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Home Premium x64 | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Professional 32 bit | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Professional x64 | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Ultimate 32 bit | 14.1 | 9.4 TS1M3 | ||||
Windows 7 Ultimate x64 | 14.1 | 9.4 TS1M3 | ||||
64-bit Enabled AIX | 14.1 | 9.4 TS1M3 | ||||
64-bit Enabled Solaris | 14.1 | 9.4 TS1M3 | ||||
HP-UX IPF | 14.1 | 9.4 TS1M3 | ||||
Linux for x64 | 14.1 | 9.4 TS1M3 | ||||
Solaris for x64 | 14.1 | 9.4 TS1M3 |
Type: | Usage Note |
Priority: | |
Topic: | Analytics ==> Mixed Models SAS Reference ==> Procedures ==> GLIMMIX |
Date Modified: | 2017-10-04 15:06:56 |
Date Created: | 2017-06-20 12:34:04 |