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.
x24.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.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
. 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. 1
, use 0
to remove). Beause explanatory variables are included in the fixed part by default, this step is currently vacuous.Start
the iterative estimation of the coefficients in the current model. The program is set here to iterate until a certain convergence criterion is achieved (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.2566 0.06661 0.2567 1 3 C202 /C202 ( 1) 0.2566 0.06661 0.2567 1 3 C203 /C203 ( 1) 0.2566 0.06661 0.2567 1 3 C204 /C204 ( 1) 0.2566 0.06661 0.2567 1 . . . 3 C233 /C233 ( 1) 0.2566 0.06661 0.2567 1 3 C234 /C234 ( 1) 0.2566 0.06661 0.2567 1 3 C235 /C235 ( 1) 0.2566 0.06661 0.2567 1 3 C236 /C236 ( 1) 0.2566 0.06661 0.2567 1 ------------------------------------------------------------------------------- 2 const /const ( 1) 0.2883 0.0886 0.2881 1 ------------------------------------------------------------------------------- 1 const /const ( 1) 0.5403 0.02693 0.5403 -------------------------------------------------------------------------------
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE const 0.0235 0.1406 0.0235
-2*log(lh) is 2080.69
cond
in its fixed part. Instead of listing only the intercept (in the fixed part of the regression formula, as in model (8) 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.PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 0.2161 0.1449 0.2161 cond2 0.04569 0.1449 0.04569 cond3 -0.1913 0.1449 -0.1913
LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.2579 0.06661 0.258 1 3 C202 /C202 ( 1) 0.2579 0.06661 0.258 1 3 C203 /C203 ( 1) 0.2579 0.06661 0.258 1 3 C204 /C204 ( 1) 0.2579 0.06661 0.258 1 . . . 3 C233 /C233 ( 1) 0.2579 0.06661 0.258 1 3 C234 /C234 ( 1) 0.2579 0.06661 0.258 1 3 C235 /C235 ( 1) 0.2579 0.06661 0.258 1 3 C236 /C236 ( 1) 0.2579 0.06661 0.258 1 ------------------------------------------------------------------------------- 2 const /const ( 1) 0.2891 0.08861 0.2889 1 ------------------------------------------------------------------------------- 1 const /const ( 1) 0.5103 0.02544 0.5103 -------------------------------------------------------------------------------
-2*log(lh) is 2034.79
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.17 -0.24 chi square ( 1 df) 8.19 15.84 +/-95% c.i.(sep.) 0.12 0.12 +/-95% c.i.(sim.) 0.17 0.17 chi sq for simultaneous contrasts (3 df) = 47.23
5.5480e-011
m8v2.ws
.
In general it is recommended to save each model in a separate file.SETE
(set element) adds specific elements of the particular variance-covariance matrix. This command adds only the three variances (on the diagonal) and not the 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 no covariances in the model, sphericity is still assumed.)LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.2119 0.05625 0.2114 1 3 C202 /C202 ( 1) 0.2119 0.05625 0.2114 1 3 C203 /C203 ( 1) 0.2119 0.05625 0.2114 1 3 C204 /C204 ( 1) 0.2119 0.05625 0.2114 1 . . . 3 C233 /C233 ( 1) 0.2119 0.05625 0.2114 1 3 C234 /C234 ( 1) 0.2119 0.05625 0.2114 1 3 C235 /C235 ( 1) 0.2119 0.05625 0.2114 1 3 C236 /C236 ( 1) 0.2119 0.05625 0.2114 1 ------------------------------------------------------------------------------- 2 cond1 /cond1 ( 1) 0.3064 0.103 0.3078 1 2 cond2 /cond2 ( 2) 0.267 0.09088 0.266 1 2 cond3 /cond3 ( 1) 0.4004 0.13 0.4014 1 ------------------------------------------------------------------------------- 1 const /const ( 2) 0.4945 0.02538 0.4945 ------------------------------------------------------------------------------- 9956904 spaces left on worksheet
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 0.2161 0.1427 0.2161 cond2 0.04569 0.1369 0.04569 cond3 -0.1913 0.1558 -0.1913
-2*log(lh) is 2082.2
FTEST
again to test the joint contrasts in the fixed part of the model, as specified by the weights in column 350. CONTRASTS cond1 1.00 0.00 cond2 -1.00 -1.00 cond3 0.00 1.00 result 0.17 -0.24 chi square ( 1 df) 1.06 1.80 +/-95% c.i.(sep.) 0.32 0.35 +/-95% c.i.(sim.) 0.46 0.49 chi sq for simultaneous contrasts (3 df) = 5.05
0.080058
11, 12, 13
to the random part, at the residual level (level 1
). The command SETE
(set element) adds specific elements of the particular variance-covariance matrix to the model. The present command adds only the three variances (on the diagonal) and not the covariances (off the diagonal).const
(intercept) predictor from the random part at level 1
(observations). 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, and at the residual level. Hence this model does not assume homogeneity of variance (homoschedasticity), for neither of these two random effects. LEV. PARAMETER (NCONV) ESTIMATE S. ERROR(U) PREV. ESTIM CORR. ------------------------------------------------------------------------------- 3 C201 /C201 ( 1) 0.2111 0.05587 0.2107 1 3 C202 /C202 ( 1) 0.2111 0.05587 0.2107 1 3 C203 /C203 ( 1) 0.2111 0.05587 0.2107 1 3 C204 /C204 ( 1) 0.2111 0.05587 0.2107 1 . . . 3 C233 /C233 ( 1) 0.2111 0.05587 0.2107 1 3 C234 /C234 ( 1) 0.2111 0.05587 0.2107 1 3 C235 /C235 ( 1) 0.2111 0.05587 0.2107 1 3 C236 /C236 ( 1) 0.2111 0.05587 0.2107 1 ------------------------------------------------------------------------------- 2 cond1 /cond1 ( 1) 0.2974 0.1032 0.299 1 2 cond2 /cond2 ( 2) 0.266 0.09084 0.2648 1 2 cond3 /cond3 ( 1) 0.4107 0.1301 0.4118 1 ------------------------------------------------------------------------------- 1 cond1 /cond1 ( 2) 0.605 0.0541 0.6049 1 cond2 /cond2 ( 3) 0.5058 0.04546 0.5059 1 cond3 /cond3 ( 2) 0.3724 0.03377 0.3723 ------------------------------------------------------------------------------- 9956537 spaces left on worksheet
PARAMETER ESTIMATE S. ERROR(U) PREV. ESTIMATE cond1 0.2161 0.1427 0.2161 cond2 0.04569 0.1368 0.04569 cond3 -0.1913 0.1558 -0.1913
-2*log(lh) is 2067.61
FTEST
again to test the joint contrasts in the fixed part of the model, as specified by the weights in column 350. CONTRASTS cond1 1.00 0.00 cond2 -1.00 -1.00 cond3 0.00 1.00 result 0.17 -0.24 chi square ( 1 df) 1.06 1.80 +/-95% c.i.(sep.) 0.32 0.35 +/-95% c.i.(sim.) 0.46 0.49 chi sq for simultaneous contrasts (3 df) = 5.05
cond
factor yields the same non-significant outcome as before. cond
, i.e., we have to set up appropriate contrast weights. There are 36+3+3 coefficients in the random part of the current model. For each contrast, 42 weights are specified for the 42 coefficients, followed by the expected value of the contrast under H0 (i.e. zero). The sequence of 42 weights plus expected value is given for two pairwise comparisons A-B and C-B, because the central condition B is regarded as a baseline in the present fictitious study. A-B
constrasts (1 -1 0
), then the expected value (0
) for this contrast under H0, then again the auxiliary vector, then the weights for the C-B
contrast (0 -1 1
), then the expected value (0
) for this latter contrast under H0. Store the resulting vector in column 352. RTEST
command performs the actual testing in the random part using the weights in column 352. (This command corresponds to the FTEST
command used above for testing contrasts in the fixed part.)CONTRASTS C201 /C201 :? 0.00 0.00 C202 /C202 :? 0.00 0.00 C203 /C203 :? 0.00 0.00 . . . C234 /C234 :? 0.00 0.00 C235 /C235 :? 0.00 0.00 C236 /C236 :? 0.00 0.00 cond1 /cond1 :> 0.00 0.00 cond2 /cond2 :> 0.00 0.00 cond3 /cond3 :> 0.00 0.00 cond1 /cond1 := 1.00 0.00 cond2 /cond2 := -1.00 -1.00 cond3 /cond3 := 0.00 1.00 result 0.10 -0.13 chi square ( 1 df) 1.95 5.47 +/-95% c.i.(sep.) 0.14 0.11 +/-95% c.i.(sim.) 0.00 0.00 chi sq for simultaneous contrasts (42 df) = 14.72
0.00063620
cond
factor also modulates the within-participant (residual) variance. A participant responds less consistently (with larger variance) in condition 3 than in the baseline condition 2, irrespective of the items presented in those conditions. This insight may lead to new research questions and hypotheses. SETE
command. This will result in a model that does not assume sphericity (at level 2), unlike the current model. The log-likelihood in the resulting model will be significantly lower than in the current one. This significant change in log-likelihood indicates that the sphericity assumption is indeed violated in the current data set (as specified by the simulation parameters in Note 1). MLwiN
, choose File > Exit from the GUI.c20
are used to build three additional constraints, at the new highest level 3
. The constraints state that the variance and covariance coefficients for each item (identified in c20
) are identical — within each level of cond.
In other words, items-within-subjects are constrained to be identical across subjects, but within each condition, if they have the same identifier. The dummies for the constraints for condition 1 are in c101-c136, those for condition 2 are in c201-c236, and those for condition 3 are in c301-c336. All constraints for the random part are stored in column c50.