The mixed-effects analyses shown here were done with the program MLwiN (version 2.02; dated June 2005) running under Microsoft Windows 2000 Professional (SP4).
Program output is indicated by black monospace type, like this.
The first two stages of the modeling process, data preparation and (crossed) model preparation, are identical to the "normal" case with regular, normally-distributed data.
h24.txt
. This can only be done through the GUI, choose File > Ascii Input. In the Columns field, enter c1-c4 to store the file contents in the first four columns of the worksheet. Use the Browse button to find the input data file.Sort
, using key in c10
, the input columns in c1-c4
and in c10
. Put the sorted key (back) in c10
, and put the sorted output columns (back) in c1-c4
and in c10
. cond
factor. The resulting dummy variables are stored in columns 11 to 13.const
. b.cons
and denom
that MLwiN expects.names
(without arguments) or print
. Data inspection is perhaps easier through the Names window in the GUI. Open this window by choosing Data Manipulation > Names. The Names window should resemble the one here. EXPL
anatory) and dependent (RESP
onse) variables must be specified. The command to include or exclude EXPL
anatory variables works as a toggle. The first argument 1
forces inclusion of the (constant intercept) predictor in column 5 into the model. By default, explanatory variables are included in the fixed part, but not in the random part.item
nested under that of subj
. const
, must be specified first, as done above) at the (higher) subjects level, and in the fixed part, and the other (named b.cons
, specified after const
) at the (lower) items level.b.cons
must be removed from the fixed part. b.cons
at the lower level...const
at the higher level.b.cons
, and confirm with button "Done". This enters the intercept b.cons
into the random part. 1
).item
within subj
, so we need to create unique identifiers for items within subjects. The new identifiers are stored in column 20. c20
are used to build an additional constraint, at the now highest level 3
, that the coefficients for each item (identified in c20
, dummies in c201-c236
) at that highest level are identical. In other words, items-within-subjects are constrained to be identical across subjects if they have the same identifier. BATCH ON
). The command BATCH OFF
allows inspection of estimates after each iteration. LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.6416 0.2234 0.6414 1 3 C202 /C202 ( 1) 0.6416 0.2234 0.6414 1 3 C203 /C203 ( 1) 0.6416 0.2234 0.6414 1 3 C204 /C204 ( 1) 0.6416 0.2234 0.6414 1 . . . 3 C233 /C233 ( 1) 0.6416 0.2234 0.6414 1 3 C234 /C234 ( 1) 0.6416 0.2234 0.6414 1 3 C235 /C235 ( 1) 0.6416 0.2234 0.6414 1 3 C236 /C236 ( 1) 0.6416 0.2234 0.6414 1 ------------------------------------------------------------------------------- 2 const /const ( 1) 0.9429 0.3322 0.9426 1 ------------------------------------------------------------------------------- 1 b.cons /b.cons ( 4) 1 2.971e-009 1
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE const -1.585 0.2556 -1.585 9916467 spaces left on worksheet
-2*log(lh) is 652.749
cond
in its fixed part. Instead of listing only the intercept (in the fixed part of the regression formula, as in the empty model (13) above, the new model adds the fixed effect of cond
and suppresses the intercept.1
) the three dummies in c11-c13
, for the three levels of factor cond
, as explanatory variables. The dummies are included in the fixed part by default.0
) the const
(intercept) predictor from the fixed part. The variable remains in the model as an explanatory variable in the random part.LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 5) 0 0 0 1 3 C202 /C202 ( 5) 0 0 0 1 3 C203 /C203 ( 5) 0 0 0 1 3 C204 /C204 ( 5) 0 0 0 1 . . . 3 C233 /C233 ( 5) 0 0 0 1 3 C234 /C234 ( 5) 0 0 0 1 3 C235 /C235 ( 5) 0 0 0 1 3 C236 /C236 ( 5) 0 0 0 1 ------------------------------------------------------------------------------- 2 const /const ( 1) 1.403 0.3369 1.402 1 ------------------------------------------------------------------------------- 1 b.cons /b.cons ( 5) 1 0 1 9916406 spaces left on worksheet
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 -1.174 0.2787 -1.174 cond2 -1.660 0.2904 -1.660 cond3 -2.045 0.3044 -2.045
-2*log(lh) is 648.041
c11
, c12
and c13
to the random part, at the participant level (level 2). The command SETV
(set variable) adds a variable into the variance-covariance matrix. This adds not only the three variances (on the diagonal) but also all their covariances (off the diagonal).const
(intercept) predictor from the random part at level 2 (participants). The variable may remain in the model as an explanatory variable elsewhere.cond
in its fixed part, and in the random part at the participant level. Hence this model does not require homogeneity of variance (homoschedasticity). Because there are also covariances specified in the model, sphericity is not assumed either.LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.6114 0.2187 0.612 1 3 C202 /C202 ( 1) 0.6114 0.2187 0.612 1 3 C203 /C203 ( 1) 0.6114 0.2187 0.612 1 3 C204 /C204 ( 1) 0.6114 0.2187 0.612 1 . . . 3 C233 /C233 ( 1) 0.6114 0.2187 0.612 1 3 C234 /C234 ( 1) 0.6114 0.2187 0.612 1 3 C235 /C235 ( 1) 0.6114 0.2187 0.612 1 3 C236 /C236 ( 1) 0.6114 0.2187 0.612 1 ------------------------------------------------------------------------------- 2 cond1 /cond1 ( 1) 0.7499 0.3566 0.7495 1 2 cond2 /cond1 ( 1) 0.6462 0.2998 0.6463 0.856 2 cond2 /cond2 ( 1) 0.7594 0.4056 0.76 1 2 cond3 /cond1 ( 2) 0.8944 0.465 0.8944 0.629 2 cond3 /cond2 ( 2) 1.32 0.5299 1.321 0.922 2 cond3 /cond3 ( 1) 2.7 1.023 2.698 1 ------------------------------------------------------------------------------- 1 b.cons /b.cons ( 5) 1 2.046e-016 1
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 -1.174 0.2598 -1.174 cond2 -1.66 0.2729 -1.66 cond3 -2.045 0.4046 -2.045
FTEST
command performs the actual testing in the fixed part using the weights in column 350. CONTRASTS cond1 -1.00 0.00 cond2 1.00 1.00 cond3 0.00 -1.00 result -0.49 0.38 chi square ( 1 df) 4.36 1.57 +/-95% c.i.(sep.) 0.46 0.60 +/-95% c.i.(sim.) 0.65 0.86 chi sq for simultaneous contrasts(3 df) = 7.10
0.028725
-2*log(lh) is 597.387
m15plus.ws
.
In general it is recommended to save each model in a separate file.LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.5478 0.2054 0.5478 1 3 C202 /C202 ( 1) 0.5478 0.2054 0.5478 1 3 C203 /C203 ( 1) 0.5478 0.2054 0.5478 1 3 C204 /C204 ( 1) 0.5478 0.2054 0.5478 1 . . . 3 C233 /C233 ( 1) 0.5478 0.2054 0.5478 1 3 C234 /C234 ( 1) 0.5478 0.2054 0.5478 1 3 C235 /C235 ( 1) 0.5478 0.2054 0.5478 1 3 C236 /C236 ( 1) 0.5478 0.2054 0.5478 1 ------------------------------------------------------------------------------- 2 cond1 /cond1 ( 2) 0.8305 0.3806 0.8304 1 2 cond2 /cond2 ( 2) 0.7145 0.3931 0.7146 1 2 cond3 /cond3 ( 2) 2.807 1.055 2.807 1 ------------------------------------------------------------------------------- 1 b.cons /b.cons (10) 1 2.673e-016 1 9916012 spaces left on worksheet
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 -1.174 0.2628 -1.174 cond2 -1.66 0.2662 -1.66 cond3 -2.045 0.4079 -2.045 9916012 spaces left on worksheet
-2*log(lh) is 614.977
const
is still defined as an explanatory variable, we can bypass the EXPL
command, and bring that constant predictor into the random part.LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.6526 0.2272 0.6517 1 3 C202 /C202 ( 1) 0.6526 0.2272 0.6517 1 3 C203 /C203 ( 1) 0.6526 0.2272 0.6517 1 3 C204 /C204 ( 1) 0.6526 0.2272 0.6517 1 . . . 3 C233 /C233 ( 1) 0.6526 0.2272 0.6517 1 3 C234 /C234 ( 1) 0.6526 0.2272 0.6517 1 3 C235 /C235 ( 1) 0.6526 0.2272 0.6517 1 3 C236 /C236 ( 1) 0.6526 0.2272 0.6517 1 ------------------------------------------------------------------------------- 2 const /const ( 1) 0.9675 0.3402 0.9663 1 ------------------------------------------------------------------------------- 1 bcons.1 /bcons.1 ( 5) 1 2.166e-016 1 9820482 spaces left on worksheet
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 -1.174 0.2787 -1.174 cond2 -1.66 0.2904 -1.66 cond3 -2.045 0.3044 -2.045
FTEST
command performs the actual testing in the fixed part using the weights in column 350. CONTRASTS cond1 -1.00 0.00 cond2 1.00 1.00 cond3 0.00 -1.00 result -0.49 0.38 chi square ( 1 df) 5.24 2.46 +/-95% c.i.(sep.) 0.42 0.48 +/-95% c.i.(sim.) 0.59 0.69 chi sq for simultaneous contrasts(3 df) = 14.96
0.00056426
-2*log(lh) is 611.677
MLwiN
, choose File > Exit from the GUI.