
We carry out the backward elimination as follows:
C input data and transform variables
data case move age year dur ed ch1 ch2 ch3 ch4 msb mse esb ese &
ocb oce mbu mrm mfm msb1 epm eoj esb1 ops osb1 msb2 esb2 osb2 osb3
read rochmig.dat
6349 observations in dataset
yvar move
transform tempage age - 30
transform trage tempage / 10
transform trage2 trage * trage
transform trage3 trage2 * trage
transform trage4 trage3 * trage
transform trage5 trage4 * trage
transform trage6 trage5 * trage
transform ldur log dur
C convert explanatory variables to factors
factor ed fed
factor ch1 fch1
factor ch2 fch2
factor ch3 fch3
factor ch4 fch4
factor msb fmsb
factor msb1 fmsb1
factor msb2 fmsb2
factor mbu fmbu
factor mrm fmrm
factor mfm fmfm
factor eoj feoj
factor ops fops
factor epm fepm
factor esb2 fesb2
factor osb3 fosb3
C fit full model
lfit int ldur year trage trage2 trage3 trage4 trage5 trage6 &
fed fmbu fmfm fmrm fmsb fch1 fch2 fch3 fch4 fesb2 fosb3 fepm fops feoj
Iteration Deviance Reduction
__________________________________________
1 8801.5829
2 2932.0559 5870.
3 2260.2230 671.8
4 2115.9063 144.3
5 2095.5823 20.32
6 2093.5142 2.068
7 2093.1257 0.3885
8 2093.0786 0.4706E-01
9 2093.0765 0.2120E-02
10 2093.0760 0.5102E-03
11 2093.0758 0.1876E-03
dis est
Parameter Estimate S. Error
___________________________________________________
int 1.3741 0.74144
ldur -0.97671 0.75658E-01
year -0.42966E-01 0.77703E-02
trage 0.48422 0.34821
trage2 -0.81192E-01 0.63693
trage3 -0.58212 0.53301
trage4 0.30160 0.57210
trage5 0.42878 0.20849
trage6 -0.23204 0.15366
fed ( 1) 0. ALIASED [I]
fed ( 2) -0.29439E-01 0.29414
fed ( 3) -0.42630 0.31085
fed ( 4) 0.19577E-01 0.21836
fed ( 5) -0.25889 0.23502
fmbu ( 1) 0. ALIASED [I]
fmbu ( 2) 1.2831 0.64008
fmfm ( 1) 0. ALIASED [I]
fmfm ( 2) 0.46489 0.24075
fmrm ( 1) 0. ALIASED [I]
fmrm ( 2) 0.97834 0.80128
fmsb ( 1) 0. ALIASED [I]
fmsb ( 2) -0.44557 0.19011
fmsb ( 3) -0.26831 0.49968
fmsb ( 4) 0.78074 0.56836
fmsb ( 5) -7.9406 82.102
fch1 ( 1) 0. ALIASED [I]
fch1 ( 2) -0.76060E-01 0.38951
fch2 ( 1) 0. ALIASED [I]
fch2 ( 2) -0.68220E-01 0.44099
fch3 ( 1) 0. ALIASED [I]
fch3 ( 2) -1.2554 0.75279
fch4 ( 1) 0. ALIASED [I]
fch4 ( 2) 0.23823E-01 0.58680
fesb2 ( 1) 0. ALIASED [I]
fesb2 ( 2) 0.52758 0.32558
fesb2 ( 3) 0.90635 0.44986
fosb3 ( 1) 0. ALIASED [I]
fosb3 ( 2) 0.83994 0.16945
fepm ( 1) 0. ALIASED [I]
fepm ( 2) -0.22312 0.50383
fops ( 1) 0. ALIASED [I]
fops ( 2) 1.1732 0.36420
feoj ( 1) 0. ALIASED [I]
feoj ( 2) 0.51723 0.43284
C note that the lowest level of each factor is set to zero
C fch1, fch2 and fch4 have very low t-ratios
C remove fch4 first, as this has lowest t-ratio
C To save space we use the MONITOR NO command to produce
C summary information only on the progress of the fitting algorithm
monitor no
lfit -fch4
Deviance = 2093.0774 at iteration 11
lfit -fch1
Deviance = 2093.1162 at iteration 11
lfit -fch2
Deviance = 2093.1470 at iteration 11
lfit -fepm
Deviance = 2093.3436 at iteration 11
lfit -feoj
Deviance = 2094.8028 at iteration 11
C the changes in deviance above are not significant at the 10% level
C compared with 2.71, ie. chi-sq. for 1 degree of freedom
C for fed some levels appear more significant than others; test fed.
lfit -fed
Deviance = 2100.8431 at iteration 11
C change in deviance of 6.04 is not significant at the 10% level
C compared with 7.78, ie. chi-sq. for 4 degrees of freedom
C fed can also be removed from the model
dis est
Parameter Estimate S. Error
___________________________________________________
int 1.0028 0.70183
ldur -0.99577 0.74243E-01
year -0.39207E-01 0.74412E-02
trage 0.43563 0.33628
trage2 -0.10207 0.62253
trage3 -0.54183 0.52659
trage4 0.29816 0.56929
trage5 0.41445 0.20703
trage6 -0.22861 0.15373
fmbu ( 1) 0. ALIASED [I]
fmbu ( 2) 1.2363 0.64637
fmfm ( 1) 0. ALIASED [I]
fmfm ( 2) 0.46619 0.24024
fmrm ( 1) 0. ALIASED [I]
fmrm ( 2) 1.0371 0.79233
fmsb ( 1) 0. ALIASED [I]
fmsb ( 2) -0.44911 0.18890
fmsb ( 3) -0.19336 0.49091
fmsb ( 4) 0.71328 0.55703
fmsb ( 5) -7.8189 82.104
fch3 ( 1) 0. ALIASED [I]
fch3 ( 2) -1.2803 0.75074
fesb2 ( 1) 0. ALIASED [I]
fesb2 ( 2) 0.55897 0.32382
fesb2 ( 3) 1.0902 0.39518
fosb3 ( 1) 0. ALIASED [I]
fosb3 ( 2) 0.83672 0.16570
fops ( 1) 0. ALIASED [I]
fops ( 2) 1.0891 0.28586
C level 2 of fmsb has a high t-ratio; the others are lower
C test fmsb
lfit -fmsb
Deviance = 2110.0394 at iteration 10
C the change in deviance is significant at the 10% level
C compared with 7.78, ie. chi-sq. for 4 degree of freedom
C The factor fmsb is significant, but the effect of
C some levels is small. Therefore collapse some levels of fmsb
C and use the 3 level factor fmsb1 instead.
lfit +fmsb1
Deviance = 2102.9664 at iteration 10
dis est
Parameter Estimate S. Error
___________________________________________________
int 0.95067 0.69857
ldur -0.99776 0.74232E-01
year -0.38286E-01 0.73967E-02
trage 0.42904 0.33667
trage2 -0.17240 0.61843
trage3 -0.57939 0.52601
trage4 0.34715 0.56440
trage5 0.43121 0.20700
trage6 -0.23906 0.15230
fmbu ( 1) 0. ALIASED [I]
fmbu ( 2) 1.2313 0.64655
fmfm ( 1) 0. ALIASED [I]
fmfm ( 2) 0.46823 0.24019
fmrm ( 1) 0. ALIASED [I]
fmrm ( 2) 1.4241 0.75185
fch3 ( 1) 0. ALIASED [I]
fch3 ( 2) -1.2177 0.74682
fesb2 ( 1) 0. ALIASED [I]
fesb2 ( 2) 0.55546 0.32356
fesb2 ( 3) 1.0911 0.39499
fosb3 ( 1) 0. ALIASED [I]
fosb3 ( 2) 0.83211 0.16526
fops ( 1) 0. ALIASED [I]
fops ( 2) 1.1032 0.28470
fmsb1 ( 1) 0. ALIASED [I]
fmsb1 ( 2) -0.44502 0.18885
fmsb1 ( 3) 0.11026 0.40049
C The change in deviance is significant at the
C 10% level compared with 4.6, ie. chi-sq. for 2 degree of freedom.
C Only level 2 seems significant.
C Collapse variable further; use 2 level factor msb2 instead.
lfit -fmsb1
Deviance = 2110.0394 at iteration 10
lfit +fmsb2
Deviance = 2103.0411 at iteration 10
dis est
Parameter Estimate S. Error
___________________________________________________
int 0.98308 0.68858
ldur -0.99954 0.73925E-01
year -0.38417E-01 0.73821E-02
trage 0.44814 0.32946
trage2 -0.18073 0.61760
trage3 -0.58213 0.52585
trage4 0.35071 0.56434
trage5 0.43121 0.20699
trage6 -0.23961 0.15231
fmbu ( 1) 0. ALIASED [I]
fmbu ( 2) 1.2346 0.64645
fmfm ( 1) 0. ALIASED [I]
fmfm ( 2) 0.46040 0.23846
fmrm ( 1) 0. ALIASED [I]
fmrm ( 2) 1.5114 0.68339
fch3 ( 1) 0. ALIASED [I]
fch3 ( 2) -1.2225 0.74642
fesb2 ( 1) 0. ALIASED [I]
fesb2 ( 2) 0.55741 0.32354
fesb2 ( 3) 1.0932 0.39493
fosb3 ( 1) 0. ALIASED [I]
fosb3 ( 2) 0.83115 0.16524
fops ( 1) 0. ALIASED [I]
fops ( 2) 1.1069 0.28439
fmsb2 ( 1) 0. ALIASED [I]
fmsb2 ( 2) -0.46453 0.17487
C The addition of fmsb2 to the model produces a change in
C deviance significant at the 10% level. The coefficient estimate is
C now significant. Keep fmsb2 in the model.
C Remove the remaining factors one by one and compare each
C change in deviance with 2.71 (chi-sq. at the 10% level,
C 1 degree of freedom).
lfit -fch3
Deviance = 2106.7537 at iteration 10
lfit +fch3
Deviance = 2103.0411 at iteration 10
lfit -fmbu
Deviance = 2105.8325 at iteration 10
lfit +fmbu
Deviance = 2103.0411 at iteration 10
lfit -fmrm
Deviance = 2106.7500 at iteration 10
lfit +fmrm
Deviance = 2103.0411 at iteration 10
lfit -fmfm
Deviance = 2106.5408 at iteration 10
lfit +fmfm
Deviance = 2103.0411 at iteration 10
lfit -fesb2
Deviance = 2111.2846 at iteration 10
lfit +fesb2
Deviance = 2103.0411 at iteration 10
lfit -fops
Deviance = 2115.7878 at iteration 10
lfit +fops
Deviance = 2103.0411 at iteration 10
lfit -fosb3
Deviance = 2126.2913 at iteration 10
lfit +fosb3
Deviance = 2103.0411 at iteration 10
C All the above factors are significant.
dis est
Parameter Estimate S. Error
___________________________________________________
int 0.98308 0.68858
ldur -0.99954 0.73925E-01
year -0.38417E-01 0.73821E-02
trage 0.44814 0.32946
trage2 -0.18073 0.61760
trage3 -0.58213 0.52585
trage4 0.35071 0.56434
trage5 0.43121 0.20699
trage6 -0.23961 0.15231
fch3 ( 1) 0. ALIASED [I]
fch3 ( 2) -1.2225 0.74642
fmbu ( 1) 0. ALIASED [I]
fmbu ( 2) 1.2346 0.64645
fmrm ( 1) 0. ALIASED [I]
fmrm ( 2) 1.5114 0.68339
fmfm ( 1) 0. ALIASED [I]
fmfm ( 2) 0.46040 0.23846
fmsb2 ( 1) 0. ALIASED [I]
fmsb2 ( 2) -0.46453 0.17487
fesb2 ( 1) 0. ALIASED [I]
fesb2 ( 2) 0.55741 0.32354
fesb2 ( 3) 1.0932 0.39493
fops ( 1) 0. ALIASED [I]
fops ( 2) 1.1069 0.28439
fosb3 ( 1) 0. ALIASED [I]
fosb3 ( 2) 0.83115 0.16524
C Is trage6 still significant?
lfit -trage6
Deviance = 2106.0860 at iteration 8
C trage6 is significant at the 10% level
C The above model is therefore our final main effects model.
stop
|
Next:Random effects model with explanatory variables |
Home page | Contents | Previous |