HLM PSY 515 Jim Graham Fall 2007. Fixed Effects So far, most of we have dealt with uses what are called fixed effects. So far, most of we have dealt with.

Slides:



Advertisements
Similar presentations
Questions From Yesterday
Advertisements

Modeling of Data. Basic Bayes theorem Bayes theorem relates the conditional probabilities of two events A, and B: A might be a hypothesis and B might.
Kin 304 Regression Linear Regression Least Sum of Squares
Random Assignment Experiments
Nested Example Using SPSS David A. Kenny January 8, 2014.
Lecture 28 Categorical variables: –Review of slides from lecture 27 (reprint of lecture 27 categorical variables slides with typos corrected) –Practice.
Linear Regression.
Chapter 12 Multiple Regression
Clustered or Multilevel Data
So far, we have considered regression models with dummy variables of independent variables. In this lecture, we will study regression models whose dependent.
Lecture 9: One Way ANOVA Between Subjects
An Introduction to Logistic Regression
Ch. 14: The Multiple Regression Model building
Introduction to Linear and Logistic Regression. Basic Ideas Linear Transformation Finding the Regression Line Minimize sum of the quadratic residuals.
Multiple Regression 2 Sociology 5811 Lecture 23 Copyright © 2005 by Evan Schofer Do not copy or distribute without permission.
Introduction to Multilevel Modeling Using SPSS
Multilevel Modeling: Other Topics
Statistical Analyses & Threats to Validity
Moderation & Mediation
Chapter 4-5: Analytical Solutions to OLS
Random Sampling, Point Estimation and Maximum Likelihood.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 15 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
Correlation and Linear Regression. Evaluating Relations Between Interval Level Variables Up to now you have learned to evaluate differences between the.
Learning Theory Reza Shadmehr logistic regression, iterative re-weighted least squares.
Various topics Petter Mostad Overview Epidemiology Study types / data types Econometrics Time series data More about sampling –Estimation.
MGS3100_04.ppt/Sep 29, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Regression Sep 29 and 30, 2015.
Chapter 4 Linear Regression 1. Introduction Managerial decisions are often based on the relationship between two or more variables. For example, after.
Copyright © 2006 The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Dummy Variable Regression Models chapter ten.
MARKETING RESEARCH CHAPTER 18 :Correlation and Regression.
HLM Models. General Analysis Strategy Baseline Model - No Predictors Model 1- Level 1 Predictors Model 2 – Level 2 Predictors of Group Mean Model 3 –
Multilevel Modeling: Other Topics David A. Kenny January 7, 2014.
Welcome to Econ 420 Applied Regression Analysis Study Guide Week Seven.
Multiple Regression. Simple Regression in detail Y i = β o + β 1 x i + ε i Where Y => Dependent variable X => Independent variable β o => Model parameter.
28. Multiple regression The Practice of Statistics in the Life Sciences Second Edition.
Generalized Linear Models (GLMs) and Their Applications.
FIXED AND RANDOM EFFECTS IN HLM. Fixed effects produce constant impact on DV. Random effects produce variable impact on DV. F IXED VS RANDOM EFFECTS.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 14-1 Chapter 14 Introduction to Multiple Regression Basic Business Statistics 10 th Edition.
Hypothesis Testing Introduction to Statistics Chapter 8 Feb 24-26, 2009 Classes #12-13.
Machine Learning 5. Parametric Methods.
Multiple Regression David A. Kenny January 12, 2014.
D/RS 1013 Discriminant Analysis. Discriminant Analysis Overview n multivariate extension of the one-way ANOVA n looks at differences between 2 or more.
Nonparametric Statistics
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
Simple linear regression. What is simple linear regression? A way of evaluating the relationship between two continuous variables. One variable is regarded.
1/25 Introduction to Econometrics. 2/25 Econometrics Econometrics – „economic measurement“ „May be defined as the quantitative analysis of actual economic.
Lecturer: Ing. Martina Hanová, PhD. Business Modeling.
Simple linear regression. What is simple linear regression? A way of evaluating the relationship between two continuous variables. One variable is regarded.
Chapter 11 REGRESSION Multiple Regression  Uses  Explanation  Prediction.
INTRODUCTION TO RESEARCH METHODS IN ECONOMICS Topic 5 Data Collection Strategies These slides are copyright © 2010 by Tavis Barr. This work is licensed.
Methods of Presenting and Interpreting Information Class 9.
Chapter 4: Basic Estimation Techniques
Chapter 7. Classification and Prediction
Statistical Modelling
ENME 392 Regression Theory
Experimental Design-Chapter 8
Nested Example Using SPSS
Kin 304 Regression Linear Regression Least Sum of Squares
Linear Mixed Models in JMP Pro
Controlling Contaminating or “Nuisance” Variables
Multiple Regression.
Multiple Regression Example
BPK 304W Regression Linear Regression Least Sum of Squares
Statistical Methods For Engineers
Multiple Regression Analysis with Qualitative Information
Mathematical Foundations of BME Reza Shadmehr
Parametric Methods Berlin Chen, 2005 References:
An Introductory Tutorial
MGS 3100 Business Analysis Regression Feb 18, 2016
Presentation transcript:

