From t-test to multilevel analyses Del-3

Slides:



Advertisements
Similar presentations
The Simple Regression Model
Advertisements

BA 275 Quantitative Business Methods
10-3 Inferences.
Lecture 4 (Chapter 4). Linear Models for Correlated Data We aim to develop a general linear model framework for longitudinal data, in which the inference.
Analysis of Clustered and Longitudinal Data Module 3 Linear Mixed Models (LMMs) for Clustered Data – Two Level Part A 1 Biostat 512: Module 3A - Kathy.
Lecture 9 Today: Ch. 3: Multiple Regression Analysis Example with two independent variables Frisch-Waugh-Lovell theorem.
Objectives (BPS chapter 24)
Multilevel Models 4 Sociology 8811, Class 26 Copyright © 2007 by Evan Schofer Do not copy or distribute without permission.
Lecture 6: Repeated Measures Analyses Elizabeth Garrett Child Psychiatry Research Methods Lecture Series.
Sociology 601 Class 19: November 3, 2008 Review of correlation and standardized coefficients Statistical inference for the slope (9.5) Violations of Model.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
School of Veterinary Medicine and Science Multilevel modelling Chris Hudson.
Sociology 601 Class 21: November 10, 2009 Review –formulas for b and se(b) –stata regression commands & output Violations of Model Assumptions, and their.
Clustered or Multilevel Data
Introduction to Regression Analysis Straight lines, fitted values, residual values, sums of squares, relation to the analysis of variance.
1 Review of Correlation A correlation coefficient measures the strength of a linear relation between two measurement variables. The measure is based on.
Quantitative Business Analysis for Decision Making Simple Linear Regression.
Simple Linear Regression and Correlation
Simple Linear Regression Analysis
EDUC 200C Section 4 – Review Melissa Kemmerle October 19, 2012.
Introduction to Multilevel Modeling Using SPSS
EFFECT SIZE Parameter used to compare results of different studies on the same scale in which a common effect of interest (response variable) has been.
How do Lawyers Set fees?. Learning Objectives 1.Model i.e. “Story” or question 2.Multiple regression review 3.Omitted variables (our first failure of.
Multilevel Analysis Kate Pickett Senior Lecturer in Epidemiology.
MULTILEVEL ANALYSIS Kate Pickett Senior Lecturer in Epidemiology SUMBER: www-users.york.ac.uk/.../Multilevel%20Analysis.ppt‎University of York.
EDUC 200C Section 3 October 12, Goals Review correlation prediction formula Calculate z y ’ = r xy z x for a new data set Use formula to predict.
Introduction Multilevel Analysis
+ Chapter 12: Inference for Regression Inference for Linear Regression.
Introduction to Linear Regression
Multilevel Linear Models Field, Chapter 19. Why use multilevel models? Meeting the assumptions of the linear model – Homogeneity of regression coefficients.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
6-1 Introduction To Empirical Models Based on the scatter diagram, it is probably reasonable to assume that the mean of the random variable Y is.
Multiple Regression Petter Mostad Review: Simple linear regression We define a model where are independent (normally distributed) with equal.
Lecture 3 Linear random intercept models. Example: Weight of Guinea Pigs Body weights of 48 pigs in 9 successive weeks of follow-up (Table 3.1 DLZ) The.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Simple Linear Regression Analysis Chapter 13.
Lecture 10 Introduction to Linear Regression and Correlation Analysis.
Biostatistics Case Studies Peter D. Christenson Biostatistician Session 3: Missing Data in Longitudinal Studies.
Inference about the slope parameter and correlation
Multilevel modelling: general ideas and uses
The simple linear regression model and parameter estimation
Introduction to Multilevel Modeling Using HLM 6
QM222 Class 9 Section A1 Coefficient statistics
Linear Regression with One Regression
Regression Analysis AGEC 784.
Lecture #26 Thursday, November 17, 2016 Textbook: 14.1 and 14.3
Chapter 12 Simple Linear Regression and Correlation
From t-test to multilevel analyses Del-2
From t-test to … multilevel analyses
Lecture 18 Matched Case Control Studies
From t-test to multilevel analyses (Linear regression, GLM, …)
Linear Mixed Models in JMP Pro
An introduction to basic multilevel modeling
QM222 Class 8 Section A1 Using categorical data in regression
Multiple Regression and Model Building
The slope, explained variance, residuals
Generalized Linear Models
...Relax... 9/21/2018 ST3131, Lecture 3 ST5213 Semester II, 2000/2001
I271B Quantitative Methods
Correlation and Regression
G Lecture 6 Multilevel Notation; Level 1 and Level 2 Equations
6-1 Introduction To Empirical Models
Simple Linear Regression
Migration and the Labour Market
Undergraduated Econometrics
Simple Linear Regression and Correlation
Fixed, Random and Mixed effects
Simple Linear Regression
Statistics for Business and Economics
Introduction to Econometrics, 5th edition
Presentation transcript:

From t-test to multilevel analyses Del-3 Stein Atle Lie, statistician, professor Uni Health, Uni Research http://folk.uib.no/msesl/GLM

Outline Pared t-test (Mean and standard deviation) Two-group t-test (Mean and standard deviations) Linear regression GLM (general linear models) GLMM (general linear mixed model) … PASW (former SPSS), Stata, R, gllamm (Stata)

Pared t-test The straightforward way to analyze two repeated measures is a pared t-test. Measure at time1 or location1 (e.g. Data1) is directly compared to measure at time2 or location2 (e.g. Data2) Is the difference between Data1 and Data2 (Diff = Data1-Data2) unlike 0?

Pared t-test The pared t-test will only be performed for complete (balanced) data. What happens if we delete two observations from data2? (Only 8 complete pairs remain)

Correlation Correlation (Bivariat-correlation) is only calculated for complete (balanced) data. pairs of data

Linear regression Ordinary linear regression Assumes data is Normal and i.i.d. (identical independent distributed)

Linear regression Assumptions - Residualer (ei): yi = a + b·xi + ei 1) e1, e2,…, en are independent normal distributed 2) The expectation of ei is: E(ei) = 0 3) The variance of ei is: var(Yi) = var(ei) = s2

