- EM is a program for loglinear and related analysis of
categorical data.
- Written by Jeroen Vermunt, Tilburg University.
- Freely available off the WWW, at
http://www.kub.nl/faculteiten/fsw/organisatie/departementen/mto/software2.htmlP>
- It fits a very wide variety of models, from simple
loglinear to log-multiplicative to latent class models. For anyone
wishing to push beyond the bounds of SPSS it is worth examining
carefully.
- It runs under Windows with a simple interface: a
short syntax file is executed and the results are shown in
another window.
- The format of the syntax file is straightforward, at least
for simple models:
man 2 * 2 'manifest' variables
dim 3 3 * N cats, fastest changing last
lab S V * labels, default to A, B, . . .
mod {S,V} * Fit the main effects
dat [43 6 9 * Data as a table.
16 11 18
3 10 16]
This fits independence to the hospital visit data used in the
practicals.
- This is the death penalty example, set up for the model with
all the two way interactions:
man 3
dim 2 2 2
lab V, D, P
MOD {PV,VD,PD}
dat [ 53 414
11 37
0 16
4 139]
- This is the VOTE*HIED*AGEG table used for the
logit models in the previous session. The fastest changing
variable is HIED followed by AGEG with
VOTE changing last (the command that created these data
was crostabs hied by ageg by vote). It fits the model
with all two-way interactions.
man 3
dim 4 7 2
dum 4 7 2
lab V A E
mod {VA,EA,VE}
dat [ 9 75
35 322
64 349
89 332
149 257
. . . . . .
113 197
77 108
58 59
40 18
54 12]
- The dum 4 7 2 statement over-rides EM's usual
effect coding of parameters and forces it to use dummy variables,
with the last value as reference category (i.e., like SPSS).
- The dim statement defines the classifying variables
according to the order of the counts: given the following order:
c1 c2 c3
l1 r1 111 112 113
r2 121 122 123
r3 131 132 143
r4 141 142 133
l2 r1 211 212 213
r2 221 222 223
r3 231 232 243
r4 241 242 233
the appropriate definitions would be:
man 3
dim 2 4 3
lab l r c