www.srl-journal.org
*1
Abstract
Three methods to construct prediction intervals in a
generalized linear mixed model (GLMM) are the methods
based on pseudo-likelihood, Laplace, and Quadrature
approximations. All three of these methods are available in
the SAS procedure GLIMMIX. The pseudo-likelihood
method involves approximate linearization of the GLMM
into a linear mixed model (LMM) framework, and the other
two methods utilize approximate conditional mean squared
error (MSE) formulas for the empirical best predictor (eBP).
A new method has been proposed based on the
unconditional MSE of the eBP, working entirely within the
GLMM context; then inherent computational challenges
were confronted by proposing a Monte Carlo algorithm to
evaluate the plug-in estimators of the unconditional MSE.
For three illustrated examples, the negative binomial, the
Poisson and the Bernoulli GLMMs, numerical results
showed that our prediction interval methodology improves
the coverage probability over the three methods available in
GLIMMIX. Moreover, our results showed that with
bootstrap adjustments, our method achieves coverage
probabilities satisfactorily close to the nominal level.
Keywords
Count Data; Best Prediction; Pseudo-likelihood; Laplace Approximation
Introduction
The literature on LMMs, including prediction intervals
for linear combinations of the fixed and random effects,
is extensive.
Useful entry points to the classic
literature on this topic include Jiang and Lahiri (2006),
Harville (2008) and McCulloch, Searle and Neuhaus
(2008). The SAS system has implemented much of the
relevant literature on LMMs in the procedure MIXED
(see, for example, Littell et al. (2006) and references
therein).
In contrast, prediction intervals are a less well
developed topic for the important class of GLMMs.
The most well known method is the method
85
www.srl-journal.org
Conditional on si , the observations from the ith cluster { yij }nji=1 are independently distributed
from distributions whose probability functions
are denoted by f ( | ij , )
parameters
c.
f ( yi | si ; ) = f ( yij | ij , ) ,
j =1
86
f ( yi , si ; )dsi ,
L( | y ) = i =1 f ( yi ; )
m
2
M ( ) =
E [ w ( y; ) ] + E ( y; ) ( y;)
= M1 ( ) + M 2 ( ) .
The first term in (2) is simply
=
M1 ( ) E=
[Var ( w | y)] E [Var ( s | y; )]
(2)
(3)
www.srl-journal.org
( y;) z /2 M1 () ,
(5)
the
plug-in
2.
4.
Simulate yi( k ) (=
=
yi(1k ) , , yin( k ) ) , i 1 , , m by
i
Compute q ( y ( k ) ;)
6.
Next k
7.
Return
K
q ( y ( k ) ;) /
k =1
i-th position.
2.
Compute
ij = g 1 ( xij + si ) , i= 1, , m , j = 1 , , ni
3.
4.
3.
y ( k ) = ( y1( k ) , , ym( k ) )
, , m , j 1 , , ni
=
y ( k ) , i 1=
1.
Compute
ij( k ) = g 1 ( xij + si( k ) ) , i = 1, , m ,
Compute
Z k ( y ( k ) ;( k ) ) ( y;) / M (( k ) )
=
if using interval (4) or instead
Z k ( y ( k ) ;( k ) ) ( y;) / M1 (( k ) )
=
if using interval (5)
6.
Next k
7.
respectively,
from
the {Z k }kK=1
quantities
K
8.
www.srl-journal.org
( y;) U
/2 M ( ) , ( y; ) L /2 M ( )
/2 M 1 ( ) , ( y; ) L /2 M 1 ( )
f ( yi ; )
=
0
( yij + 1)( ) ij + ij +
and the typical link function is g (u ) = log u . For our
f ( yij | ij , ) =
( yij + )
= ( 0 , 2 , ) and
f ( yi , si ; ) =
( y + ) yij
ij
ij
j =1 ( y + 1)( ) + + (si ; 2 )
ij
ij
ij
Following the computational summary outlined in the
Appendix, E ( si | yi ; ) can be obtained from (A.1) and
ni
used
to
evaluate ( y;=
) 0 + E ( si | yi ; ) .
The
likelihood function is
L( | y )
+s
m
ni ( yij + ) e 0 i
=i 1 =
j 1
0 + si +
( ) e
yij
0 + si
+
e
( si ; 2 ) dsi
=
( yi ni e 0 + si ) f ( yi , si ; )
+
0
e 0 si +
f ( yi , si ; )
1 si2
=
1 f ( yi , si ; )
2
2
2
88
f ( yi ; )
=
ni
( yij
j =1
+ ) ni ( )
yi ni e 0 + si
f ( yi ; )
=
2
yij
f ( yi , si ; )
=
0 + si
+ ni log + s
i +
0
+
e
e + s
0
f ( yi , si ; )
( yi ni e 0 + si ) f ( yi , si ; ) dsi
1 si2
2 2 2 1 f ( yi , si ; ) dsi
{ j =1 ( yij + ) ni ( )
ni
yi ni e 0 + si
e
0 + si
+ ni log + s
i +
0
+
e
f ( yi , si ; ) dsi
( yi ni e 0 + si )
0 + si
+
e 0 + si
yi ni e 0 + si + + s
ni e 0 + si f ( yi , si ; )
+s
2
e 0 i +
(e 0 i + )
2 f ( yi , si ; )
0
2
1 si2
( yi ni e 0 + si ) f ( yi , si ; )
=
1
2 2 2 e 0 + si +
2 f ( yi , si ; ) ni
= j =1 ( yij + ) ni ( )
0
yi ni e 0 + si
yi ni e 0 + si
+ ni log + s
0 + si
0
i
e
+
+ e
+
e
0 + si
0 + si
e
( yi ni e
)
+
f ( yi , si ; )
0 + si
2
+)
(e
0 + si
2 f ( yi , si ; ) 1 si2
1 si2 1
1
f ( yi , si ; )
=
4 4 2 4 2 2
2 2
2 f ( yi , si ; )
1 si2
n
=
1 ji=1 ( yij + ) ni ( )
2
2
2
yi ni e 0 + si
+ ni log + s
f ( yi , si ; )
0
i
e
+
+
e
2 f ( yi , si ; ) ni
= j =1 ( yij + ) ni ( )
0 + si
yi ni e 0 + si
e 0 + si
+ ni log + s
+
e 0 i +
j =1 ( yij + ) ni ( ) +
ni
yi + ni e2( 0 + si )
(e 0 + si + ) 2
f ( yi , si ; )
Poisson GLMM
y
ij
Here we have f ( yij | =
ij ) exp( ij ) ij / yij ! and the
=
w 0 + si . In this case we have = ( 0 , ) and
2
f ( yi , si ; ) = exp ni e 0 + si + ( 0 + si ) yi
( si ; 2 ) / ji=1 yij ! .
n
The likelihood
function is
m
L( | y ) i =1 exp ni e 0 + si + ( 0 + si ) yi ( si ; 2 )dsi
1 yij
f ( yij =
| ij ) ij ij (1 ij )
and the
f ( yi , si ; ) =
( si ; 2 ) .
(1 + e 0 + si ) ni
to
) 0 + E ( si | yi ; ) .
evaluate ( y;=
The
L( | y ) i =1
m
(1 + e
0 + si ni
( si ; 2 )dsi
equation
(A.2).
Computation
0
1 + e 0 i
f ( yi , si ; )
1 si2
=
1 f ( yi , si ; )
2
2
2
f ( yi ; )
=
0
f ( yi ; )
=
2
ni e 0 + si
1 + e0 + si
1 si2
f ( yi , si ; ) dsi
2 2 2 1 f ( yi , si ; ) dsi .
i 1 + e 0 + si (1 + e 0 + si ) 2
2 0
+
s
2
2
0
i
ne
f ( yi , si ; )
1 si
=
1 yi i + s f ( yi , si ; )
2
2
2
0
i
2
0
1+ e
2
2
2
f ( yi , si ; ) 1 si
1 si
1
=
2 1 4 2 f ( yi , si ; ) .
2 2
4
4
2
Performance Comparisons
We use the illustrative applications in Section 3 to
compare the coverage probability and the expected
width of the proposed prediction interval with the
three alternative methods that are available in SAS.
Section 4.1 briefly reviews what these three methods
are. Section 4.2 outlines the simulation study that was
used to compare the prediction intervals, and the
results of the comparison study are summarized in
Section 4.3.
Prediction Intervals in SAS
directly
likelihood function is
( 0 + si ) yi
www.srl-journal.org
of
www.srl-journal.org
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
2
2
1
2
1
2
1
2
90
(4)
0.900
0.902
0.905
0.899
0.908
0.911
0.905
0.902
0.898
0.894
0.896
0.893
0.901
0.899
0.892
0.893
{.2 , .4} .
(4) w/BS
0.938
0.939
0.936
0.934
0.938
0.940
0.941
0.939
0.943
0.941
0.943
0.942
0.942
0.940
0.941
0.943
(5)
0.885
0.889
0.901
0.896
0.905
0.907
0.899
0.895
0.892
0.889
0.892
0.887
0.895
0.894
0.887
0.890
Prediction Interval
(5) w/BS
SAS/PL
0.933
0.879
0.934
0.873
0.931
0.875
0.928
0.876
0.935
0.869
0.936
0.871
0.939
0.868
0.936
0.873
0.938
0.878
0.937
0.875
0.939
0.872
0.936
0.876
0.937
0.880
0.936
0.882
0.938
0.879
0.939
0.878
SAS/L
0.881
0.875
0.876
0.876
0.871
0.872
0.870
0.874
0.879
0.876
0.873
0.877
0.881
0.883
0.881
0.879
SAS/Q
0.882
0.876
0.876
0.877
0.873
0.872
0.871
0.875
0.881
0.877
0.874
0.879
0.882
0.885
0.882
0.881
www.srl-journal.org
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
2
2
1
2
1
2
1
2
(4)
0.909
0.912
0.914
0.916
0.911
0.915
0.920
0.917
0.915
0.918
0.909
0.907
0.919
0.921
0.920
0.916
(4) w/BS
0.941
0.942
0.939
0.943
0.939
0.942
0.940
0.939
0.943
0.941
0.941
0.938
0.941
0.943
0.940
0.938
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
2
2
1
2
1
2
1
2
(4)
0.916
0.917
0.921
0.923
0.926
0.924
0.915
0.912
0.925
0.928
0.919
0.917
0.918
0.921
0.921
0.925
(5)
0.895
0.909
0.912
0.913
0.908
0.912
0.916
0.915
0.914
0.916
0.905
0.903
0.915
0.918
0.917
0.913
Prediction Interval
(5) w/BS
SAS/PL
0.936
0.892
0.938
0.890
0.935
0.903
0.940
0.906
0.936
0.908
0.940
0.904
0.938
0.898
0.935
0.896
0.942
0.899
0.938
0.901
0.937
0.902
0.935
0.905
0.939
0.897
0.940
0.893
0.938
0.889
0.935
0.901
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
.2
.4
2
2
1
2
1
2
1
2
(4)
0.919
0.923
0.925
0.929
0.930
0.928
0.926
0.923
0.926
0.929
0.925
0.927
0.926
0.925
0.924
0.926
SAS/L
0.894
0.891
0.904
0.906
0.910
0.906
0.901
0.897
0.901
0.902
0.904
0.906
0.899
0.894
0.891
0.903
SAS/Q
0.895
0.891
0.905
0.906
0.911
0.906
0.902
0.899
0.903
0.904
0.905
0.907
0.901
0.896
0.893
0.904
(4) w/BS
0.936
0.938
0.940
0.941
0.939
0.937
0.942
0.938
0.941
0.944
0.942
0.940
0.938
0.941
0.940
0.942
(5)
0.912
0.914
0.919
0.922
0.925
0.923
0.912
0.908
0.922
0.925
0.917
0.915
0.915
0.918
0.920
0.921
Prediction Interval
(5) w/BS
SAS/PL
0.933
0.912
0.935
0.918
0.938
0.909
0.940
0.913
0.937
0.914
0.935
0.918
0.940
0.920
0.936
0.917
0.939
0.915
0.941
0.911
0.940
0.921
0.939
0.918
0.937
0.915
0.938
0.913
0.938
0.907
0.940
0.910
(4) w/BS
0.944
0.948
0.943
0.947
0.948
0.945
0.946
0.945
0.943
0.947
0.942
0.944
0.945
0.944
0.943
0.946
(5)
0.915
0.918
0.924
0.927
0.927
0.926
0.923
0.921
0.925
0.928
0.924
0.926
0.925
0.924
0.923
0.924
SAS/L
0.914
0.920
0.911
0.913
0.915
0.922
0.921
0.919
0.917
0.911
0.922
0.919
0.916
0.916
0.909
0.912
SAS/Q
0.915
0.921
0.912
0.915
0.917
0.924
0.923
0.921
0.919
0.913
0.924
0.919
0.918
0.917
0.910
0.912
Prediction Interval
(5) w/BS
SAS/PL
0.942
0.921
0.946
0.925
0.942
0.918
0.946
0.923
0.945
0.925
0.943
0.924
0.944
0.925
0.942
0.923
0.942
0.929
0.946
0.926
0.941
0.926
0.943
0.921
0.944
0.920
0.942
0.924
0.940
0.919
0.944
0.923
SAS/L
0.922
0.926
0.919
0.923
0.926
0.927
0.926
0.924
0.931
0.927
0.927
0.923
0.920
0.924
0.921
0.923
SAS/Q
0.924
0.926
0.921
0.924
0.926
0.929
0.927
0.926
0.932
0.927
0.929
0.925
0.923
0.925
0.922
0.925
91
www.srl-journal.org
1
2
1
2
1
2
1
(10 , 5)
-2.5
(20 , 5)
(5) w/BS
(4) w/BS
(5) w/BS
(4) w/BS
(5) w/BS
(4) w/BS
(5) w/BS
.2
.4
.2
.4
2.348
2.576
2.987
3.042
2.298
2.498
2.893
2.983
1.338
1.548
1.632
1.738
1.289
1.493
1.583
1.695
0.787
0.812
0.825
0.831
0.713
0.795
0.806
0.828
0.489
0.492
0.503
0.509
0.463
0.471
0.493
0.501
.2
.4
.2
.4
2.563
2.681
3.034
3.142
2.478
2.512
2.983
3.015
1.284
1.292
1.318
1.322
1.238
1.258
1.263
1.301
0.756
0.779
0.781
0.792
0.748
0.763
0.772
0.781
0.499
0.512
0.516
0.522
0.488
0.503
0.510
0.518
.2
.4
.2
.4
2.487
2.534
2.834
2.931
2.397
2.498
2.795
2.887
1.326
1.341
1.358
1.361
1.298
1.328
1.348
1.351
0.748
0.751
0.762
0.768
0.732
0.738
0.749
0.759
0.475
0.479
0.485
0.489
0.468
0.470
0.479
0.481
.2
.4
.2
.4
2.503
2.612
2.883
2.912
2.498
2.583
2.862
2.889
1.258
1.301
1.321
1.325
1.223
1.286
1.305
1.318
0.792
0.813
0.829
0.833
0.782
0.802
0.816
0.829
0.453
0.455
0.460
0.470
0.441
0.446
0.452
0.462
(4)
(4) w/BS
(5)
(5) w/BS
SAS/PL
SAS/L
SAS/Q
0.2
2
0.895
0.899
0.935
0.942
0.892
0.896
0.934
0.938
0.869
0.871
0.870
0.873
0.871
0.874
-0.5
0.2
2
0.908
0.903
0.941
0.939
0.905
0.901
0.939
0.936
0.875
0.873
0.876
0.875
0.877
0.876
0.5
0.2
2
0.894
0.897
0.934
0.935
0.891
0.893
0.931
0.932
0.875
0.878
0.876
0.878
0.878
0.879
2.0
0.2
2
0.905
0.902
0.940
0.938
0.902
0.897
0.938
0.935
0.874
0.876
0.876
0.874
0.877
0.875
-2.5
Prediction Interval
(4)
(4) w/BS
(5)
(5) w/BS
SAS/PL
SAS/L
SAS/Q
0.2
2
0.911
0.905
0.942
0.940
0.907
0.902
0.938
0.936
0.903
0.897
0.906
0.897
0.907
0.900
-0.5
0.2
2
0.915
0.911
0.944
0.941
0.911
0.907
0.942
0.939
0.899
0.895
0.901
0.897
0.903
0.898
0.5
0.2
2
0.918
0.920
0.935
0.938
0.915
0.916
0.931
0.935
0.892
0.896
0.893
0.896
0.895
0.898
2.0
0.2
2
0.917
0.912
0.943
0.941
0.914
0.908
0.938
0.939
0.901
0.898
0.904
0.901
0.906
0.903
92
(20 , 10)
(4) w/BS
TABLE 6 BERNOULLI
(10 , 10)
-2.5
Prediction Interval
(4)
(4) w/BS
(5)
(5) w/BS
SAS/PL
SAS/L
SAS/Q
0.2
2
0.925
0.921
0.944
0.941
0.921
0.916
0.939
0.939
0.921
0.919
0.922
0.920
0.923
0.921
-0.5
0.2
2
0.919
0.923
0.938
0.941
0.915
0.918
0.936
0.940
0.912
0.914
0.914
0.915
0.916
0.918
0.5
0.2
2
0.924
0.928
0.942
0.945
0.919
0.923
0.940
0.941
0.922
0.923
0.922
0.923
0.924
0.925
2.0
0.2
2
0.922
0.918
0.942
0.944
0.919
0.914
0.940
0.941
0.915
0.911
0.917
0.914
0.919
0.916
TABLE 9 BERNOULLI
-2.5
www.srl-journal.org
(4)
(4) w/BS
(5)
(5) w/BS
SAS/PL
SAS/L
SAS/Q
0.2
2
0.929
0.928
0.947
0.945
0.928
0.925
0.946
0.943
0.925
0.923
0.926
0.925
0.927
0.926
-0.5
0.2
2
0.933
0.931
0.946
0.945
0.929
0.927
0.945
0.941
0.919
0.918
0.921
0.921
0.922
0.922
0.5
0.2
2
0.924
0.929
0.945
0.948
0.921
0.926
0.942
0.944
0.922
0.924
0.923
0.924
0.924
0.925
2.0
0.2
2
0.928
0.931
0.946
0.948
0.925
0.926
0.943
0.944
0.925
0.927
0.926
0.928
0.927
0.929
TABLE 10 BERNOULLI
(10 , 5)
(10 , 10)
(20 , 5)
(20 , 10)
(4) w/BS
(5) w/BS
(4) w/BS
(5) w/BS
(4) w/BS
(5) w/BS
(4) w/BS
(5) w/BS
-2.5
0.2
2
1.873
2.048
1.756
1.957
1.131
1.238
1.023
1.187
0.742
0.813
0.728
0.793
0.318
0.325
0.305
0.311
-0.5
0.2
2
1.948
2.240
1.865
2.187
1.235
1.358
1.113
1.238
0.793
0.821
0.763
0.798
0.298
0.302
0.288
0.293
0.5
0.2
2
1.653
1.891
1.594
1.823
0.998
1.108
0.973
1.083
0.801
0.816
0.783
0.801
0.289
0.296
0.278
0.281
2.0
0.2
2
1.784
2.012
1.693
1.998
0.982
0.998
0.963
0.975
0.768
0.784
0.759
0.771
0.304
0.309
0.298
0.301
Results
Summary
Abramowitz,
M.,
Stegun,
I.,
1972.
Handbook
of
93
www.srl-journal.org
s
i
E ( si | yi ; ) =
f 2 ( yi ; )
f ( yi ; )
l
(A.3)
si f ( yi , si ; ) dsi
f 2 ( yi ; )
ni
log f ( yij | ij , ) / ij
j =1 xijl
g ( ij )
(A.4)
f ( yi , si ; )
1 si2
1
f ( yi , si ; )
2 2 2
f ( yi , si ; ) / =
f ( yi , si ; ) /=
2
f ( yi , si ; )
dsi
l
s
i
ni
log
j =1
f ( yij | ij , ) / f ( yi , si ; )
(A.5)
(A.6)
Appendix
f ( yi ; ) / 2 =
f ( yi ; ) / =
94
f ( yi ; )
of
Mixed Models.
(A.2)
E ( si | yi ; )
si ( f ( si | yi ; ) / l ) dsi
=
2008.
si f ( si | yi ; )dsi
where
( y; ) / l = ( / l ) + ( E ( s | y; ) / l ) .
Journal
( y; ) ( y; )
d ( y; ) d ( y; ) =
models.
f ( si | yi ; )dsi
mixed
s2
i
linear
(A.1)
generalized
f ( si | yi ; )dsi
( f ( yi , si ; ) / l ) dsi
2
( f ( yi , si ; ) / ) dsi
( f ( yi , si ; ) / ) dsi .
(A.7)
(A.8)
(A.9)
and
2
2 log f ( yi ; ) f ( yi ; ) f ( yi ; ) / j k
=
j k
f 2 ( yi ; )
( f ( yi ; ) / j ) ( f ( yi ; ) / k )
www.srl-journal.org
log f ( yij | ij , ) / ij
2 f ( yi , si ; ) ni
= j =1 xijl
g ( ij )
k l
n
log f ( yij | ij , ) / ij
ji=1 xijk
g ( ij )
(A.16)
2
log
f
(
y
|
1
n
ij
ij
+ ji=1 xijk xijl
2
2 ij
g ( ij )
g ( ij ) log f ( yij | ij , )
f ( yi , si ; )
ij
g ( ij )3
f 2 ( yi ; )
k l
k l
2 f ( yi ; )
2 l
2 f ( yi , si ; )
2 l
dsi
2
f ( yi , si ; )
2 f ( yi ; )
=
dsi
l
l
2 f ( yi ; )
2 2
2 f ( yi ; )
2
2 f ( yi ; )
2
2 f ( yi , si ; )
2 2
2 f ( yi , si ; )
2 f ( yi , si ; )
dsi
(A.10)
f ( yi , si ; )
2 f ( yi , si ; )
1 si2
(A.17)
=
1
2
2
2
l
2
l
(A.11)
2 f ( yi , si ; ) ni log f ( yij | ij , ) f ( yi , si ; )
=
j =1
(A.12)
2
n
1 log f ( yij | ij , )
(A.18)
+ ji=1 xijl
g ( ij )
ij
(A.13)
f ( yi , si ; )
dsi
(A.14)
dsi .
(A.15)
2 f ( yi , si ; ) 1 si2
1 si2 1
1
=
2
4 2 f ( yi , si ; ) (A.19)
2 2
4
4
2
f ( yi , si ; )
2 f ( yi , si ; )
1 si2
=
1
2
2
2
2 f ( yi , si ; )
2
(A.20)
n log f ( y | , ) 2
ij
ij
= ji=1
n log f ( yij | ij , )
f ( yi , si ; )
+ ji=1
2
(A.21)
95