HLM PSY 515 Jim Graham Fall 2007

Fixed Effects So far, most of we have dealt with uses what are called fixed effects. So far, most of we have dealt with uses what are called fixed effects. A fixed variable is assumed to be measured without error. A fixed variable is assumed to be measured without error. Regression considers y as having error, but not the predictors: Regression considers y as having error, but not the predictors: ŷ = a + b (x) y = a + b (x) + error y = ŷ + error

X1X1 Y X2X2 ŷ error

ŷ X1X1 X3X3 X2X2 Y Multiple Regression

Fixed Effects In a fixed effects model, the regression coefficients are assumed to be the same for everyone in the population In a fixed effects model, the regression coefficients are assumed to be the same for everyone in the population The regression equation obtained from one study should be the same as the equation obtained from another study using the same population. The regression equation obtained from one study should be the same as the equation obtained from another study using the same population. The regression coefficients are invariant within a population. The regression coefficients are invariant within a population.

Fixed Effects The regression coefficients are assumed to be the same for everyone in the population The regression coefficients are assumed to be the same for everyone in the population The regression equation obtained from one study should be the same as the equation obtained from another study using the same population. The regression equation obtained from one study should be the same as the equation obtained from another study using the same population. The regression coefficients are invariant within a population. The regression coefficients are invariant within a population. Random Effects The regression coefficients vary within a population, and possess a certain probability distribution The regression coefficients vary within a population, and possess a certain probability distribution The regression equation obtained from one study can differ from the equation obtained from another study using the same population. The regression equation obtained from one study can differ from the equation obtained from another study using the same population. The regression coefficients vary within a population. The regression coefficients vary within a population.

Fixed effects cannot be generalized beyond the population from which the sample is drawn, or beyond the specific values used in the study Fixed effects cannot be generalized beyond the population from which the sample is drawn, or beyond the specific values used in the study e.g., drug outcome study examining 0, 5, and 10 mg of a drug cannot tell us anything about what taking 7 mg of the drug might do. e.g., drug outcome study examining 0, 5, and 10 mg of a drug cannot tell us anything about what taking 7 mg of the drug might do. Random effects can be generalized more broadly, and results can be generalized beyond the specific values. Random effects can be generalized more broadly, and results can be generalized beyond the specific values.

