Unbelievably fast estimation of multilevel structural equation models

Size: px
Start display at page:

Download "Unbelievably fast estimation of multilevel structural equation models"

Transcription

1 Intro Relational Simulation Appendix References Unbelievably fast estimation of multilevel structural equation models Joshua N. Pritikin Department of Psychology University of Virginia Spring 2016 Joshua N. Pritikin University of Virginia 1/58

2 Intro Relational Simulation Appendix References Abstract The challenge of quick optimization of multilevel structural equation models (SEM) will be introduced. To provide context, multilevel SEM will be compared with the mixed model., a novel method to simplify the multilevel SEM likelihood will be introduced, inspired by the fact that the multivariate normal density is transparent to orthogonal rotation. Assumptions and limitation of will be discussed. Joshua N. Pritikin University of Virginia 2/58

3 Intro Relational Simulation Appendix References Acknowledgment This research was aided by Timo von Oertzen & Steve Boker (University of Virginia) Tim Brick (Pennsylvania State University) OpenMx development team Joshua N. Pritikin University of Virginia 3/58

4 Intro Relational Simulation Appendix References Structural equation models Joshua N. Pritikin University of Virginia 4/58

5 Intro Relational Simulation Appendix References Multilevel structural equation models Joshua N. Pritikin University of Virginia 5/58

6 Intro Relational Simulation Appendix References A hypothetical example Joshua N. Pritikin University of Virginia 6/58

7 Intro Relational Simulation Appendix References Student Joshua N. Pritikin University of Virginia 7/58

8 Intro Relational Simulation Appendix References Teacher Joshua N. Pritikin University of Virginia 8/58

9 Intro Relational Simulation Appendix References School Joshua N. Pritikin University of Virginia 9/58

10 Intro Relational Simulation Appendix References Estimation time? How long will this model take to estimate? Joshua N. Pritikin University of Virginia 10/58

11 Intro Relational Simulation Appendix References Roadmap What is hard about multilevel? mixed model + SEM = Relational SEM (a novel method that favorably transforms the problem) Joshua N. Pritikin University of Virginia 11/58

12 Intro Relational Simulation Appendix References Direct sum B 1 B2 = ( ) B1 0 0 B 2 B k B i = 0 B B k i=1 stacks matrices in a block-diagonal arrangement Here we assume nested multilevel structure Joshua N. Pritikin University of Virginia 12/58

13 Intro Relational Simulation Appendix References Covariance Suppose we build a covariance model S for a particular student. A classroom of s students will have covariance matrix ( ) T1,1 T 1,2 T =. s i=1 S i T 2,1 Joshua N. Pritikin University of Virginia 13/58

14 Intro Relational Simulation Appendix References Sparseness pattern Joshua N. Pritikin University of Virginia 14/58

15 Intro Relational Simulation Appendix References Bottleneck in model evaluation Covariance matrix can become very large Inverting the covariance is expensive, O(N 3 ) Sparse matrix operations help, but not enough Conclusion: impractical without cleverness Joshua N. Pritikin University of Virginia 15/58

16 Intro Relational Simulation Appendix References Structural equation model What is a SEM? It s similar to regression. But how? Joshua N. Pritikin University of Virginia 16/58

17 Intro Relational Simulation Appendix References Structural equation model, 1st moment Regression is y = Xβ + e SEM is y = Xβ + e For y observations, X covariates/predictors, β constant coefficients, e residuals Joshua N. Pritikin University of Virginia 17/58

18 Intro Relational Simulation Appendix References Structural equation model, 2nd moment Regression SEM y = Xβ + e e N (., σ 2 I) y = Xβ + e (X, e) N (., Σ(θ)) For y observations, X covariates/predictors, β constant coefficients, e residuals, variance σ 2, parameters θ, covariance Σ Joshua N. Pritikin University of Virginia 18/58

19 Intro Relational Simulation Appendix References Mixed model lme4 (Bates, Mächler, Bolker, & Walker, 2015) Multilevel or crossed regression Fast How does it work? Joshua N. Pritikin University of Virginia 19/58

