Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multilevel Linear Models Field, Chapter 19. Why use multilevel models? Meeting the assumptions of the linear model – Homogeneity of regression coefficients.

Similar presentations


Presentation on theme: "Multilevel Linear Models Field, Chapter 19. Why use multilevel models? Meeting the assumptions of the linear model – Homogeneity of regression coefficients."— Presentation transcript:

1 Multilevel Linear Models Field, Chapter 19

2 Why use multilevel models? Meeting the assumptions of the linear model – Homogeneity of regression coefficients – Independence of observations – Missing data More power (sort of)

3 Random intercepts Y i =(b 0 + u 0i ) + b 1 X 1i + ε i What are the coefficients? – b 0 : overall intercept – u 0 : individual deviation – b 1 : slope coefficient What does this look like? – To the board!

4 Random intercepts, continued What does u 0 represent, substantively? – Individual differences in signal rate change

5 Changes in -2LogLikelihood Why do this? – Test if random coefficients “improve” the model Generally applicable technique for a range of models Caveats – Need to use ML, not REML – New model needs to be nested within old

6 Writing the population model What’s the population model for the data we used last week? Fixed effects: – Y i =b 0 + b 1 Coil i + b 2 Accelerationx2 + b 3 Accelerationx3 + b 4 Resolution 3 + ε i Random intercept: Y i =(b 0 + u 0i ) + b 1 X 1i + b 2 Accelerationx2 + b 3 Accelerationx3 + b 3 Resolution 3 + ε i

7 Setting up the dataset Currently in wide format – multiple outcome variables per subject Need to go to long – multiple cases per subject (What’s the difference?) Before we start, take a snapshot of your data: you’ll need it later!

8 In SPSS Same dataset as last time Step 1: Data -> Restructure – Which option do we want?

9 In SPSS 2 Decide how many measurements are taken under each condition. – Which option do we want, and when might we choose differently?

10 In SPSS 3 Which variables are: ID, transposed, and fixed?

11 In SPSS 4 What are the conditions under which the outcome was measured in each subject? – coil and acceleration – choose two indices

12 In SPSS 5 Which variable is the major grouping variable? – Coil, because levels of acceleration are nested within levels of coil (only in the data set-up!)

13 In SPSS 6 Let’s no drop any information Paste the syntax, then run it Make sense of the syntax VARSTOCASES /MAKE trans1 FROM a0_12 a2_12 a3_12 a0_32 a2_32 a3_32 /INDEX=Index1 "coil"(2) Index2 "acceleration"(3) /KEEP=subj resolution /NULL=KEEP.

14 Starting the analysis Analyze -> Mixed Models -> Linear Select your variables

15 Identifying variables Select dependent variable, factors, and covariates

16 Fixed variables For now, we won't allow random intercepts Which variables have fixed effects?

17 Log Likelihood Which method should we use for estimation? – Maximum likelihood

18 Output Fit the model Interpret the estimated parameters: what’s surprising, and how do we explain it? – Take note of the -2LL

19 Refitting with random intercepts Fit the model again, this time with random intercepts Be sure to “include intercept”

20 Testing random intercepts Determine the change in -2LL, and the change in degrees of freedom Test to see if this is statistically significant – Change in -2LL near 17.5, change in df of 1 is highly significant (use Chi-Squared calculator or table) If there's time, try splitting the sample on coil and repeating the analysis


Download ppt "Multilevel Linear Models Field, Chapter 19. Why use multilevel models? Meeting the assumptions of the linear model – Homogeneity of regression coefficients."

Similar presentations


Ads by Google