Ordinary Least Squares: Coefficients minimize the squared difference between the actual and predicted values of y; These values are maximized for a given sample; Cross-validation must be used to examine generalizability. Ordinary Least Squares: Coefficients minimize the squared difference between the actual and predicted values of y; These values are maximized for a given sample; Cross-validation must be used to examine generalizability. Maximum Likelihood: Maximizes the fit of the data to the model. This uses an iterative process, where a series of values are used until a good fit is found. These coefficients maximize the likelihood function Maximum Likelihood: Maximizes the fit of the data to the model. This uses an iterative process, where a series of values are used until a good fit is found. These coefficients maximize the likelihood function A likelihood function is the probability (or probability density) for the occurrence of a sample configuration, given a known probability density A likelihood function is the probability (or probability density) for the occurrence of a sample configuration, given a known probability density

In fixed effects models, regression coefficients are conceptualized as constants. In fixed effects models, regression coefficients are conceptualized as constants. In random effects models, regression coefficients are conceptualized as variables. In random effects models, regression coefficients are conceptualized as variables.

HLM HLM is multi-level mixed-effects regression. HLM is multi-level mixed-effects regression. A great deal of data exist in a nested structure: A great deal of data exist in a nested structure: Assignments within students within classes within teachers within schools within districts within states within regions, Assignments within students within classes within teachers within schools within districts within states within regions, Days within individuals within therapists Days within individuals within therapists Trials within people within experimental conditions Trials within people within experimental conditions People within families within countries People within families within countries Once you start thinking about nested data structures, you start seeing them EVERYWHERE Once you start thinking about nested data structures, you start seeing them EVERYWHERE

Variables in HLM In HLM, variables exist at different levels. In HLM, variables exist at different levels. Vary moment by moment within individuals Is constant within individuals Are constant within individuals Vary from individual to individual Varies from individual to individuals Are constant for individuals in the same city Vary from city to city Varies from city to city Variable Experience LevelIndividual LevelCity Level Mood States Gender Crime Rate

Variables in HLM In HLM, variables exist at different levels. In HLM, variables exist at different levels. Vary moment by moment within individuals Is constant within individuals Are constant within individuals Vary from individual to individual Varies from individual to individuals Are constant for individuals in the same city Vary from city to city Varies from city to city Variable Experience LevelIndividual LevelCity Level Mood States Gender Crime Rate

Variables in HLM In HLM, variables exist at different levels. In HLM, variables exist at different levels. Vary moment by moment within individuals Is constant within individuals Are constant within individuals Vary from individual to individual Varies from individual to individuals Are constant for individuals in the same city Vary from city to city Varies from city to city Variable Experience LevelIndividual LevelCity Level Mood States Gender Crime Rate

We are interested in studying the relationships between mood states, stress level, and gender. A fixed-effects approach might manipulate the mood of participants and look at the effect on the level of stress, or manipulate the level of stress experienced and look at changes in mood. Neither of these approaches would allow one to generalize beyond those specific levels

Using HLM, we might consider experiences nested within individuals. Using HLM, we might consider experiences nested within individuals. Mood states and stress level vary within individuals moment-by-moment and between individuals. Level 1 Mood states and stress level vary within individuals moment-by-moment and between individuals. Level 1 Gender (dummy-coded 0=male, 1=female) is constant within individuals moment-by-moment and varies between individuals. Level 2 Gender (dummy-coded 0=male, 1=female) is constant within individuals moment-by-moment and varies between individuals. Level 2

6 individuals (3 men and 3 women) are followed over the course of a day and their mood and stress level are sampled 10 times. 6 individuals (3 men and 3 women) are followed over the course of a day and their mood and stress level are sampled 10 times. For each individual, a regression equation using stress level to predict mood For each individual, a regression equation using stress level to predict mood A series of regression equations are then obtained: A series of regression equations are then obtained:

Male 1:Mood = (Stress) + e Male 2: Mood = (Stress) + e Male 3:Mood = (Stress) + e Female 1:Mood = (Stress) + e Female 2:Mood = (Stress) + e Female 2:Mood = (Stress) + e

Male 1:Mood = (Stress) + e Male 2: Mood = (Stress) + e Male 3:Mood = (Stress) + e Female 1:Mood = (Stress) + e Female 2:Mood = (Stress) + e Female 2:Mood = (Stress) + e The regression coefficients are NOT treated as constants. Rather, they vary across individuals.

