





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






1
The LOGLINEAR procedure models cell frequencies using the multinomial response model and produces maximum likelihood estimates of parameters by the Newton-Raphson method. The contingency tables are converted to two-way I ×J tables, with I and J being the dimensions of the independent and dependent categorical variables respectively.
The following notation is used throughout this chapter unless otherwise stated:
nij Observed frequency of cell 1 6i j,
I (^) Dimension of the row variable, associated with independent variables J Dimension of the column variable, associated with dependent variables wij Weight of cell (^) 1 6i j,
β (^) k Coefficients in the loglinear model;^1 ≤^ k^ ≤p
β (^) k
β^ $ k Final estimate of β (^) k
mij Expected values of nij
m^ $ij Estimate of mij at the final iteration
M^ $^ i. m^ $ij j
J
=
∑ 1
M^ $^. (^) j m^ $ij i
I
=
∑ 1
M m$ij i
I
j
J
= =
∑ ∑ 1 1
In the general LOGLINEAR model, the logarithms of the cell frequencies are formulated as a linear function of the parameters. The actual form of the model is determined by the contrast and the effects specified. The model has the form
y
m w ij x^ i^ I^ j^ J
ij ij
i k ijk k
p ≡
ln λ (^) ∑β , 1
where λi are chosen so that m (^) ij n j
ij j
∑ =^ ∑ , and^ xijk^ are the independent
variables in the linear model.
The values of xijk are determined by the types of contrasts specified in the procedure. The default contrast is DEVIATION.
To estimate the coefficients, a series of weighted regressions is used for iterative calculations. The iterative process is outlined (also see Haberman, 1978) as follows:
(1) Obtain initial approximations yij
and use them to obtain β (^) k
(2) Obtain the next approximations yij
and mij
(3) Use the updated yij
in (2) to obtain the next approximations β (^) k
(4) Repeat steps 2 and 3, replacing β (^) k
with β (^) k
. Continue repeating this until convergence is achieved.
The computations begin with selection of initial approximations mij nij
= +δ for mij. The default for δ is 0.5. If the model is saturated, δ is added to nij
a (^) k x n m l l ijk ij ij
l
i j
= (^) ∑ − ≥ ,
for 1.
The estimated cell means are updated by
m
Tw v
w v
ij l
l ij^ ij
l
ij ij
l
i j
−
− ∑
exp
exp ,
1
1 for 1
where
n
n
ij i j
ij i j
%
&
K K K
'
K K K
3 δ 8
3 8
,
,
if the model is saturated
otherwise
and
v (^) ij x l ijk (^) k
l
k
p − −
=
= (^) ∑ 1 1
1
β
The iterative process stops when either the maximum number of iterations (default=20) is reached or
max (^) i j, ij.. l ij
l v v
− < = 1 0 001
ε 1 with defaultε 6
Correlation Matrix of Parameter Estimates
computed as
h h h
ij ii jj
Goodness of Fit
The Pearson chi-square is computed as
χ 2
∑
n m m
ij ij
i j ij
,
3 8
and the likelihood-ratio chi-square is
L n
n m ij
ij
i j ij
(^2) ∑ ln (^) $ ,
The degrees of freedom are I × 1 J − 16 − p −E, where E is the number of cells with n wij ij ≤ 0 and p is the number of coefficients in the model.
Consider a linear combination of the cell counts
d nij ij i j,
∑
The estimated expected value is computed as
d mij ij i j
,
∑
Two generalized residuals are computed.
Residuals
residual d nij ij d m i j
ij ij i j
= (^) ∑ −∑ , ,
Adjusted Residuals
adjusted residual
d n d m
ij ij i j
ij ij i j =
∑ −∑ , ,
1
where
C d m
m d
m
f f h
f m d x
ij ij i j
ij ij j ij j
k l kl l
p
k
p
i
k ij ij ijk ik i j
1
2
2
1 1
!
"
$
−
= =
,
,
4 θ 9
Following Haberman (1982), define
0 5
1 6
0 5
0 5 0 5
Total dispersion
Conditional dispersion
Dispersion due to fit
= Measure of association
For entropy
S Y M p p
S Y X M p p
j j j
J
i (^) i j i j j
J
i
I
0 5 (^) 3 8
(^1 6 4 )
0 5 0 5 1 6
=
= =
$ (^) ln $
$ (^) $ (^) ln $
1
1 1
For concentration
S Y M p
S Y X M p
j j
J
i (^) i j j
J
i
I
0 5
1 6
0 5 0 5 1 6
=
= =
2 1
2 1 1