Ordinary linear regression The formula for an ordinary regression can thus be expressed as: yi = b0 + b1·xi + ei ei ~N(0, se2)

Random intercept model Y Regression lines: yij = b0 + b1·xij+vij (x11,y11) b1 (xnp,ynp) b0+uj (xij,yij) su se X

Variance component model For a random variance component model, we can express the regression line(s) - and the variance components as yij = b0 + b1·xij + vij vij = uj + eij eij ~N(0, se2) (individual) uj ~N(0, su2) (group)

Random intercept model Alternatively we may express the formulas, for the simple variance component model, in terms of random intercepts: yij = b0j + b1·xij + eij b0j = b0 + uj eij ~N(0, se2) (individual) uj ~N(0, su2) (group)

Intra class correlation (ICC) The total variance is hence: se2 + su2 = sT2 The proportion of variance attributed to the group (level 2) - which is also the correlation between the observations within the group is: ICC = su2/sT2

Software Personal opinion PASW/SPSS Very easy to do simple models (menu/syntax) Arrange/restructure data Stata Steeper learning curve to start Easy () to extend the simpler models to more sophisticated models glamm R Steep learning curve Nice graphics

Cortisol data Cortisol level in saliva measured each morning in 3 days, in two periods* 55 individuals 278 observations (52 missing) * The real data was measured 5 times per day, in 3 days and 3 periods - from the article: Harris A, Marquis P, Eriksen HR, Grant I, Corbett R, Lie SA, Ursin H. Diurnal rhythm in British Antarctic personnel. Rural Remote Health. 2010 Apr-Jun;10(2):1351.

Cortisol data – missing data

Cortisol data – long data format

Cortisol data Period1 Period2

