Model Assumptions; Predicting Heterogeneity of Variance

Similar documents
Generalized Linear Models for Non-Normal Data

Time-Invariant Predictors in Longitudinal Models

Time-Invariant Predictors in Longitudinal Models

Time-Invariant Predictors in Longitudinal Models

Time-Invariant Predictors in Longitudinal Models

An Introduction to Multilevel Models. PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 25: December 7, 2012

Introduction to Random Effects of Time and Model Estimation

Time Invariant Predictors in Longitudinal Models

Measurement Invariance (MI) in CFA and Differential Item Functioning (DIF) in IRT/IFA

Describing Within-Person Fluctuation over Time using Alternative Covariance Structures

Review of CLDP 944: Multilevel Models for Longitudinal Data

Introduction to Within-Person Analysis and RM ANOVA

Hierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture!

A Re-Introduction to General Linear Models (GLM)

Describing Change over Time: Adding Linear Trends

Generalized Models: Part 1

Describing Within-Person Change over Time

Review of Unconditional Multilevel Models for Longitudinal Data

Introduction to Generalized Models

Review of Multilevel Models for Longitudinal Data

over Time line for the means). Specifically, & covariances) just a fixed variance instead. PROC MIXED: to 1000 is default) list models with TYPE=VC */

Generalized Linear Models for Count, Skewed, and If and How Much Outcomes

SAS Syntax and Output for Data Manipulation:

A Re-Introduction to General Linear Models

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

Maximum Likelihood Estimation; Robust Maximum Likelihood; Missing Data with Maximum Likelihood

Exploratory Factor Analysis and Principal Component Analysis

Longitudinal Data Analysis of Health Outcomes

Exploratory Factor Analysis and Principal Component Analysis

Semiparametric Generalized Linear Models

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

Confirmatory Factor Models (CFA: Confirmatory Factor Analysis)

Course Introduction and Overview Descriptive Statistics Conceptualizations of Variance Review of the General Linear Model

Statistics Boot Camp. Dr. Stephanie Lane Institute for Defense Analyses DATAWorks 2018

INTRODUCTION TO MULTILEVEL MODELLING FOR REPEATED MEASURES DATA. Belfast 9 th June to 10 th June, 2011

Generalized Multilevel Models for Non-Normal Outcomes

Two-Level Models for Clustered* Data

SEM with Non Normal Data: Robust Estimation and Generalized Models

Simple, Marginal, and Interaction Effects in General Linear Models: Part 1

Describing Nonlinear Change Over Time

Statistical Distribution Assumptions of General Linear Models

Simple, Marginal, and Interaction Effects in General Linear Models

Chapter 1. Modeling Basics

EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7

Centering Predictor and Mediator Variables in Multilevel and Time-Series Models

Comparing IRT with Other Models

STA 216, GLM, Lecture 16. October 29, 2007

Basic IRT Concepts, Models, and Assumptions

Course Introduction and Overview Descriptive Statistics Conceptualizations of Variance Review of the General Linear Model

Models for longitudinal data

Longitudinal Data Analysis Using SAS Paul D. Allison, Ph.D. Upcoming Seminar: October 13-14, 2017, Boston, Massachusetts

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

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

Classification & Regression. Multicollinearity Intro to Nominal Data

Longitudinal Modeling with Logistic Regression

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

appstats27.notebook April 06, 2017

Advanced Regression Topics: Violation of Assumptions

An Introduction to Mplus and Path Analysis

Multilevel Analysis of Grouped and Longitudinal Data

Exam Applied Statistical Regression. Good Luck!

SAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data

Single-level Models for Binary Responses

Interactions among Continuous Predictors

Introduction to Confirmatory Factor Analysis

Generalized Linear Models

Stat 5100 Handout #26: Variations on OLS Linear Regression (Ch. 11, 13)

Bayesian Analysis of Latent Variable Models using Mplus

Review: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:

Generalized Linear. Mixed Models. Methods and Applications. Modern Concepts, Walter W. Stroup. Texts in Statistical Science.

Longitudinal Invariance CFA (using MLR) Example in Mplus v. 7.4 (N = 151; 6 items over 3 occasions)

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

Mixed Models for Longitudinal Ordinal and Nominal Outcomes

Ronald Heck Week 14 1 EDEP 768E: Seminar in Categorical Data Modeling (F2012) Nov. 17, 2012

Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p )

Categorical Predictor Variables

Introduction to mtm: An R Package for Marginalized Transition Models

11. Generalized Linear Models: An Introduction

Truck prices - linear model? Truck prices - log transform of the response variable. Interpreting models with log transformation

Heteroskedasticity in Panel Data

CPSC 340: Machine Learning and Data Mining

Review. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis

Heteroskedasticity in Panel Data

