|
|
|
||||
|
|
|||||
We illustrate this using an example from page 49 of chapter 4 of Multilevel Analysis by Snijders and Bosker. The variable iq_verb is uncentered and we wish to create a grand mean centered version of this variable which we will call ciq_verb. To do this we will compute the grand mean for iq_verb by choosing Basic Statistics and then Averages and Correlations his example shows an intercept only model predicting langpost from the intercept. We then choose iq_verb from the list of variables and click Calculate (as shown below). This shows us that the mean is 11.834.

We can then compute ciq_verb by choosing Data Manipulation then Calculate. We point to a unused variable (for example, c26 and then press Control-N to rename the variable to ciq_verb. We then scroll down the list and double click on ciq_verb to put it into the equation editor. We then complete the equation to look like below and then click on Calculate. Note that MLwiN does not give any feedback that this operation has been completed successfully, but you can check via Data Manipulation and then Names.

If you wished to do this via the command interface (i.e. Data Manipulation then Command Interface you could type these commands.
name c26 "ciq_verb" calculate "ciq_verb" = "iq_verb" - 11.834
and then you could verify it like this
average "ciq_verb"
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services