Linear model Stata: . glm kortisol period2 day2 day3, cluster(id) (. regress kortisol period2 day2 day3, cluster(id)) Generalized linear models No. of obs = 278 Optimization : ML Residual df = 274 (Std. Err. adjusted for 55 clusters in id) ------------------------------------------------------------------------------ | Robust kortisol | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- period2 | -2.536544 .9788702 -2.59 0.010 -4.455094 -.6179938 day2 | .1313347 .7238506 0.18 0.856 -1.287386 1.550056 day3 | .6528685 .7052775 0.93 0.355 -.72945 2.035187 _cons | 11.31802 .9542124 11.86 0.000 9.447799 13.18824

Linear mixed model (variance component) Stata: . gllamm kortisol period2 day2 day3, i(id) number of level 1 units = 278 number of level 2 units = 55 ------------------------------------------------------------------------------ kortisol | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- period2 | -2.600979 .6875339 -3.78 0.000 -3.94852 -1.253437 day2 | .05486 .8154391 0.07 0.946 -1.543371 1.653091 day3 | .5183787 .8242555 0.63 0.529 -1.097132 2.13389 _cons | 11.29695 .7666444 14.74 0.000 9.794358 12.79955 Variance at level 1 31.202774 (2.9334224) Variances and covariances of random effects level 2 (id) var(1): 8.6764463 (2.8796675) ICC=0.218

Linear mixed model (variance component) lmer(Kortisol~1+Day2+Day3+Period2 +(1|ID),data=kortisol) Random effects: Groups Name Variance Std.Dev. ID (Intercept) 8.8683 2.9780 Residual 31.6173 5.6229 Number of obs: 278, groups: ID, 55 Fixed effects: Estimate Std. Error t value (Intercept) 11.29105 0.77282 14.610 Day2 0.05431 0.82076 0.066 Day3 0.51766 0.82946 0.624 Period2 -2.60115 0.69204 -3.759 ICC=0.219

Cortisol data Period1 Period2

Linear mixed model (variance component) PASW: MIXED Kortisol BY ID WITH Period2 Day2 Day3 /FIXED=Period2 Day2 Day3 | SSTYPE(3) /METHOD=REML /PRINT=SOLUTION /RANDOM=ID | COVTYPE(VC). ICC=0.219

Linear mixed model (random intercept model) lmer(Kortisol~1+Day+Period2 +(1|ID),data=kortisol) Random effects: Groups Name Variance Std.Dev. ID (Intercept) 8.8879 2.9813 Residual 31.4891 5.6115 Number of obs: 278, groups: ID, 55 Fixed effects: Estimate Std. Error t value (Intercept) 11.2281 0.7394 15.186 Day 0.2546 0.4137 0.616 Period2 -2.6007 0.6907 -3.765 ICC=0.220

Linear mixed model (random intercept model) Period1 Period2

Linear mixed model (random slope model) lmer(Kortisol~1+Day+Period2 +(Day-1|ID),data=kortisol) Random effects: Groups Name Variance Std.Dev. ID Day 6.2228e-08 0.00024945 ! Residual 4.0499e+01 6.36390166 Number of obs: 278, groups: ID, 55 Fixed effects: Estimate Std. Error t value (Intercept) 11.2575 0.6948 16.202 Day 0.3227 0.4660 0.692 Period2 -2.5361 0.7644 -3.318

Linear mixed model (random slope model) Period1 Period2

Linear mixed model (random slope & intercept) lmer(Kortisol~1+Day+Period2 +(1+Day|ID),data=kortisol) Random effects: Groups Name Variance Std.Dev. Corr ID (Intercept) 10.88014 3.29851 Day 0.10535 0.32457 -1.000 Residual 31.38000 5.60179 Number of obs: 278, groups: ID, 55 Fixed effects: Estimate Std. Error t value (Intercept) 11.2138 0.7629 14.698 Day 0.2656 0.4149 0.640 Period2 -2.5940 0.6891 -3.764 ICC=0.257

Linear mixed model (random slope model) Period1 Period2

Summary The interpretation of parameter estimates of categorical variables (preferably dummy variables) from linear models can be interpreted as mean differences, as from ordinary t-test This is equivalent in models for repeated or clustered observations!