Male 1:Mood = (Stress) + e Male 2: Mood = (Stress) + e Male 3:Mood = (Stress) + e Female 1:Mood = (Stress) + e Female 2:Mood = (Stress) + e Female 2:Mood = (Stress) + e In a general form, each individual has their own regression equation, in the form of: Mood = B0 + B1 (Stress) + error Because B0 and B1 are variables (and not constants), they can be used as variables at level 2

Level 1:Mood = B0 + B1 (Stress) + error

Level 2:B0 = G00 + G01 (Gender) + error Remember that B0 is … ? The regression weight B0 from level 1 becomes the outcome variable at level 2

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error Remember that B0 is the mood of an individual when stress is equal to 0 This equation predicts mood under no stress with gender. Gender is dummy coded as 0 = male, 1 = female

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error ?

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error The value of BO when Gender=0

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error The mood under no stress when Gender=0

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error The mood of men under no stress. ?

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error The mood of men under no stress. The increase in BO for every point increase in gender

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error The mood of men under no stress. The increase in mood under no stress for every point increase in gender

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error The mood of men under no stress. The difference in mood under no stress between men and women

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error Remember that B1 is the increase in mood for every point that stress increases This equation predicts the relationship between stress and mood.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The value of B1 when gender = 0.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The value of B1 for men.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The increase in mood for every point that stress increases for men. The relationship between mood and stress for men.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The increase in mood for every point that stress increases for men. The increase in the relationship between mood and stress for men. The increase in B1 for every point that gender increases.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The increase in mood for every point that stress increases for men. The increase in the relationship between mood and stress for men. The increase in the relationship between stress and mood for every point that gender increases.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The increase in mood for every point that stress increases for men. The increase in the relationship between mood and stress for men. The difference between men and women in the relationship between stress and mood.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error The increase in mood for every point that stress increases for men. The relationship between mood and stress for men. The difference between men and women in the relationship between stress and mood. Cross-level Interaction!

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error B0, G00 = The mood of men under no stress. B1, G10 = The increase in mood for every point that stress increases for men. G01 = The difference in mood under no stress between men and women G11 = The difference between men and women in the relationship between stress and mood.

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error B0, G00 = The mood of men under no stress. B1, G10 = The increase in mood for every point that stress increases for men. G01 = The difference in mood under no stress between men and women G11 = The difference between men and women in the relationship between stress and mood. Relationship between stress and mood Relationship between gender and mood Relationship between gender by stress and mood

Level 1:Mood = (Stress) + error Level 2:B0 = (Gender) + error B1 = (Gender) + error What is the mood of men under no stress? What is the mood of men under no stress? What is the mood of women under no stress? What is the mood of women under no stress? How does men’s mood change for every point increase in stress? How does men’s mood change for every point increase in stress? How does women’s mood change for every point increase in stress? How does women’s mood change for every point increase in stress? What is the difference in mood between men and women? What is the difference in mood between men and women? What is the difference in the relationship between stress and mood between men and women? What is the difference in the relationship between stress and mood between men and women?

Level 1:Mood = (Stress) + error Level 2:B0 = (Gender) + error B1 = (Gender) + error What is the mood of men under no stress? What is the mood of men under no stress? What is the mood of women under no stress? What is the mood of women under no stress? How does men’s mood change for every point increase in stress? How does men’s mood change for every point increase in stress? How does women’s mood change for every point increase in stress? How does women’s mood change for every point increase in stress? What is the difference in stress between men and women? What is the difference in stress between men and women? What is the difference in the relationship between stress and mood between men and women? What is the difference in the relationship between stress and mood between men and women? 5 3 Goes down half a point Goes down a quarter of a point -2.25

