Example: bankruptcy

Multilevel Modeling in R (2.7)

Multilevel Modeling in R ( ) A Brief Introduction to R, the Multilevel package and the nlme package Paul Bliese August 3, 2016 Multilevel Models in R 2 Copyright 2016, Paul Bliese. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. For other permissions, please contact Paul Bliese at Chapters 1 and 2 of this document of this document borrow heavily from An Introduction to R (see the copyright notice below) An Introduction to R Notes on R: A Programming Environment for Data Analysis and Graphics Version (2000 August 15) R Development Core Team.

multilevel package contains many functions designed around testing within-group agreement and reliability. This document is designed to cover a broad range of tools and approaches for analyzing multilevel data. Having worked for over two decades with both R …

Tags:

  Testing

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Multilevel Modeling in R (2.7)

1 Multilevel Modeling in R ( ) A Brief Introduction to R, the Multilevel package and the nlme package Paul Bliese August 3, 2016 Multilevel Models in R 2 Copyright 2016, Paul Bliese. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. For other permissions, please contact Paul Bliese at Chapters 1 and 2 of this document of this document borrow heavily from An Introduction to R (see the copyright notice below) An Introduction to R Notes on R: A Programming Environment for Data Analysis and Graphics Version (2000 August 15) R Development Core Team.

2 Copyright c 1990, 1992 W. Venables Copyright c 1997, R. Gentleman & R. Ihaka Copyright c 1997, 1998 M. Copyright c 1999, 2000 R Development Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

3 Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Development Core Team Multilevel Models in R 3 Table of Contents 1 Introduction .. 5 2 An Introduction to R .. 6 Overview .. 6 Related software and documentation .. 6 R and statistics .. 6 Obtaining R and the Multilevel package .. 7 Data permanency and removing objects .. 7 Running R for Different Projects.

4 8 Recall and correction of previous commands .. 8 Getting help with functions and features .. 8 R commands, case sensitivity, 9 Simple manipulations; numbers and vectors .. 9 Vectors and assignment .. 9 Missing values .. 10 Dataframes .. 10 Introduction to dataframes .. 10 Making 11 Managing the search path .. 11 Reading data from files .. 12 Reading Spreadsheet (EXCEL) data .. 12 The extremely useful "clipboard" option .. 14 The foreign package and SPSS files .. 15 Using to bring up a GUI to read data.

5 17 Checking your dataframes with str , summary, and head .. 17 Loading data from packages .. 18 Exporting data to spreadsheets using write() and () .. 18 More on using matrix brackets on dataframes .. 19 Identifying Statistical models in R .. 20 Examples .. 20 Linear 21 Generic functions for extracting model information .. 21 Graphical procedures .. 22 The plot() function .. 22 Displaying multivariate data .. 22 Advanced Graphics and the lattice package .. 23 3 Multilevel 24 Attaching the Multilevel and nlme packages.

6 25 Multilevel data manipulation functions .. 25 The merge Function .. 25 The aggregate function .. 27 Within-Group Agreement and Reliability .. 28 Agreement: rwg, rwg(j), and r*wg(j) .. 29 The awg Index .. 31 Significance testing of rwg and rwg(j) using and .. 32 Multilevel Models in R 4 Average Deviation (AD) Agreement using .. 35 Significance testing of AD using .. 36 Agreement: Random Group Resampling .. 37 Reliability: ICC(1) and ICC(2) .. 41 Estimate multiple ICC values: .. 42 Comparing ICC values with a two-stage bootstrap.

7 42 Visualizing an ICC(1) with .. 43 Simulating ICC(1) values with .. 44 Regression and Contextual OLS Models .. 46 Contextual Effect Example .. 46 Correlation Decomposition and the Covariance Theorem .. 48 The waba and cordif functions .. 49 Random Group Resampling of Covariance Theorem ( ) .. 50 4 Mixed-Effects Models for Multilevel Data .. 51 Steps in Multilevel Modeling .. 52 Step 1: Examine the ICC for the Outcome .. 52 Step 2: Explain Level 1 and 2 Intercept Variance .. 55 Step 3: Examine and Predict Slope Variance.

8 57 Plotting an interaction with .. 63 Some Notes on Centering .. 63 Estimating Group-Mean Reliability (ICC2) with GmeanRel .. 65 5 Growth Modeling Repeated Measures Data .. 66 Methodological challenges .. 66 Data Structure and the Function .. 67 Growth Modeling Illustration .. 69 Step 1: Examine the DV .. 71 Step 2: Model Time .. 71 Step 3: Model Slope Variability .. 72 Step 4: Modeling Error Structures .. 72 Step 5: Predicting Intercept 75 Step 6: Predicting Slope Variation .. 76 Discontinuous Growth Models.

9 77 testing Emergence by Examining Error Structure .. 79 Empirical Bayes estimates .. 81 6 A brief introduction to lme4 .. 84 Dichotomous outcomes .. 84 Crossed and partially crossed models .. 86 Predicting values in lme4 .. 86 7 Miscellaneous Functions .. 87 Scale reliability: cronbach and .. 87 Random Group Resampling for OLS Regression Models .. 87 Estimating bias in nested regression models: simbias .. 87 Detecting mediation effects: sobel .. 87 8 Conclusion .. 88 9 References .. 88 Multilevel Models in R 5 1 Introduction This is an introduction to how R can be used to perform a wide variety of Multilevel analyses.

10 Multilevel analyses are applied to data that have some form of a nested structure. For instance, individuals may be nested within workgroups, or repeated measures may be nested within individuals. Nested structures in data are often accompanied by some form of non-independence. For instance, in work settings, individuals in the same workgroup often display similar performance and provide similar responses to questions about aspects of the work environment. Likewise, in repeated measures data, individuals typically display a high degree of similarity in responses over time.


Related search queries