20 Intro Relational Simulation Appendix References Mixed model, 1st moment Y = column vector of observations Y Xβ }{{} + Zu + e. }{{} constant varying covariates X associated with constant coefficients β covariates Z associated with varying coefficients u column vector of residuals e E ( ) u = e ( ) 0 0 Joshua N. Pritikin University of Virginia 20/58

21 Intro Relational Simulation Appendix References Mixed model, 2nd moment Y = Cov Xβ }{{} + Zu + e. }{{} constant varying ( ) u = e ( ) G 0 0 R Joshua N. Pritikin University of Virginia 21/58

22 Intro Relational Simulation Appendix References Mixed model, unconditional distribution Y = Xβ + e where e N (0, ZGZ T + R) The formulation I showed earlier is actually conditional on a particular realization of the varying coefficients u. Joshua N. Pritikin University of Virginia 22/58

23 Intro Relational Simulation Appendix References Mixed model, example lmer(gpa ~ 1 + (1 school) + (1 school:teacher),...) Intercept-only model with 3 levels The expression after the vertical bar indicates the partitioning design (like conditional probability) 4 free parameters are estimated: the grand intercept; 2 variances, one for each varying coefficient; and the residual variance Efficient Joshua N. Pritikin University of Virginia 23/58

24 Intro Relational Simulation Appendix References How does this look in SEM? Joshua N. Pritikin University of Virginia 24/58

25 Intro Relational Simulation Appendix References What is? Let R and S be tables (or data frames) that contain rows. R (F ) S {r s r R s S F (r s)} where F is a boolean valued function. Without loss of generality, here F is whether primary and foreign keys match. We will omit F and write (k) where k is the name of the key. Joshua N. Pritikin University of Virginia 25/58

26 Intro Relational Simulation Appendix References What is? Example Employee Harry Sally George Harriet Dept Sales Finance Finance Sales Dept Sales Finance Production Manager George Harriet Charles Employee (Dept) Manager Employee Dept Manager Harry Sales George Sally Finance Harriet George Sales George Harriet Finance Harriet Joshua N. Pritikin University of Virginia 26/58

27 Intro Relational Simulation Appendix References Which is easier to understand? Joshua N. Pritikin University of Virginia 27/58

28 Intro Relational Simulation Appendix References A relational schema Joshua N. Pritikin University of Virginia 28/58

29 Intro Relational Simulation Appendix References Autoregressive tree (pedigree) Joshua N. Pritikin University of Virginia 29/58

30 Intro Relational Simulation Appendix References Summary: vs conditional probability Data is joined ( ) Conditional probability is an ingredient in multilevel models, not data Join commutes, conditional probability doesn t Joshua N. Pritikin University of Virginia 30/58

31 Intro Relational Simulation Appendix References Mixed model Limitations: missing data row-wise deletion only the lowest level unit has observations multivariate (more than one outcome) is very awkward Joshua N. Pritikin University of Virginia 31/58

32 Intro Relational Simulation Appendix References Sufficient statistic approach Suppose we have data of N independent observations of K-variate units. Let µ and Σ be the model expected mean vector and covariance matrix, respectively. Let m and S be the mean vector and covariance matrix of the data, respectively. 2 log L(data θ) = N(K log(2π) + log( Σ ) + tr(σ 1 S) + µ T Σ 1 (µ 2m)) Maximum covariance dimension is K. Joshua N. Pritikin University of Virginia 32/58

33 Intro Relational Simulation Appendix References Sparseness pattern Joshua N. Pritikin University of Virginia 33/58

34 Intro Relational Simulation Appendix References Uncompressed likelihood Suppose we have N observations consisting of data vector x. Let µ and Σ be the model expected mean vector and covariance matrix, respectively. 2 log L(data θ) = N log(2π) + log( Σ ) + (µ x) T Σ 1 (µ x) Maximum covariance dimension is N. Joshua N. Pritikin University of Virginia 34/58

35 Intro Relational Simulation Appendix References Covariance becomes very large. What to do? SEMs are specified using the RAM parameterization: µ = F (I A) 1 M Σ = F (I A) 1 S(I A) T F T A, S, F, and M are used for what? Joshua N. Pritikin University of Virginia 35/58

36 Intro Relational Simulation Appendix References RAM s A matrix Joshua N. Pritikin University of Virginia 36/58

37 Intro Relational Simulation Appendix References RAM s A matrix T S1 S2 S3 S4 T S S S S Joshua N. Pritikin University of Virginia 37/58

38 Intro Relational Simulation Appendix References Orthogonal or axis rotation 2 y x Joshua N. Pritikin University of Virginia 38/58

39 Intro Relational Simulation Appendix References Call forth the sublime orthogonal rotation Joshua N. Pritikin University of Virginia 39/58

40 Intro Relational Simulation Appendix References transformed Joshua N. Pritikin University of Virginia 40/58

41 Intro Relational Simulation Appendix References transformed T S1 S2 S3 S4 T S S S S Joshua N. Pritikin University of Virginia 41/58

42 Intro Relational Simulation Appendix References transformed Joshua N. Pritikin University of Virginia 42/58

43 Intro Relational Simulation Appendix References algebratically Upper level has K outgoing regressions Lower level has M incoming regressions with data D Find an orthogonal matrix Q R M M such that the lower M K rows of QA are zero. Define new model A as the first K rows of Q T A Define new lower level dataset D = Q T D Proceed with optimization as usual Joshua N. Pritikin University of Virginia 43/58

44 Intro Relational Simulation Appendix References geometry Use QR decomposition to scale to an orthogonal rotation Joshua N. Pritikin University of Virginia 44/58

45 Intro Relational Simulation Appendix References, apply recursively Joshua N. Pritikin University of Virginia 45/58

46 Intro Relational Simulation Appendix References historical lineage Who done it? summer of 2012: idea conceived by Timo von Oertzen, Steven M. Boker, and Timothy R. Brick, inspired by von Oertzen and Hackett (submitted) spring 2013: prototyped in OpenMx (by me) completed predissertation on a different topic spring 2016: optimized implementation in OpenMx (again by me) Joshua N. Pritikin University of Virginia 46/58

47 Intro Relational Simulation Appendix References Does it work? Joshua N. Pritikin University of Virginia 47/58

48 Intro Relational Simulation Appendix References Conditions 11 parameters per level, 2 between level regressions (total 35) 1st student indicator was set to missing with 20% probability 2 sets of true parameters (θ 1 and θ 2 ) Parameter θ 1 : 7 schools, 38 teachers, and 293 students Parameter θ 2 : 7 schools, 37 teachers, and 296 students 200 Monte Carlo replications for each condition (Algorithm θ) Joshua N. Pritikin University of Virginia 48/58

49 Intro Relational Simulation Appendix References Monte Carlo bias and variance θ replications method bias σ rampart regular rampart regular Joshua N. Pritikin University of Virginia 49/58

50 Intro Relational Simulation Appendix References Scatterplot of deviance at the maximum likelihood 1 2 regular regular rampart rampart Joshua N. Pritikin University of Virginia 50/58

51 Intro Relational Simulation Appendix References Seconds required per replication 30 rampart count regular seconds Joshua N. Pritikin University of Virginia 51/58

52 Intro Relational Simulation Appendix References OpenMx is a free and open source extension to the R statistical environment. Software and support available at Questions? Joshua N. Pritikin University of Virginia 52/58

53 Intro Relational Simulation Appendix References Appendix Some extra slides follow Joshua N. Pritikin University of Virginia 53/58

54 Intro Relational Simulation Appendix References Terminology Historically, coefficients that help predict all observations are called fixed effects whereas the other type of coefficient has been called a random effect. These are unfortunate terminology. In the statistical literature, there are at least five definitions of these phrases, all of which differ from each other (Gelman, 2005). Moreover, in computer science, the term random is usually associated with draws from a uniform random number generator, not synonymous with stochastic that does not suppose a particular distribution. Here we follow Gelman (2005) and use the terms constant and varying. Joshua N. Pritikin University of Virginia 54/58

55 Intro Relational Simulation Appendix References Example, lme4 lmer(reaction ~ Days + (Days Subject), sleepstudy) Joshua N. Pritikin University of Virginia 55/58

56 Intro Relational Simulation Appendix References Example, OpenMx (part 1) bysubj <- mxmodel( model="bysubj", type="ram", latentvars=c("slope", "intercept"), mxdata(data.frame(subject=unique(sleepstudy$subject)), type="raw", primarykey = "Subject"), mxpath(c("intercept", "slope"), arrows=2, values=1), mxpath("intercept", "slope", arrows=2, values=.25, labels="cov1")) Joshua N. Pritikin University of Virginia 56/58

57 Intro Relational Simulation Appendix References Example, OpenMx (part 2) ss <- mxmodel( model="sleep", type="ram", bysubj, manifestvars="reaction", latentvars = "Days", mxdata(sleepstudy, type="raw", sort=false), mxpath("one", "Reaction", arrows=1, free=true), mxpath("one", "Days", arrows=1, free=false, labels="data.days"), mxpath("days", "Reaction", arrows=1, free=true), mxpath("reaction", arrows=2, values=1), mxpath(paste0('bysubj.', c('intercept','slope')), 'Reaction', arrows=1, free=false, values=c(1,na), labels=c(na, "data.days"), joinkey="subject")) Joshua N. Pritikin University of Virginia 57/58

58 Intro Relational Simulation Appendix References Bates, D., Mächler, M., Bolker, B., & Walker, S. (2015). Fitting linear mixed-effects models using lme4. Journal of Statistical Software, 67(1), doi: /jss.v067.i01 Boker, S. M., Brick, T. R., Pritikin, J. N., Wang, Y., von Oertzen, T., Brown, D.,... Neale, M. C. (2015). Maintained individual data distributed likelihood estimation. Multivariate Behavioral Research, 50(6), Gelman, A. (2005). Analysis of variance why it is more important than ever. The Annals of Statistics, 33(1), Neale, M. C., Hunter, M. D., Pritikin, J. N., Zahery, M., Brick, T. R., Kirkpatrick, R.,... Boker, S. M. (in press). OpenMx 2.0: Extended structural equation and statistical modeling. Psychometrika. doi: /s Pritikin, J. N. (2016). A computational note on the application of the Supplemented EM algorithm to item response models. Pritikin, J. N., & Schmidt, K. M. (in press). Model builder for Item Factor Analysis with OpenMx. R Journal. von Oertzen, T., & Hackett, D. C. (submitted). Pre-processing for efficient maximum likelihood estimation in structural equation models with fixed loadings. submitted. Joshua N. Pritikin University of Virginia 57/58

R-squared for Bayesian regression models

R-squared for Bayesian regression models R-squared for Bayesian regression models Andrew Gelman Ben Goodrich Jonah Gabry Imad Ali 8 Nov 2017 Abstract The usual definition of R 2 (variance of the predicted values divided by the variance of the

More information

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Multilevel Models in Matrix Form Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Today s Lecture Linear models from a matrix perspective An example of how to do

More information

Computational methods for mixed models

Computational methods for mixed models Computational methods for mixed models Douglas Bates Department of Statistics University of Wisconsin Madison March 27, 2018 Abstract The lme4 package provides R functions to fit and analyze several different

More information

In the bivariate regression model, the original parameterization is. Y i = β 1 + β 2 X2 + β 2 X2. + β 2 (X 2i X 2 ) + ε i (2)

In the bivariate regression model, the original parameterization is. Y i = β 1 + β 2 X2 + β 2 X2. + β 2 (X 2i X 2 ) + ε i (2) RNy, econ460 autumn 04 Lecture note Orthogonalization and re-parameterization 5..3 and 7.. in HN Orthogonalization of variables, for example X i and X means that variables that are correlated are made

More information

Bridging Meta-Analysis and Standard Statistical Methods

Bridging Meta-Analysis and Standard Statistical Methods Bridging Meta-Analysis and Standard Statistical Methods Mike W.-L. Cheung Department of Psychology National University of Singapore June 208 Mike W.-L. Cheung Department of Psychology Bridging National

More information

Lecture 6: Geometry of OLS Estimation of Linear Regession

Lecture 6: Geometry of OLS Estimation of Linear Regession Lecture 6: Geometry of OLS Estimation of Linear Regession Xuexin Wang WISE Oct 2013 1 / 22 Matrix Algebra An n m matrix A is a rectangular array that consists of nm elements arranged in n rows and m columns

More information

For more information about how to cite these materials visit

For more information about how to cite these materials visit Author(s): Kerby Shedden, Ph.D., 2010 License: Unless otherwise noted, this material is made available under the terms of the Creative Commons Attribution Share Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/

More information

Fixed Effects, Invariance, and Spatial Variation in Intergenerational Mobility

Fixed Effects, Invariance, and Spatial Variation in Intergenerational Mobility American Economic Review: Papers & Proceedings 2016, 106(5): 400 404 http://dx.doi.org/10.1257/aer.p20161082 Fixed Effects, Invariance, and Spatial Variation in Intergenerational Mobility By Gary Chamberlain*

More information

Lesson 6 Maximum Likelihood: Part III. (plus a quick bestiary of models)

Lesson 6 Maximum Likelihood: Part III. (plus a quick bestiary of models) Lesson 6 Maximum Likelihood: Part III (plus a quick bestiary of models) Homework You want to know the density of fish in a set of experimental ponds You observe the following counts in ten ponds: 5,6,7,3,6,5,8,4,4,3

More information

Combining SEM & GREML in OpenMx. Rob Kirkpatrick 3/11/16

Combining SEM & GREML in OpenMx. Rob Kirkpatrick 3/11/16 Combining SEM & GREML in OpenMx Rob Kirkpatrick 3/11/16 1 Overview I. Introduction. II. mxgreml Design. III. mxgreml Implementation. IV. Applications. V. Miscellany. 2 G V A A 1 1 F E 1 VA 1 2 3 Y₁ Y₂

More information

Mixed models in R using the lme4 package Part 7: Generalized linear mixed models

Mixed models in R using the lme4 package Part 7: Generalized linear mixed models Mixed models in R using the lme4 package Part 7: Generalized linear mixed models Douglas Bates University of Wisconsin - Madison and R Development Core Team University of

More information

Outline. Mixed models in R using the lme4 package Part 3: Longitudinal data. Sleep deprivation data. Simple longitudinal data

Outline. Mixed models in R using the lme4 package Part 3: Longitudinal data. Sleep deprivation data. Simple longitudinal data Outline Mixed models in R using the lme4 package Part 3: Longitudinal data Douglas Bates Longitudinal data: sleepstudy A model with random effects for intercept and slope University of Wisconsin - Madison

More information

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy Type Package Title Model Comparisons for SEM Version 1.0 Date 2009-02-23 Author Roy Levy Package SEMModComp Maintainer Roy Levy February 19, 2015 Conduct tests of difference in fit for

More information

WU Weiterbildung. Linear Mixed Models

WU Weiterbildung. Linear Mixed Models Linear Mixed Effects Models WU Weiterbildung SLIDE 1 Outline 1 Estimation: ML vs. REML 2 Special Models On Two Levels Mixed ANOVA Or Random ANOVA Random Intercept Model Random Coefficients Model Intercept-and-Slopes-as-Outcomes

More information

Outline. Mixed models in R using the lme4 package Part 5: Generalized linear mixed models. Parts of LMMs carried over to GLMMs

Outline. Mixed models in R using the lme4 package Part 5: Generalized linear mixed models. Parts of LMMs carried over to GLMMs Outline Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates University of Wisconsin - Madison and R Development Core Team UseR!2009,

More information

MS&E 226. In-Class Midterm Examination Solutions Small Data October 20, 2015

MS&E 226. In-Class Midterm Examination Solutions Small Data October 20, 2015 MS&E 226 In-Class Midterm Examination Solutions Small Data October 20, 2015 PROBLEM 1. Alice uses ordinary least squares to fit a linear regression model on a dataset containing outcome data Y and covariates

More information

Regression diagnostics

Regression diagnostics Regression diagnostics Kerby Shedden Department of Statistics, University of Michigan November 5, 018 1 / 6 Motivation When working with a linear model with design matrix X, the conventional linear model

More information

New Introduction to Multiple Time Series Analysis

New Introduction to Multiple Time Series Analysis Helmut Lütkepohl New Introduction to Multiple Time Series Analysis With 49 Figures and 36 Tables Springer Contents 1 Introduction 1 1.1 Objectives of Analyzing Multiple Time Series 1 1.2 Some Basics 2

More information

Multilevel Analysis, with Extensions

Multilevel Analysis, with Extensions May 26, 2010 We start by reviewing the research on multilevel analysis that has been done in psychometrics and educational statistics, roughly since 1985. The canonical reference (at least I hope so) is

More information

Structural Equation Modeling and Confirmatory Factor Analysis. Types of Variables

Structural Equation Modeling and Confirmatory Factor Analysis. Types of Variables /4/04 Structural Equation Modeling and Confirmatory Factor Analysis Advanced Statistics for Researchers Session 3 Dr. Chris Rakes Website: http://csrakes.yolasite.com Email: Rakes@umbc.edu Twitter: @RakesChris

More information

An Introduction to Mplus and Path Analysis

An Introduction to Mplus and Path Analysis An Introduction to Mplus and Path Analysis PSYC 943: Fundamentals of Multivariate Modeling Lecture 10: October 30, 2013 PSYC 943: Lecture 10 Today s Lecture Path analysis starting with multivariate regression

More information

STA 4273H: Statistical Machine Learning

STA 4273H: Statistical Machine Learning STA 4273H: Statistical Machine Learning Russ Salakhutdinov Department of Statistics! rsalakhu@utstat.toronto.edu! http://www.utstat.utoronto.ca/~rsalakhu/ Sidney Smith Hall, Room 6002 Lecture 3 Linear

More information

Mixed models in R using the lme4 package Part 5: Generalized linear mixed models

Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates Madison January 11, 2011 Contents 1 Definition 1 2 Links 2 3 Example 7 4 Model building 9 5 Conclusions 14

More information

An Introduction to Path Analysis

An Introduction to Path Analysis An Introduction to Path Analysis PRE 905: Multivariate Analysis Lecture 10: April 15, 2014 PRE 905: Lecture 10 Path Analysis Today s Lecture Path analysis starting with multivariate regression then arriving

More information

Specifying Latent Curve and Other Growth Models Using Mplus. (Revised )

Specifying Latent Curve and Other Growth Models Using Mplus. (Revised ) Ronald H. Heck 1 University of Hawai i at Mānoa Handout #20 Specifying Latent Curve and Other Growth Models Using Mplus (Revised 12-1-2014) The SEM approach offers a contrasting framework for use in analyzing

More information

Linear Models Review

Linear Models Review Linear Models Review Vectors in IR n will be written as ordered n-tuples which are understood to be column vectors, or n 1 matrices. A vector variable will be indicted with bold face, and the prime sign

More information

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M.

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M. TIME SERIES ANALYSIS Forecasting and Control Fifth Edition GEORGE E. P. BOX GWILYM M. JENKINS GREGORY C. REINSEL GRETA M. LJUNG Wiley CONTENTS PREFACE TO THE FIFTH EDITION PREFACE TO THE FOURTH EDITION

More information

Section I. Define or explain the following terms (3 points each) 1. centered vs. uncentered 2 R - 2. Frisch theorem -

Section I. Define or explain the following terms (3 points each) 1. centered vs. uncentered 2 R - 2. Frisch theorem - First Exam: Economics 388, Econometrics Spring 006 in R. Butler s class YOUR NAME: Section I (30 points) Questions 1-10 (3 points each) Section II (40 points) Questions 11-15 (10 points each) Section III

More information

Path Analysis. PRE 906: Structural Equation Modeling Lecture #5 February 18, PRE 906, SEM: Lecture 5 - Path Analysis

Path Analysis. PRE 906: Structural Equation Modeling Lecture #5 February 18, PRE 906, SEM: Lecture 5 - Path Analysis Path Analysis PRE 906: Structural Equation Modeling Lecture #5 February 18, 2015 PRE 906, SEM: Lecture 5 - Path Analysis Key Questions for Today s Lecture What distinguishes path models from multivariate

More information

A Practitioner s Guide to Generalized Linear Models

A Practitioner s Guide to Generalized Linear Models A Practitioners Guide to Generalized Linear Models Background The classical linear models and most of the minimum bias procedures are special cases of generalized linear models (GLMs). GLMs are more technically

More information

EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7

EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7 Introduction to Generalized Univariate Models: Models for Binary Outcomes EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7 EPSY 905: Intro to Generalized In This Lecture A short review

More information

Mixed models in R using the lme4 package Part 5: Generalized linear mixed models

Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates 2011-03-16 Contents 1 Generalized Linear Mixed Models Generalized Linear Mixed Models When using linear mixed

More information

Additional Notes: Investigating a Random Slope. When we have fixed level-1 predictors at level 2 we show them like this:

Additional Notes: Investigating a Random Slope. When we have fixed level-1 predictors at level 2 we show them like this: Ron Heck, Summer 01 Seminars 1 Multilevel Regression Models and Their Applications Seminar Additional Notes: Investigating a Random Slope We can begin with Model 3 and add a Random slope parameter. If

More information

A comparison of parameter covariance estimation methods for item response models in an expectation-maximization framework

A comparison of parameter covariance estimation methods for item response models in an expectation-maximization framework Virginia Commonwealth University VCU Scholars Compass Psychiatry Publications Dept. of Psychiatry 2017 A comparison of parameter covariance estimation methods for item response models in an expectation-maximization

More information

Regression in R. Seth Margolis GradQuant May 31,

Regression in R. Seth Margolis GradQuant May 31, Regression in R Seth Margolis GradQuant May 31, 2018 1 GPA What is Regression Good For? Assessing relationships between variables This probably covers most of what you do 4 3.8 3.6 3.4 Person Intelligence

More information

Default Priors and Effcient Posterior Computation in Bayesian

Default Priors and Effcient Posterior Computation in Bayesian Default Priors and Effcient Posterior Computation in Bayesian Factor Analysis January 16, 2010 Presented by Eric Wang, Duke University Background and Motivation A Brief Review of Parameter Expansion Literature

More information

A multivariate multilevel model for the analysis of TIMMS & PIRLS data

A multivariate multilevel model for the analysis of TIMMS & PIRLS data A multivariate multilevel model for the analysis of TIMMS & PIRLS data European Congress of Methodology July 23-25, 2014 - Utrecht Leonardo Grilli 1, Fulvia Pennoni 2, Carla Rampichini 1, Isabella Romeo

More information

APPENDICES TO Protest Movements and Citizen Discontent. Appendix A: Question Wordings

APPENDICES TO Protest Movements and Citizen Discontent. Appendix A: Question Wordings APPENDICES TO Protest Movements and Citizen Discontent Appendix A: Question Wordings IDEOLOGY: How would you describe your views on most political matters? Generally do you think of yourself as liberal,

More information

A (Brief) Introduction to Crossed Random Effects Models for Repeated Measures Data

A (Brief) Introduction to Crossed Random Effects Models for Repeated Measures Data A (Brief) Introduction to Crossed Random Effects Models for Repeated Measures Data Today s Class: Review of concepts in multivariate data Introduction to random intercepts Crossed random effects models

More information

Introduction to Confirmatory Factor Analysis

Introduction to Confirmatory Factor Analysis Introduction to Confirmatory Factor Analysis Multivariate Methods in Education ERSH 8350 Lecture #12 November 16, 2011 ERSH 8350: Lecture 12 Today s Class An Introduction to: Confirmatory Factor Analysis

More information

How to run the RI CLPM with Mplus By Ellen Hamaker March 21, 2018

How to run the RI CLPM with Mplus By Ellen Hamaker March 21, 2018 How to run the RI CLPM with Mplus By Ellen Hamaker March 21, 2018 The random intercept cross lagged panel model (RI CLPM) as proposed by Hamaker, Kuiper and Grasman (2015, Psychological Methods) is a model

More information

Computationally Efficient Estimation of Multilevel High-Dimensional Latent Variable Models

Computationally Efficient Estimation of Multilevel High-Dimensional Latent Variable Models Computationally Efficient Estimation of Multilevel High-Dimensional Latent Variable Models Tihomir Asparouhov 1, Bengt Muthen 2 Muthen & Muthen 1 UCLA 2 Abstract Multilevel analysis often leads to modeling

More information

Penalized least squares versus generalized least squares representations of linear mixed models

Penalized least squares versus generalized least squares representations of linear mixed models Penalized least squares versus generalized least squares representations of linear mixed models Douglas Bates Department of Statistics University of Wisconsin Madison April 6, 2017 Abstract The methods

More information

[y i α βx i ] 2 (2) Q = i=1

[y i α βx i ] 2 (2) Q = i=1 Least squares fits This section has no probability in it. There are no random variables. We are given n points (x i, y i ) and want to find the equation of the line that best fits them. We take the equation

More information

A Introduction to Matrix Algebra and the Multivariate Normal Distribution

A Introduction to Matrix Algebra and the Multivariate Normal Distribution A Introduction to Matrix Algebra and the Multivariate Normal Distribution PRE 905: Multivariate Analysis Spring 2014 Lecture 6 PRE 905: Lecture 7 Matrix Algebra and the MVN Distribution Today s Class An

More information

Linear models. Linear models are computationally convenient and remain widely used in. applied econometric research

Linear models. Linear models are computationally convenient and remain widely used in. applied econometric research Linear models Linear models are computationally convenient and remain widely used in applied econometric research Our main focus in these lectures will be on single equation linear models of the form y

More information

MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7

MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7 MA 575 Linear Models: Cedric E. Ginestet, Boston University Midterm Review Week 7 1 Random Vectors Let a 0 and y be n 1 vectors, and let A be an n n matrix. Here, a 0 and A are non-random, whereas y is

More information

Review of CLDP 944: Multilevel Models for Longitudinal Data

Review of CLDP 944: Multilevel Models for Longitudinal Data Review of CLDP 944: Multilevel Models for Longitudinal Data Topics: Review of general MLM concepts and terminology Model comparisons and significance testing Fixed and random effects of time Significance

More information

Statistics: A review. Why statistics?

Statistics: A review. Why statistics? Statistics: A review Why statistics? What statistical concepts should we know? Why statistics? To summarize, to explore, to look for relations, to predict What kinds of data exist? Nominal, Ordinal, Interval

More information

3 Multiple Linear Regression

3 Multiple Linear Regression 3 Multiple Linear Regression 3.1 The Model Essentially, all models are wrong, but some are useful. Quote by George E.P. Box. Models are supposed to be exact descriptions of the population, but that is

More information

CHAPTER 9 EXAMPLES: MULTILEVEL MODELING WITH COMPLEX SURVEY DATA

CHAPTER 9 EXAMPLES: MULTILEVEL MODELING WITH COMPLEX SURVEY DATA Examples: Multilevel Modeling With Complex Survey Data CHAPTER 9 EXAMPLES: MULTILEVEL MODELING WITH COMPLEX SURVEY DATA Complex survey data refers to data obtained by stratification, cluster sampling and/or

More information

MLMED. User Guide. Nicholas J. Rockwood The Ohio State University Beta Version May, 2017

MLMED. User Guide. Nicholas J. Rockwood The Ohio State University Beta Version May, 2017 MLMED User Guide Nicholas J. Rockwood The Ohio State University rockwood.19@osu.edu Beta Version May, 2017 MLmed is a computational macro for SPSS that simplifies the fitting of multilevel mediation and

More information

Aedes egg laying behavior Erika Mudrak, CSCU November 7, 2018

Aedes egg laying behavior Erika Mudrak, CSCU November 7, 2018 Aedes egg laying behavior Erika Mudrak, CSCU November 7, 2018 Introduction The current study investivates whether the mosquito species Aedes albopictus preferentially lays it s eggs in water in containers

More information

Mixed models in R using the lme4 package Part 4: Theory of linear mixed models

Mixed models in R using the lme4 package Part 4: Theory of linear mixed models Mixed models in R using the lme4 package Part 4: Theory of linear mixed models Douglas Bates 8 th International Amsterdam Conference on Multilevel Analysis 2011-03-16 Douglas Bates

More information

W-BASED VS LATENT VARIABLES SPATIAL AUTOREGRESSIVE MODELS: EVIDENCE FROM MONTE CARLO SIMULATIONS

W-BASED VS LATENT VARIABLES SPATIAL AUTOREGRESSIVE MODELS: EVIDENCE FROM MONTE CARLO SIMULATIONS 1 W-BASED VS LATENT VARIABLES SPATIAL AUTOREGRESSIVE MODELS: EVIDENCE FROM MONTE CARLO SIMULATIONS An Liu University of Groningen Henk Folmer University of Groningen Wageningen University Han Oud Radboud

More information

A brief introduction to mixed models

A brief introduction to mixed models A brief introduction to mixed models University of Gothenburg Gothenburg April 6, 2017 Outline An introduction to mixed models based on a few examples: Definition of standard mixed models. Parameter estimation.

More information

Multilevel Statistical Models: 3 rd edition, 2003 Contents

Multilevel Statistical Models: 3 rd edition, 2003 Contents Multilevel Statistical Models: 3 rd edition, 2003 Contents Preface Acknowledgements Notation Two and three level models. A general classification notation and diagram Glossary Chapter 1 An introduction

More information

Reference: Davidson and MacKinnon Ch 2. In particular page

Reference: Davidson and MacKinnon Ch 2. In particular page RNy, econ460 autumn 03 Lecture note Reference: Davidson and MacKinnon Ch. In particular page 57-8. Projection matrices The matrix M I X(X X) X () is often called the residual maker. That nickname is easy

More information

So far our focus has been on estimation of the parameter vector β in the. y = Xβ + u

So far our focus has been on estimation of the parameter vector β in the. y = Xβ + u Interval estimation and hypothesis tests So far our focus has been on estimation of the parameter vector β in the linear model y i = β 1 x 1i + β 2 x 2i +... + β K x Ki + u i = x iβ + u i for i = 1, 2,...,

More information

MULTILEVEL IMPUTATION 1

MULTILEVEL IMPUTATION 1 MULTILEVEL IMPUTATION 1 Supplement B: MCMC Sampling Steps and Distributions for Two-Level Imputation This document gives technical details of the full conditional distributions used to draw regression

More information

Modelling heterogeneous variance-covariance components in two-level multilevel models with application to school effects educational research

Modelling heterogeneous variance-covariance components in two-level multilevel models with application to school effects educational research Modelling heterogeneous variance-covariance components in two-level multilevel models with application to school effects educational research Research Methods Festival Oxford 9 th July 014 George Leckie

More information

Package blme. August 29, 2016

Package blme. August 29, 2016 Version 1.0-4 Date 2015-06-13 Title Bayesian Linear Mixed-Effects Models Author Vincent Dorie Maintainer Vincent Dorie Package blme August 29, 2016 Description Maximum a posteriori

More information

Description Remarks and examples Reference Also see

Description Remarks and examples Reference Also see Title stata.com intro 2 Learning the language: Path diagrams and command language Description Remarks and examples Reference Also see Description Individual structural equation models are usually described

More information

What is Structural Equation Modelling?

What is Structural Equation Modelling? methods@manchester What is Structural Equation Modelling? Nick Shryane Institute for Social Change University of Manchester 1 Topics Where SEM fits in the families of statistical models Causality SEM is

More information

LECTURE 2 LINEAR REGRESSION MODEL AND OLS

LECTURE 2 LINEAR REGRESSION MODEL AND OLS SEPTEMBER 29, 2014 LECTURE 2 LINEAR REGRESSION MODEL AND OLS Definitions A common question in econometrics is to study the effect of one group of variables X i, usually called the regressors, on another

More information

The First Thing You Ever Do When Receive a Set of Data Is

The First Thing You Ever Do When Receive a Set of Data Is The First Thing You Ever Do When Receive a Set of Data Is Understand the goal of the study What are the objectives of the study? What would the person like to see from the data? Understand the methodology

More information

Introduction to Within-Person Analysis and RM ANOVA

Introduction to Within-Person Analysis and RM ANOVA Introduction to Within-Person Analysis and RM ANOVA Today s Class: From between-person to within-person ANOVAs for longitudinal data Variance model comparisons using 2 LL CLP 944: Lecture 3 1 The Two Sides

More information

STATS DOESN T SUCK! ~ CHAPTER 16

STATS DOESN T SUCK! ~ CHAPTER 16 SIMPLE LINEAR REGRESSION: STATS DOESN T SUCK! ~ CHAPTER 6 The HR manager at ACME food services wants to examine the relationship between a workers income and their years of experience on the job. He randomly

More information

Estimating Multilevel Linear Models as Structural Equation Models

Estimating Multilevel Linear Models as Structural Equation Models Bauer & Curran, Psychometric Society Paper Presentation, 6/2/02 Estimating Multilevel Linear Models as Structural Equation Models Daniel J. Bauer North Carolina State University Patrick J. Curran University

More information

Linear Models 1. Isfahan University of Technology Fall Semester, 2014

Linear Models 1. Isfahan University of Technology Fall Semester, 2014 Linear Models 1 Isfahan University of Technology Fall Semester, 2014 References: [1] G. A. F., Seber and A. J. Lee (2003). Linear Regression Analysis (2nd ed.). Hoboken, NJ: Wiley. [2] A. C. Rencher and

More information

Random Coefficient Model (a.k.a. multilevel model) (Adapted from UCLA Statistical Computing Seminars)

Random Coefficient Model (a.k.a. multilevel model) (Adapted from UCLA Statistical Computing Seminars) STAT:5201 Applied Statistic II Random Coefficient Model (a.k.a. multilevel model) (Adapted from UCLA Statistical Computing Seminars) School math achievement scores The data file consists of 7185 students

More information

Linear Regression. In this problem sheet, we consider the problem of linear regression with p predictors and one intercept,

Linear Regression. In this problem sheet, we consider the problem of linear regression with p predictors and one intercept, Linear Regression In this problem sheet, we consider the problem of linear regression with p predictors and one intercept, y = Xβ + ɛ, where y t = (y 1,..., y n ) is the column vector of target values,

More information

STAT 350: Geometry of Least Squares

STAT 350: Geometry of Least Squares The Geometry of Least Squares Mathematical Basics Inner / dot product: a and b column vectors a b = a T b = a i b i a b a T b = 0 Matrix Product: A is r s B is s t (AB) rt = s A rs B st Partitioned Matrices

More information

THE EFFECTS OF MULTICOLLINEARITY IN MULTILEVEL MODELS

THE EFFECTS OF MULTICOLLINEARITY IN MULTILEVEL MODELS THE EFFECTS OF MULTICOLLINEARITY IN MULTILEVEL MODELS A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy By PATRICK C. CLARK B.A., Indiana University

More information

Math 423/533: The Main Theoretical Topics

Math 423/533: The Main Theoretical Topics Math 423/533: The Main Theoretical Topics Notation sample size n, data index i number of predictors, p (p = 2 for simple linear regression) y i : response for individual i x i = (x i1,..., x ip ) (1 p)

More information

Bayes: All uncertainty is described using probability.

Bayes: All uncertainty is described using probability. Bayes: All uncertainty is described using probability. Let w be the data and θ be any unknown quantities. Likelihood. The probability model π(w θ) has θ fixed and w varying. The likelihood L(θ; w) is π(w

More information

PhD/MA Econometrics Examination. January, 2015 PART A. (Answer any TWO from Part A)

PhD/MA Econometrics Examination. January, 2015 PART A. (Answer any TWO from Part A) PhD/MA Econometrics Examination January, 2015 Total Time: 8 hours MA students are required to answer from A and B. PhD students are required to answer from A, B, and C. PART A (Answer any TWO from Part

More information

Using Estimating Equations for Spatially Correlated A

Using Estimating Equations for Spatially Correlated A Using Estimating Equations for Spatially Correlated Areal Data December 8, 2009 Introduction GEEs Spatial Estimating Equations Implementation Simulation Conclusion Typical Problem Assess the relationship

More information

FACTOR ANALYSIS AS MATRIX DECOMPOSITION 1. INTRODUCTION

FACTOR ANALYSIS AS MATRIX DECOMPOSITION 1. INTRODUCTION FACTOR ANALYSIS AS MATRIX DECOMPOSITION JAN DE LEEUW ABSTRACT. Meet the abstract. This is the abstract. 1. INTRODUCTION Suppose we have n measurements on each of taking m variables. Collect these measurements

More information

Assignment 1. SEM 2: Structural Equation Modeling

Assignment 1. SEM 2: Structural Equation Modeling Assignment 1 SEM 2: Structural Equation Modeling 2 Please hand in a.pdf file containing your report and a.r containing your codes or screenshots of every Jasp analysis. The deadline of this assignment

More information

Statistical Distribution Assumptions of General Linear Models

Statistical Distribution Assumptions of General Linear Models Statistical Distribution Assumptions of General Linear Models Applied Multilevel Models for Cross Sectional Data Lecture 4 ICPSR Summer Workshop University of Colorado Boulder Lecture 4: Statistical Distributions

More information

Key Algebraic Results in Linear Regression

Key Algebraic Results in Linear Regression Key Algebraic Results in Linear Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) 1 / 30 Key Algebraic Results in

More information

Vectors and Matrices Statistics with Vectors and Matrices

Vectors and Matrices Statistics with Vectors and Matrices Vectors and Matrices Statistics with Vectors and Matrices Lecture 3 September 7, 005 Analysis Lecture #3-9/7/005 Slide 1 of 55 Today s Lecture Vectors and Matrices (Supplement A - augmented with SAS proc

More information

Essential of Simple regression

Essential of Simple regression Essential of Simple regression We use simple regression when we are interested in the relationship between two variables (e.g., x is class size, and y is student s GPA). For simplicity we assume the relationship

More information

Time Series: Theory and Methods

Time Series: Theory and Methods Peter J. Brockwell Richard A. Davis Time Series: Theory and Methods Second Edition With 124 Illustrations Springer Contents Preface to the Second Edition Preface to the First Edition vn ix CHAPTER 1 Stationary

More information

Ron Heck, Fall Week 3: Notes Building a Two-Level Model

Ron Heck, Fall Week 3: Notes Building a Two-Level Model Ron Heck, Fall 2011 1 EDEP 768E: Seminar on Multilevel Modeling rev. 9/6/2011@11:27pm Week 3: Notes Building a Two-Level Model We will build a model to explain student math achievement using student-level

More information

Time-Invariant Predictors in Longitudinal Models

Time-Invariant Predictors in Longitudinal Models Time-Invariant Predictors in Longitudinal Models Today s Class (or 3): Summary of steps in building unconditional models for time What happens to missing predictors Effects of time-invariant predictors

More information

Streamlining Missing Data Analysis by Aggregating Multiple Imputations at the Data Level

Streamlining Missing Data Analysis by Aggregating Multiple Imputations at the Data Level Streamlining Missing Data Analysis by Aggregating Multiple Imputations at the Data Level A Monte Carlo Simulation to Test the Tenability of the SuperMatrix Approach Kyle M Lang Quantitative Psychology

More information

Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models

Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models EPSY 905: Multivariate Analysis Spring 2016 Lecture #12 April 20, 2016 EPSY 905: RM ANOVA, MANOVA, and Mixed Models

More information

Matrix Factorizations

Matrix Factorizations 1 Stat 540, Matrix Factorizations Matrix Factorizations LU Factorization Definition... Given a square k k matrix S, the LU factorization (or decomposition) represents S as the product of two triangular

More information

metasem: An R Package for Meta-Analysis using Structural Equation Modeling

metasem: An R Package for Meta-Analysis using Structural Equation Modeling metasem: An R Package for Meta-Analysis using Structural Equation Modeling Mike W.-L. Cheung Department of Psychology, National University of Singapore January 12, 2018 Abstract 1 The metasem package provides

More information

Business Analytics and Data Mining Modeling Using R Prof. Gaurav Dixit Department of Management Studies Indian Institute of Technology, Roorkee

Business Analytics and Data Mining Modeling Using R Prof. Gaurav Dixit Department of Management Studies Indian Institute of Technology, Roorkee Business Analytics and Data Mining Modeling Using R Prof. Gaurav Dixit Department of Management Studies Indian Institute of Technology, Roorkee Lecture - 04 Basic Statistics Part-1 (Refer Slide Time: 00:33)

More information

MA 575 Linear Models: Cedric E. Ginestet, Boston University Mixed Effects Estimation, Residuals Diagnostics Week 11, Lecture 1

MA 575 Linear Models: Cedric E. Ginestet, Boston University Mixed Effects Estimation, Residuals Diagnostics Week 11, Lecture 1 MA 575 Linear Models: Cedric E Ginestet, Boston University Mixed Effects Estimation, Residuals Diagnostics Week 11, Lecture 1 1 Within-group Correlation Let us recall the simple two-level hierarchical

More information

Linear, Generalized Linear, and Mixed-Effects Models in R. Linear and Generalized Linear Models in R Topics

Linear, Generalized Linear, and Mixed-Effects Models in R. Linear and Generalized Linear Models in R Topics Linear, Generalized Linear, and Mixed-Effects Models in R John Fox McMaster University ICPSR 2018 John Fox (McMaster University) Statistical Models in R ICPSR 2018 1 / 19 Linear and Generalized Linear

More information

Alternative implementations of Monte Carlo EM algorithms for likelihood inferences

Alternative implementations of Monte Carlo EM algorithms for likelihood inferences Genet. Sel. Evol. 33 001) 443 45 443 INRA, EDP Sciences, 001 Alternative implementations of Monte Carlo EM algorithms for likelihood inferences Louis Alberto GARCÍA-CORTÉS a, Daniel SORENSEN b, Note a

More information

MIXED MODELS THE GENERAL MIXED MODEL

MIXED MODELS THE GENERAL MIXED MODEL MIXED MODELS This chapter introduces best linear unbiased prediction (BLUP), a general method for predicting random effects, while Chapter 27 is concerned with the estimation of variances by restricted

More information

4 Multiple Linear Regression

4 Multiple Linear Regression 4 Multiple Linear Regression 4. The Model Definition 4.. random variable Y fits a Multiple Linear Regression Model, iff there exist β, β,..., β k R so that for all (x, x 2,..., x k ) R k where ε N (, σ

More information

SUPPLEMENT TO MARKET ENTRY COSTS, PRODUCER HETEROGENEITY, AND EXPORT DYNAMICS (Econometrica, Vol. 75, No. 3, May 2007, )

SUPPLEMENT TO MARKET ENTRY COSTS, PRODUCER HETEROGENEITY, AND EXPORT DYNAMICS (Econometrica, Vol. 75, No. 3, May 2007, ) Econometrica Supplementary Material SUPPLEMENT TO MARKET ENTRY COSTS, PRODUCER HETEROGENEITY, AND EXPORT DYNAMICS (Econometrica, Vol. 75, No. 3, May 2007, 653 710) BY SANGHAMITRA DAS, MARK ROBERTS, AND

More information

Restricted Maximum Likelihood in Linear Regression and Linear Mixed-Effects Model

Restricted Maximum Likelihood in Linear Regression and Linear Mixed-Effects Model Restricted Maximum Likelihood in Linear Regression and Linear Mixed-Effects Model Xiuming Zhang zhangxiuming@u.nus.edu A*STAR-NUS Clinical Imaging Research Center October, 015 Summary This report derives

More information

Linear Methods for Regression. Lijun Zhang

Linear Methods for Regression. Lijun Zhang Linear Methods for Regression Lijun Zhang zlj@nju.edu.cn http://cs.nju.edu.cn/zlj Outline Introduction Linear Regression Models and Least Squares Subset Selection Shrinkage Methods Methods Using Derived

More information