MULTIPLE REGRESSION AND ISSUES IN REGRESSION ANALYSIS

A Practitioner s Guide to Generalized Linear Models

Generalized linear models

An Introduction to Path Analysis

Generalized Linear Models (GLZ)

Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only)

A Course in Applied Econometrics Lecture 18: Missing Data. Jeff Wooldridge IRP Lectures, UW Madison, August Linear model with IVs: y i x i u i,

Multilevel Structural Equation Modeling

Review of Panel Data Model Types Next Steps. Panel GLMs. Department of Political Science and Government Aarhus University.

2/26/2017. PSY 512: Advanced Statistics for Psychological and Behavioral Research 2

CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M.

NELS 88. Latent Response Variable Formulation Versus Probability Curve Formulation

Univariate Normal Distribution; GLM with the Univariate Normal; Least Squares Estimation

Regression Model Building

Stat/F&W Ecol/Hort 572 Review Points Ané, Spring 2010

Experimental Design and Data Analysis for Biologists

Transcription:

Model Assumptions; Predicting Heterogeneity of Variance Today s topics: Model assumptions Normality Constant variance Predicting heterogeneity of variance CLP 945: Lecture 6 1

Checking for Violations of Model Assumptions: Why should we care? Fitting a model with untenable assumptions is as senseless as fitting a model to data that are knowingly flawed (Singer & Willett, pg. 17) HOWEVER: We don t actually know the true population relationships, so we don t know when our estimates, SE s, and p-values are off Recommended strategy: check assumptions of several initial models and any model you cite or interpret explicitly Mostly informal inspection requires judgment call We prefer visual inspection of residual distributions (S & W pg. 18) Some things are fixable, some things are not End goal: Analyze the data the least wrong way possible (because all models are wrong; some are useful) CLP 945: Lecture 6

General Consequences of Violating Model Assumptions parts of the model to be concerned with: Model for means = fixed effects Estimates depend on having the right model for the means all relevant predictors, measured with as little error as possible To the extent that predictors are missing or their effects are specified incorrectly, fixed effect estimates will be biased Model for the variances = random effects and residuals SE and p-values of fixed effects depend on having the right model for the variances most closely approximate actual data To the extent that the model for the variances is off, fixed effects SE and p-values will be off, too (biased) Because the general linear mixed model is estimated using a multivariate normal distribution for the V matrix, certain assumptions follow CLP 945: Lecture 6 3

General Linear Mixed Model Assumptions GLM Assumptions: Normality of residuals (not outcomes) Independence and constant variance of residuals Across sampling units Across predictors MLM Assumptions are the same, except: Apply at each level and across levels More general options are available for changing the model to accommodate violations of assumptions if needed (goal is to transform the model, not the data) ML also assumes MAR for any missing outcomes CLP 945: Lecture 6 4

Plots to Assess Assumptions: Normality Independence & Constant Variance Flat and Even Not Flat, but Even Positive Skew Flat, but Not Even Not Flat, Not Even CLP 945: Lecture 6 5

MLM Assumptions: Normality Multiple residuals to consider: Level-1 e ti residuals (multivariate) normal distribution e ti ~ N(0, R) where R = σ e e ti has a mean = 0 and some estimated variance(s) and potentially covariances as well (is an empirical question) Level- U i s multivariate normal distribution U 0i, U 1i, ~ N(0, G) If random intercept: G = τ U0 If random slopes: τ G = τ U s EACH have a mean = 0 and some estimated variance, with estimated covariances between them - The actual mean of U has another name: - Covariances not included by default: added with TYPE=UN U0 U01 τ U1 CLP 945: Lecture 6 6

3 Solutions for Non-Normality 1. Pick a new model for the level-1 e ti residuals Generalized linear mixed models to the rescue! Binary Logit or Probit, Ordinal Cumulative Logit Count Poisson or Negative Binomial (+ Zero-Inflated versions) Unfortunately, level- U s are still assumed multivariate normal Problems with skewness random effects CI s go out of bounds Tricky to estimate, but should use ML with numeric integration when possible (try to avoid older pseudo or quasi ML options). Transform your data carefully if at all... Assumptions apply to residuals, not to data! Complicates interpretations (linear relationships nonlinear) Inherently subjective (especially outlier removal) Check for extreme leverage on solution instead via INFLUENCE options after / on MODEL statement in PROC MIXED CLP 945: Lecture 6 7

