UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

MLwiN Textbook Examples
Multilevel Analysis Techniques and Applications by Joop Hox
Chapter 6: The Logistic Model for Dichotomous Data and Proportions

Table 6.1 on Thai educational data.
We have to create three constant variables of value 1. We called them cons, bcons, and denom. You can create them from Data Manipulation->Generate vector.
Part 1: Now we will build up the first model (1st order MQL) step by step.
Step 1: Specify the level of model and the outcome variable. The lowest level is pupil level and we can simply use the response variable to indicate it.
Step 2: Specify the response distribution. Choose Binomial.

Step 3: Add the level 1 binomial variation to the model. Let's use bcons for it.
      
Step 4: Fill in the intercept into the model. We will use variable cons for it. Notice in the Equations window, there is a parameter denom. This parameter is usually set to 1 and has to be in the data set. That is why we created this variable previously.
Step 5: Add variable sex as a fixed effect.
Step 6: Choose estimation method. From Estimation choose RIGLS. From Nonlinear menu, select the first choice for each row. This gives us the result of first column from Table 6.1.
Step 7: Now we run this model and the result is:
Part 2: 2nd order PQL.
Everything from the last model stays the same except we use different method to estimate.
The result is:
Part 3: Full ML (RML). MLwiN does not support this method yet. We omit this part here.
Table 6.2 on page 116 on meta-analysis data metaresp.ws. Notice the data set contains the variable denom for the analysis already.
Part 1: MQL-1. From Nonlinear, select first order MQL.
The result is:
Part 2: PQL-2. From Nonlinear, choose second order PQL.
The result is:
Table 6.3 on page 118 using PQL method. From Nonlinear, choose second order PQL.
Part 1: Conditions fixed.
The result is:
Part 2: Conditions random. Variable teldum, maildum and the intercept are random.
The result is:
Table 6.4 on page 120.
Part 1: No interactions.
The result is:
Part 2: With interactions. We first created two interaction terms.
->CALCulate "telyear"="teldum"*"year"
->CALCulate "mailyr"="maildum"*"year"
The result is:
Table 6.5 on page 121.

How to cite this page

Report an error on this page

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


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California