Centering In the preceding examples, variables are entered in their raw, uncentered forms. In the preceding examples, variables are entered in their raw, uncentered forms. As such, 0 means 0. As such, 0 means 0. It is often advantageous to change the meaning of 0. It is often advantageous to change the meaning of 0. HLM uses two forms of centering: HLM uses two forms of centering: Group-mean centered: centered about one’s own level 1 “group” average. Group-mean centered: centered about one’s own level 1 “group” average. 0 is that individual’s average 0 is that individual’s average Grand-mean centered: centered about the overall average of everyone. Grand-mean centered: centered about the overall average of everyone. 0 is the average of everyone 0 is the average of everyone

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error B0, G00 = The mood of men under no stress. B1, G10 = The increase in mood for every point that stress increases for men. G01 = The difference in mood under no stress between men and women G11 = The difference between men and women in the relationship between stress and mood. If stress is uncentered

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error B0, G00 = The average mood of men. B1, G10 = The increase in mood for every point that stress increases for men. G01 = The average difference in mood between men and women G11 = The difference between men and women in the relationship between stress and mood. If stress is group-mean centered

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error B0, G00 = The average mood of the participants. B1, G10 = The increase in mood for every point that stress increases. G01 = The average difference in mood between men and women G11 = The difference between men and women in the relationship between stress and mood. If stress is group-mean centered and gender is grand-mean centered

Centering Generally, we will: Generally, we will: enter dummy variables uncentered enter dummy variables uncentered Group-mean center continuous variables at level 1 Group-mean center continuous variables at level 1 Grand-mean center continuous variables at level 2 Grand-mean center continuous variables at level 2

3-level HLM Considering the precious example, suppose the participants we were looking at are members of romantic couples, and we’re interested in examining how the length of the relationship. Considering the precious example, suppose the participants we were looking at are members of romantic couples, and we’re interested in examining how the length of the relationship. Level 1: Mood, Stress Level 1: Mood, Stress Varies within individuals, within romantic couples, and between couples Varies within individuals, within romantic couples, and between couples Level 2: Gender Level 2: Gender Constant within an individual and varies between members of the same romantic couple and between couples Constant within an individual and varies between members of the same romantic couple and between couples Level 3: Relationship Length Level 3: Relationship Length Constant within individuals and members of the same couple, varies between different couples Constant within individuals and members of the same couple, varies between different couples

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error Level 3:G00 = P000 + P001 (Length) + error G10 = P100 + P101 (Length) + error G01 = P010 + P011 (Length) + error G11 = P110 + P111 (Length) + error If stress is group-mean centered

Level 1:Mood = B0 + B1 (Stress) + error Level 2:B0 = G00 + G01 (Gender) + error B1 = G10 + G11 (Gender) + error Level 3:G00 = P000 + P001 (Length) + error G10 = P100 + P101 (Length) + error G01 = P010 + P011 (Length) + error G11 = P110 + P111 (Length) + error If stress is group-mean centered Relation between mood and relationship length Stress by Length Interaction Gender by Length Interaction Stress by gender by length interaction

4-level HLM

Just kidding Just kidding I have reserved MH 18 computer lab for you this Thursday and next. the 7th and the 14th. Pleased be advised that Symons precedes you on the 7th and Sattler on the 14th - right up till your start time. Please advise your incoming students to respect their classes till they exit the room. I have reserved MH 18 computer lab for you this Thursday and next. the 7th and the 14th. Pleased be advised that Symons precedes you on the 7th and Sattler on the 14th - right up till your start time. Please advise your incoming students to respect their classes till they exit the room. Thanks, Ken Thanks, Ken

HLM Data must be structured by level and sorted by ID: Data must be structured by level and sorted by ID: Level 1 variables Level 1 variables Timestamp Timestamp Individual ID Individual ID Couple ID Couple ID Stress Stress Mood Mood Level 2 variables Level 2 variables Individual ID Individual ID Couple ID Couple ID Gender Gender Level 3 variables Level 3 variables Couple ID Couple ID Relationship Length Relationship Length