3. Robust ML for Non-Normality MLR in Mplus: Yuan-Bentler T (permits MCAR or MAR missing) Same estimates and -LL, corrected standard errors for all model parameters χ -based fit statistics are adjusted based on an estimated scaling factor: Scaling factor = 1.000 = perfectly multivariate normal = same as ML Scaling factor > 1.000 = leptokurtosis (too-fat tails; fixes too big χ ) Scaling factor < 1.000 = platykurtosis (too-thin tails; fixes too small χ ) SEs computed with Huber-White sandwich estimator uses an information matrix from the variance of the partial first derivatives to correct the information matrix from the partial second derivatives Leptokurtosis (too-fat tails) increases information; fixes too small SEs Platykurtosis (too-thin tails) lowers information; fixes too big SEs In SAS: use EMPIRICAL option in PROC MIXED line SEs are computed the same way but for fixed effects only, but can be unstable in unbalanced data, especially in small samples SAS does not provide the needed scaling factor to adjust - LL test (not sure if this is a problem if you just use the fixed effect p-values) CLP 945: Lecture 6 8

Independence of Residuals At Level 1: Level-1 e ti residuals are uncorrelated across level-1 units Once random effects are modeled, residuals of the occasions from the same person are no longer correlated Solution for clustered or longitudinal models: Choose the right specification of random effects Random effects go in G; what s left in R is uncorrelated across observations Another solution for longitudinal models: Choose the right alternative for the structure of the residual variances and covariances over time Use R matrix or G and R matrices to better approximate observed data: Are the residuals still correlated (AR1, TOEP) after random effects? Are the variances over time homogeneous or heterogeneous? This falls under the constant variance assumption more on that later CLP 945: Lecture 6 9

Independence of Residuals At Level : Level- U i s are uncorrelated across level- units Implies no additional effects of clustering/nesting across persons after controlling for person-level predictors Two alternatives to deal with additional clustering/nesting: Via fixed effects: Add dummy codes as level- predictors Adjusts model for mean differences, but DOES NOT allow you to predict those mean differences Via random effects: Add more levels (e.g., for family, group) Adjusts model for mean differences, and it DOES allow you to predict those mean differences Like adding another part to G CLP 945: Lecture 6 10

Independence of Residuals Across Levels: Level-1 e ti residuals and Level- U i s are also uncorrelated Implies that what s left over at level-1 is not related to what s left over at level Could be violated if level- effects are not modeled separately from level-1 effects (i.e., if convergence of level-1 predictors is assumed when it shouldn t be) Solution: Don t smush anything! Allow different effects across upper levels for any lower-level predictor with respect to both main effects and interactions CLP 945: Lecture 6 11

Constant Variance of Residuals Across Sampling Units: Level- U i s have constant variance across level- units Implies no subgroups of individuals or groups that are more or less variable in terms of their distributions of random effects If not, we can fit a heterogeneous variance model instead (stay tuned) Level-1 e ti residuals have constant variance across level- units* Implies equal unexplained within-person variability across persons Check for missing random effects of level-1 X s or cross-level interactions If not, we can fit a heterogeneous variance model instead (stay tuned) Level-1 e ti residuals have constant variance across level-1 units Implies equal unexplained within-person variability across occasions Can add additional random slopes for time or fit a heterogeneous variance model instead (e.g., TOEPH instead of TOEP, data permitting) * Test for heterogeneity of level-1 residuals applicable sometimes if n > 10 or so (see Snijders & Bosker, 1999, p. 16-7) CLP 945: Lecture 6 1

Independence and Constant Variance of Residuals Across Predictors: Level-1 e ti residuals are flat with constant variance across level-1 X s Implies no remaining relationship of X-Y at level 1 Specific example: level-1 residuals are flat and even across time after fixed and random effects (but we can fit separate variances by time if needed) Check for potential nonlinear effects of level-1 predictors Level- U i s are flat with constant variance across level-1 X s Only possible relation between level- U i and level-1 X is through relationship between level- PMx and level- U i (so include PMx to avoid smushing) Level-1 e ti residuals are flat with constant variance across level- X s If not, we can fit a heterogeneous variance model instead (stay tuned) Level- U i s are flat with constant variance across level- X s Implies no remaining relationship of X-Y at level Check for potential nonlinear effects of level- predictors If not, we can fit a heterogeneous variance model instead (stay tuned) CLP 945: Lecture 6 13

Heterogeneous Variance Models Besides having random effects, predictors can play a role in predicting heterogeneity of variance at their level or lower: Level- predictors Differential level- random effects variances τ Differential level-1 residual variances σ Level-1 predictors Differential level-1 residual variances σ - LL tests used to see if extra heterogeneity effects are helpful Level- predictor of level- random effects variances for WP change: e.g., changes in height over time in boys and in girls? Boys may be taller and grow faster than girls on average Effect of sex and sex*time predict level of Y in model for the means Boys may be more variable than girls in their levels and rates of change in height Effect of sex different τ in level- model for the variances CLP 945: Lecture 6 14

