Analyzing Multilevel and Mixed Models Using Stata

ECTS credits: 7.5
Level of course: PhD. course
Type of course: Elective for PhD. students.
Duration: Tuesday June 5 – Saturday June 9, 2018
Location: Bodø
Faculty responsible: Professor Tenko Raykov, Michigan State University,
Language: English.
Administrative coordinator: Grete Ingemann Knudsen, Nord University Business School
Course responsible person: Professor Tor Korneliussen

The course is financed by Nord university's strategic funds for international cooperation, and is organised by a committee including representants from the university's five faculties and Nordland Research Institute.

Course content

Multilevel models are known by various synonyms (i.e., hierarchical linear models, mixed effect models, random effect models, general linear mixed models). The defining feature of these models is their capacity to provide quantification and prediction of random variance due to multiple sampling dimensions (across occasions, persons, or groups). Multilevel models offer many advantages for analysing longitudinal data, such as flexible strategies for modeling change and individual differences in change, the examination of time-invariant or time-varying predictor effects, and the use of all available complete observations. Multilevel models are also especially useful for analysing clustered data (e.g., persons nested within groups), in which one wishes to examine effects of predictors pertaining to individuals or to groups.

Mixed models contain both fixed effects analogous to the coefficients in standard regression models and random effects not directly estimated but instead summarized through the unique elements of their variance-covariance matrix. Mixed models may contain more than one level of nested random effects and hence these models are also referred to as "multilevel" or "hierarchical models," particularly in the social sciences. Stata's approach to linear mixed models is to assign random effects to independent panels where a hierarchy of nested panels can be defined for handling nested random effects.


The goal of this course is to provide the course participants with knowledge of multilevel analysis, a statistical methodology that is useful in multiple social science research areas. 


The course "Analyzing Multilevel and Mixed Models Using Stata" aims to introduce statistical methods that are useful for anyone confronting empirical research. It covers both regression and multilevel analysis, with the emphasis on how to select the appropriate method, depending on the data and the research objective, how to interpret the method's results, and how to present the results in a research paper. The statistical package Stata will be used throughout.

Learning outcomes: 

Based on this course the student should have

-- knowledge

  • of a set of statistical methods that are useful to their research;
  • of the differences in possible statistical approaches to the analysis of a data set: exploring a data set, examining variables and dealing with missing values;
  • of various statistical methods such as regression and multilevel analysis, specifically how they are defined and implemented in practice;

    -- skills
  • to be able to recognize their needs when analysing empirical data and selecting the most appropriate statistical method for the research objective;
  • to interpret the statistical results and express these verbally;

    -- general competence
  • to assess the applicability of the statistical methods important to the student's research across various empirical settings;
  • to understand the usefulness of the quantitative approach to research;
  • to become familiar with the Stata statistical package.

Course prerequisites:  
Some basic statistical knowledge is required, for example knowledge of basic statistics such as mean, variance, standard deviation, correlation and simple linear regression.   Familiarity with Stata is not a prerequisite. 



1. A brief introduction to Stata

·         What is Stata?

• Resources for working with Stata

• Why use Stata?

·         A data set to illustrate some data management capabilities of Stata

• The Stata working windows 

• Exploring a data set

• Examining variables

• Putting order into a data file

• Assigning labels and variable names

• Dealing with missing values – a first essential step

• Modifying existing and creating new variables

• Transforming variables

• A general approach to variable transformation

• Getting help.


2. Fitting single-level regression models using Stata

·         Data set and research question

·         Preliminary analyses

·         Single-level regression analysis with Stata

• Plotting residuals against predictors

• Plotting residuals against fitted (predicted) values

• Plotting standardized residuals. 


3.  Why do we need multilevel and mixed models? 

·         What is multilevel modeling, why can't we do without it, and how come aggregation and disaggregation do not do the job?

• Examples of nested data and the hallmark of multilevel modeling

• Another important instance of multilevel modeling

• Aggregation and disaggregation of variable scores

• Analytic benefits of multilevel modeling.

·         The beginnings of multilevel modeling – why what we already know about regression analysis will be so useful

• A brief review of regression analysis

• Multilevel models as sets of regression equations

• An illustrative example of multilevel modeling.

·         Appendix.


4.  The intra-class correlation coefficient and its estimation using Stata

·         The fully unconditional two-level model and definition of the intraclass correlation coefficient (ICC)

·         Point and interval estimation of the ICC using Stata

·         Appendixes.

5.    How many levels? – Proportion ofthird level variance and its evaluation with Stata

·         Proportion third level variance

·         The fully unconditional three-level model

·         Point and interval estimation of proportion third level variance using Stata.


6. Robust modeling of lower-level variable relationships in the presence of clustering effect

·         What is robust modeling in the presence of nesting effects?

·         Robust modeling of hierarchical data using Stata.

7.  Mixed effects models (mixed models)

·         What are mixed models, what are they made of, and why are they useful?

• An illustration of the difference between fixed and random effects

• Examples of mixed modeling frameworks

·         Mixed models with continuous response variables.

·         Random intercept models

• Fitting a random intercept model with Stata

• Model adequacy evaluation

• Between- and within-estimators and when to use which

·         Random regression models

• An instructive example and the restricted maximum likelihood (REML) method

• Random intercept and slope model

• Multiple random slopes

• Fixed effects, random effects, and total effects

• Numerical issues

·         Nested levels – conditional three-level mixed models


1.       Mixed models with discrete responses

·         Why do we need these models?

·         A few important statistical facts

·         The generalized linear model (GLIM)

·         Random intercept models with discrete outcomes

·         Random regression models with discrete outcomes

·         Model choice

·         Crossed random effects

·         Appendix.

2.      Longitudinal multilevel modeling

·         Introduction

·         Multilevel modeling of longitudinal data

·         Using Stata to fit unconditional and conditional growth curve models (cross-sectional time series)

1.      Conclusion and outlook.

Exam and evaluation:

Participation in lectures and an application of a method taught in the course and written up as a paper. Paper graded: pass / non pass.

Reading list:

The following texts support this course

· Bickel, R. (2007). Multilevel Analysis for Applied Research: It's Just Regression! The Guilford Press.

·         Hox, J.J. and Moerbeek, M. (2017).  Multilevel Analysis: Techniques and Applications. Mahwah, NJ: Lawrence Erlbaum and Associates.

·         Kreft, I.G.G. and de Leeuw, J. (1998). Introducing Multilevel Modeling. Thousand Oaks, CA: Sage.

· Luke, D.A. (2004). Multilevel Modeling. Sage.

·         Schnijders, T. and Bosker, R. (2011). Multilevel Analysis: An Introduction to Basic and Advanced Multilevel Modeling. Thousand Oakes, CA: Sage.


Deadline: May 18th, 2018