Docsity

Loglinear Model: Estimating Parameters and Analyzing Contingency Tables, Study notes of Mathematical Statistics

Toggle sidebar
bg1
1
LOGLINEAR
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 IJ×
tables, with I and J being the dimensions of the independent and dependent
categorical variables respectively.
Notation
The following notation is used throughout this chapter unless otherwise stated:
nij Observed frequency of cell ij,
16
I Dimension of the row variable, associated with independent variables
J Dimension of the column variable, associated with dependent variables
wij Weight of cell ij,
16
β
k Coefficients in the loglinear model; 1≤≤kp
β
kl
16 Estimate of
β
k at the lth iteration
$
β
k Final estimate of
β
k
mij Expected values of nij
mijl
16 Estimate of mij at the lth iteration
$
mij Estimate of mij at the final iteration
$
.
Mi
$
mij
j
J
=
∑
1
$
.
Mj
$
mij
i
I
=
∑
1
M $
mij
i
I
j
J
== ∑∑ 11
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Loglinear Model: Estimating Parameters and Analyzing Contingency Tables and more Study notes Mathematical Statistics in PDF only on Docsity!

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.

Notation

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

1 6l Estimate of β k at the lth iteration

β^ $ k Final estimate of β (^) k

mij Expected values of nij

mij1 6l^ Estimate of^ mij^ at the^ lth iteration

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

Model

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.

Contrasts

The values of xijk are determined by the types of contrasts specified in the procedure. The default contrast is DEVIATION.

Computational Algorithm

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

1 6l

with β (^) k

1 l + 16

. Continue repeating this until convergence is achieved.

The computations begin with selection of initial approximations mij nij

1 6^0

= +δ for mij. The default for δ is 0.5. If the model is saturated, δ is added to nij

and the kth element of a 1 6l^ is

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

T

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

Computed Statistics

Correlation Matrix of Parameter Estimates

Let C be the final C 1 6l^ and H = C−^1. The correlation between β$i and β$ j is

computed as

h h h

ij ii jj

Goodness of Fit

The Pearson chi-square is computed as

χ 2

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.

Generalized Residuals

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

C

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

Analysis of Dispersion

Following Haberman (1982), define

S Y
S Y X
S X
R
S X
S Y

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

S X S Y S Y X

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

S X S Y S Y X

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