Heterogeneous Variance Models Level- predictor of level- and level-1 variances for WP fluctuation: e.g., daily fluctuation in mood in men and in women Men may have worse negative mood than women on average Effect of sex predict level of Y in model for the means There may be greater variability among men than women in mean mood Effect of sex different τ in level- model for the variances Men may be more variable than women in their daily mood fluctuation Effect of sex different σ in level-1 model for the variances Level-1 predictor of level-1 variance for WP fluctuation: e.g., daily fluctuation in mood on stress/non-stress days Negative mood may be worse on average on stress days than non-stress days Effect of stress predict level of Y in model for the means There may be greater variation in mood on stress days than on non-stress days Effect of stress different σ in level-1 model for the variances CLP 945: Lecture 6 15

Estimating Heterogeneous Variance Models via PROC MIXED Different variances via GROUP=groupvar option after the / on the RANDOM statement for level or REPEATED statement for level 1 Less flexible than multiple-group SEM because the whole G and/or R matrix is either the same or different across groups (all or nothing) GROUP= is limited to categorical predictors (must use CLASS statement) Continuous level- predictors must use NLMIXED custom function instead In addition, different level-1 residual variances can be modeled via the LOCAL=EXP( ) option after / on REPEATED statement For categorical or continuous level- or level-1 predictors Cannot be used with any other R matrix structure besides VC Predicts natural log of the residual variance so prediction can t go negative: σ =α exp α X+α X ti e 0 1 1 CLP 945: Lecture 6 16

Estimating Heterogeneous Variance Models via PROC NLMIXED Can also write custom variance functions (see Hedeker s examples) More flexible, linear models approach can accommodate any combination of categorical or continuous predictors Here, an example of heterogeneous level- random intercept variance from Hoffman chapter 7 (see example for NLMIXED code) Level 1: Symptoms e ti 0i ti e Residual Variance: exp ti 0i Level : Intercept: (Women ) (Age 80) (Women )(Age 80) U 00 01(Women i ) 0(Agei 80) Random Intercept Variance U exp 0i 03(Women i )(Agei 80) Residual Variance: 0i 00 01 i 0 i 03 i i 0i 0i 00 η 0i is a placeholder (like β s in model for means) ε 00 is like fixed intercept of residual variance υ are effects for differential random intercept variance by intercept, sex, age and sex by age CLP 945: Lecture 6 17

Estimating Heterogeneous Variance Models via PROC NLMIXED Can test for a ω scale factor like a random intercept for individual differences in residual variance (in WP variation) From Hoffman Level 1: chapter 7 (see Symptomsti 0i eti example for Residual Variance: exp NLMIXED code) e ti 0i Level : Intercept: (Women ) (Age 80) (Women )(Age 80) U 0i 00 01 i 0 i 03 i i 0i Random Intercept Variance 0i U exp 00 No υ predictors of differential random intercept variance, just an intercept here Residual Variance: 0i 00 0i η 0i is a placeholder (like β s in model for means) ε 00 is like fixed intercept of residual variance ω 0i is like random intercept of residual variance CLP 945: Lecture 6 18

Estimating Heterogeneous Variance Level 1: Models via PROC NLMIXED i i Symptoms Mood Mood Stressor e ti 0i 1i ti i ti ti Residual Variance: e exp ti 0i 1i Mood ti Mood i Stressor ti Level : Intercept: Women Age 80 Women Age 80 0i 00 01 i 0 i 03 i i Moodi Stressori 0.40 Women Stressori 0.40 Moodi U 1i 10 14 i 04 08 09 i 0,16 0i Within-Person Mood: Mood Within-Person Stressor: Random Intercept Variance Residual Variance: i 0 1 i U 0i Women Women Age 80 Moodi Stressor i 0.40 Women Age 80 Moodi Stressori 0.40 0i 00 01 i 0 i 04 08 1i 10 i 0 00 01 i 0 i exp 04 08 ε are predictors of differential residual variance ω 0i was not estimable, so was not included From Hoffman chapter 8 (see example for NLMIXED code) υ predictors of differential random intercept variance CLP 945: Lecture 6 19

Assumptions of MLM: Summary Because model estimates, SEs, and fit statistics are derived from likelihood estimation using the multivariate normal distribution, their accuracy depends on its assumptions being met: Residuals at each level (level 1 = e ti values, level = U i values) are (1) normally distributed, () uncorrelated at each level and across levels, (U i values can be correlated within their level), and (3) equally distributed across X s at each level and across levels. If not: (1) transform the data (meh) or pick a generalized model for non-linear outcomes (better when possible), or use robust ML for corrected SE s () add fixed or random effects (or a correlation over time), (3) make sure predictive relationships are correctly specified, and then consider heterogeneous variance models if needed. CLP 945: Lecture 6 0