Lecture 6: Repeated Measures Analyses Elizabeth Garrett Child Psychiatry Research Methods Lecture Series.

Slides:



Advertisements
Similar presentations
Dummy Variables and Interactions. Dummy Variables What is the the relationship between the % of non-Swiss residents (IV) and discretionary social spending.
Advertisements

Qualitative predictor variables
1 Results from hsb_subset.do. 2 Example of Kloeck problem Two-stage sample of high school sophomores 1 st school is selected, then students are picked,
1 FE Panel Data assumptions. 2 Assumption #1: E(u it |X i1,…,X iT,  i ) = 0.
Heteroskedasticity The Problem:
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.
Lecture 9 Today: Ch. 3: Multiple Regression Analysis Example with two independent variables Frisch-Waugh-Lovell theorem.
Lecture 4 This week’s reading: Ch. 1 Today:
Sociology 601 Class 19: November 3, 2008 Review of correlation and standardized coefficients Statistical inference for the slope (9.5) Violations of Model.
Adaptive expectations and partial adjustment Presented by: Monika Tarsalewska Piotrek Jeżak Justyna Koper Magdalena Prędota.
From last time….. Basic Biostats Topics Summary Statistics –mean, median, mode –standard deviation, standard error Confidence Intervals Hypothesis Tests.
Sociology 601 Class 21: November 10, 2009 Review –formulas for b and se(b) –stata regression commands & output Violations of Model Assumptions, and their.
Shall we take Solow seriously?? Empirics of growth Ania Nicińska Agnieszka Postępska Paweł Zaboklicki.
Sociology 601 Class 25: November 24, 2009 Homework 9 Review –dummy variable example from ASR (finish) –regression results for dummy variables Quadratic.
Sociology 601 Class 28: December 8, 2009 Homework 10 Review –polynomials –interaction effects Logistic regressions –log odds as outcome –compared to linear.
Multilevel Models 2 Sociology 8811, Class 24
Multilevel Models 1 Sociology 229A Copyright © 2008 by Evan Schofer Do not copy or distribute without permission.
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.
So far, we have considered regression models with dummy variables of independent variables. In this lecture, we will study regression models whose dependent.
1 Michigan.do. 2. * construct new variables;. gen mi=state==26;. * michigan dummy;. gen hike=month>=33;. * treatment period dummy;. gen treatment=hike*mi;
REGRESSION AND CORRELATION
Introduction to Probability and Statistics Linear Regression and Correlation.
A trial of incentives to attend adult literacy classes Carole Torgerson, Greg Brooks, Jeremy Miles, David Torgerson Classes randomised to incentive or.
Interpreting Bi-variate OLS Regression
Chapter 9 - Lecture 2 Computing the analysis of variance for simple experiments (single factor, unrelated groups experiments).
Sociology 601 Class 26: December 1, 2009 (partial) Review –curvilinear regression results –cubic polynomial Interaction effects –example: earnings on married.
TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. It is.
SLOPE DUMMY VARIABLES 1 The scatter diagram shows the data for the 74 schools in Shanghai and the cost functions derived from a regression of COST on N.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression.
1 PROXY VARIABLES Suppose that a variable Y is hypothesized to depend on a set of explanatory variables X 2,..., X k as shown above, and suppose that for.
Returning to Consumption
7.1 - Motivation Motivation Correlation / Simple Linear Regression Correlation / Simple Linear Regression Extensions of Simple.
Serial Correlation and the Housing price function Aka “Autocorrelation”
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.
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.
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
Scientific question: Does the lunch intervention impact cognitive ability? The data consists of 4 measures of cognitive ability including:Raven’s score.
MULTIPLE REGRESSION WITH TWO EXPLANATORY VARIABLES: EXAMPLE 1 This sequence provides a geometrical interpretation of a multiple regression model with two.
© 2001 Prentice-Hall, Inc. Statistics for Business and Economics Simple Linear Regression Chapter 10.
Introduction to Linear Regression
Basic Biostatistics Prof Paul Rheeder Division of Clinical Epidemiology.
Introduction to Probability and Statistics Thirteenth Edition Chapter 12 Linear Regression and Correlation.
MBP1010H – Lecture 4: March 26, Multiple regression 2.Survival analysis Reading: Introduction to the Practice of Statistics: Chapters 2, 10 and 11.
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.
Lecture 11 Multicollinearity BMTRY 701 Biostatistical Methods II.
Three Statistical Issues (1) Observational Study (2) Multiple Comparisons (3) Censoring Definitions.
Panel Data. Assembling the Data insheet using marriage-data.csv, c d u "background-data", clear d u "experience-data", clear u "wage-data", clear d reshape.
Lecture 10: Correlation and Regression Model.
Lecture 5. Linear Models for Correlated Data: Inference.
STAT E100 Section Week 12- Regression. Course Review - Project due Dec 17 th, your TA. - Exam 2 make-up is Dec 5 th, practice tests have been updated.
1 Statistics 262: Intermediate Biostatistics Regression Models for longitudinal data: Mixed Models.
1 CHANGES IN THE UNITS OF MEASUREMENT Suppose that the units of measurement of Y or X are changed. How will this affect the regression results? Intuitively,
Modeling Multiple Source Risk Factor Data and Health Outcomes in Twins Andy Bogart, MS Jack Goldberg, PhD.
1 BINARY CHOICE MODELS: LINEAR PROBABILITY MODEL Economists are often interested in the factors behind the decision-making of individuals or enterprises,
Significance Tests for Regression Analysis. A. Testing the Significance of Regression Models The first important significance test is for the regression.
F TESTS RELATING TO GROUPS OF EXPLANATORY VARIABLES 1 We now come to more general F tests of goodness of fit. This is a test of the joint explanatory power.
1 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS When alternative specifications of a regression model have the same dependent variable, R 2 can be used.
1 Estimating and Testing  2 0 (n-1)s 2 /  2 has a  2 distribution with n-1 degrees of freedom Like other parameters, can create CIs and hypothesis tests.
Education 793 Class Notes ANCOVA Presentation 11.
Inferential Statistics Psych 231: Research Methods in Psychology.
QM222 Class 9 Section A1 Coefficient statistics
From t-test to multilevel analyses Del-2
CHAPTER 7 Linear Correlation & Regression Methods
From t-test to multilevel analyses (Linear regression, GLM, …)
QM222 Class 8 Section A1 Using categorical data in regression
Modeling Multiple Source Risk Factor Data and Health Outcomes in Twins
Presentation transcript:

Lecture 6: Repeated Measures Analyses Elizabeth Garrett Child Psychiatry Research Methods Lecture Series

Outline for Today Overview ANOVA models Repeated Measures ANOVA Longitudinal Data Analysis

Overview Linear and logistic regression thus far: –assume each individual has one observation –e.g. one exposure  one outcome –can’t go back and “unexpose” the individual and see what happens Practically, –useful to do “experiments” with more than one exposure and more than one outcome per individual –each individual serves as his own control –much “tighter” design in terms of variability –this is called “repeated measures:” the outcome is observed on the same individual at multiple times under different conditions. Generalization of repeated measures: longitudinal analysis –observe multiple outcomes on the same individual at different times –might be observational or experimental –exposure/treatment may or may not vary at different times.

ANOVA models ANOVA = analysis of variance (bad name!) A simple case of linear regression –continuous outcome –categorical dependent variable(s) Why do we hear about ANOVA so often if it is just a special case of linear regression? –Historically, very popular because….easy to perform WITHOUT a computer! –Very prevalent in psychometrics –Interpretation is nice and simple –In its simplest form, an ANOVA represents a generalization of the two sample t-test. It allows for the testing of more than two groups. –Tests to see if means in all groups are equal. –Instead of t-statistic, we look at F-statistic

ANOVA for Independent Observations Example: Drug Study of Hyperactivity in Children under Age observations on children with hyperactivity. Hyperactivity (H) measured by a “scale” instrument –range is 0 to 30 –child is designated as “hyperactive” if score > 15 –to enter the study, must score > 20 3 Treatments: 60 placebo, 60 ritalin, 60 “new” drug. Evaluation based on hyperactivity score (H) measured at study end (2 weeks). Questions: –Do all three treatments have approximately the same effect? –Is the new drug better than placebo? –Is the new drug as good as ritalin?

Intuitive approach Estimate mean H in each group: –  p = mean of H in the placebo group –  r = mean of H in the ritalin group –  n = mean of H in the new drug group Test if the means are the same or different –H 0 : group means are all the same –H 1 : at least one group mean is different than some other group mean.

Nice thing about ANOVA models…..  0 is the estimated score for kids on placebo  1 is the “treatment” effect of ritalin  2 is the “treatment” effect of the new drug  1 -  2 is the difference in effect between ritalin and the new drug

Hyperactivity Example Results Source | SS df MS Number of obs = F( 2, 177) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = H | Coef. Std. Err. t P>|t| [95% Conf. Interval] Itrt_2 | Itrt_3 | _cons |

ANOVA Table Number of obs = 180 R-squared = Root MSE = Adj R-squared = Source | Partial SS df MS F Prob > F Model | | trt | | Residual | Total |

Answers to scientific questions 1. Do all three treatments have approximately the same effect? 2. Is new drug better than placebo? 3. Is the new drug as good as ritalin? No. There is evidence that the intercept alone is not sufficient for describing variability. Why? Pvalue on Fstatistic < Yes. Treatment effect is Why? Pvalue on  2 is less than No. The treatment effect difference is 2.5 Why? Pvalue on  2 -  1 is less than 0.001***

Repeated Measures What happens when we have more than one treatment per individual? Most often “experiments” and not “observational” studies Need special methods –each individual is considered more than once –observations from the same person are likely to be correlated Example: –Consider two kids: One has placebo score of 20 and other has placebo score of 30. –Child with the LOW placebo score also likely to have a LOW ritalin score. –Child with the HIGH placebo score also likely to have a HIGH ritalin score. è Observations from the same child are CORRELATED. è Independence assumption of linear regression is violated.

Repeated Measures Example: Drug Study of Hyperactivity in Children under Age observations on 60 children with hyperactivity. 3 Treatments: placebo, ritalin, “new” drug. Each child receives one of treatments at times 1,2, and 3. Order of treatments is random There is sufficient “wash out” period between treatments to minimize “carry over” effects Evaluation based on hyperactivity score (H) measured at study end (2 weeks). Questions: –Do all three treatments have approximately the same effect? –Is the new drug better than placebo? –Is the new drug as good as ritalin?

Repeated Measures ANOVA Results Source | SS df MS Number of obs = F( 61, 118) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = H | Coef. Std. Err. z P>|z| [95% Conf. Interval] Itrt_2 | Itrt_3 | _cons |

ANOVA Table Root MSE = Adj R-squared = Source | Partial SS df MS F Prob > F Model | | id | trt | | Residual | Total |

So where is the difference?

Answers to scientific questions 1. Do all three treatments have approximately the same effect? 2. Is new drug better than placebo? 3. Is the new drug as good as ritalin? No. There is evidence that the intercept alone is not sufficient for describing variability. Why? Pvalue on Model Fstatistic < Yes. Treatment effect is Why? Pvalue on  2 is less than No. The treatment effect difference is 2.5 Why? Pvalue on  2 -  1 is less than 0.001***

Other issues in repeated measures ANOVA “ Period” Effects Example: –Children screened into study if H > 20. –It is likely that, if we didn’t give them anything, on average, the H scores would go down –This phenomenon is called “regression to the mean” Why is this an issue? –We might expect all kids at time 1 to be “worse” than at other time periods. –We need to adjust for the “period” in which drug was given. Related issue: “Carry over” effects –In many studies, the treatment might be curative or at least long-lasting. –If an individual is cured by a treatment at time 1, we would not want to attribute his effect to placebo at time 2. –In addition to adjustment (as we will see in a minute), it is important to consider building a “wash out” period into cross-over designs.

Period Adjustment

Source | SS df MS Number of obs = F( 63, 116) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = H | Coef. Std. Err. z P>|z| [95% Conf. Interval] Itrt_2 | Itrt_3 | Itime_2 | Itime_3 | _cons | Repeated Measures ANOVA Results

ANOVA Table Number of obs = 180 R-squared = Root MSE = Adj R-squared = Source | Partial SS df MS F Prob > F Model | | id | trt | time | | Residual | Total |

Answers to scientific questions 1. Do all three treatments have approximately the same effect? 2. Is new drug better than placebo? 3. Is the new drug as good as ritalin? No. There is evidence that the intercept alone is not sufficient for describing variability. Why? Pvalue on Fstatistic < Yes. Treatment effect is Why? Pvalue on  2 is less than No. The treatment effect difference is 2.4 Why? Pvalue on  2 -  1 is less than 0.001****

Is that it? Not quite….. Interactions! Is it possible that the effect of treatment is different at different times? Current model: forces treatment effects to be the same across all time periods. Why might this not be okay? –What if the kids would get “better” by time period 3 anyway? (Think about diseases/disorders which have “flares”, e.g. depression, herpes). Interactions allow more flexibility in the model They allow the treatment effects to be different at different times.

“Full blown” model

Including Interactions

How do we measure treatment effects? Now that we have interactions,  1 is not “treatment effect” of ritalin and  2 is not “treatment effect” effect of new drug For ritalin: –  1 is the treatment effect of ritalin at time 1 –  1 +  5 is the treatment effect of ritalin at time 2 –  1 +  7 is the treatment effect of ritalin at time 3 For new drug: –  2 is the treatment effect of new drug at time 1 –  2 +  6 is the treatment effect of new drug at time 2 –  2 +  8 is the treatment effect of new drug at time 3

Are they significant? Source | SS df MS Number of obs = F( 67, 112) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = H | Coef. Std. Err. z P>|z| [95% Conf. Interval] Itrt_2 | Itrt_3 | Itime_2 | Itime_3 | ItXt_2_2 | ItXt_2_3 | ItXt_3_2 | ItXt_3_3 | _cons |

Need another F-test Number of obs = 180 R-squared = Root MSE = Adj R-squared = Source | Partial SS df MS F Prob > F Model | | id | trt | time | trt*time | | Residual | Total |

Answers to scientific questions 1. Do all three treatments have approximately the same effect? 2. Is new drug better than placebo? 3. Is the new drug as good as ritalin? No. There is evidence that the intercept alone is not sufficient for describing variability. Why? Pvalue on Fstatistic < Yes. Treatment effects are -9.5,-7.8,-7.6. Why? Pvalue on  2 is less than 0.001*** No. The treatment effect differences are -2.5,-1.8,-2.9 Why? Pvalue on differences are less than 0.05.

Longitudinal Analyses Repeated measures ANOVA is a simple case of a longitudinal analysis In longitudinal analysis: –can be observational or experimental study –the observations can be at random times (need not be at time 1, time 2, and time 3 as previously.) –Generally, time is an important component of the study.

New example: Depression in adults Due to the episodic nature of depression, if an individual is in a depressive episode today, s/he is likely to not be in one in 8 weeks Evaluation of anti-depressants can be difficult for that reason. In evaluation of treatments, we care about not only IF a treatment works, but HOW SOON it works.

Clinical Trial of Paroxetine (hypothetical) 200 individuals blindly randomized to receive either paroxetine or placebo beginning at week 0. Subjects are screened at week -1 and have to score at least 22 on Hamilton D depression scale. Subjects are followed for 8 weeks with evaluations at weeks 0 (baseline), 1, 2, 4, 6, 8. Outcome measure is Hamilton D score. Questions: –Is paroxetine more effective than placebo? –Do individuals tend to improve more quickly on paroxetine versus placebo?

Change in HamD score from week 0 to week 6 If we stopped here, we would conclude that the drug was useless! Change in

Look at data over time….

Random Effects Models Assumes that an individual has his/her own “intercept”/”effect”. Observations within individuals are correlated. The model estimates intercept for each person, but assumes that individuals have the same slope (within covariate groups) Notice the “i” subscript

Covariates Time: we know that HamD changes over time. To get “curvy” line, we need to include more than just a linear time variable. Paroxetine: we want to see if the paroxetine group differs from the placebo group

Results xtreg y week week2 trt, i(id) Random-effects GLS regression Number of obs = 1200 Group variable (i) : id Number of groups = 200 R-sq: within = Obs per group: min = 6 between = avg = 6.0 overall = max = 6 Random effects u_i ~ Gaussian Wald chi2(3) = corr(u_i, X) = 0 (assumed) Prob > chi2 = y | Coef. Std. Err. z P>|z| [95% Conf. Interval] week | week2 | trt | _cons | sigma_u | sigma_e | rho | (fraction of variance due to u_i)

Results Paroxetine Placebo

Something is wrong with our model!

Problem: We need to let the treatment VARY over time! The approach above simply ADJUSTS for time. We want to see how the relationship differs between treatment groups over time. We need interactions again!

Results. xi: xtreg y i.trt*week i.trt*week2, i(id) y | Coef. Std. Err. z P>|z| [95% Conf. Interval] Itrt_1 | week | week2 | ItXwee_1 | ItXweea1 | _cons |

Results Paroxetine Placebo

References Diggle, Liang, and Zeger (1994) Analysis of Longitudinal Data B.S. Everitt (1995) The analysis of repeated measures: a practical review with examples. The Statistician, 44, pp Crowder and Hand (1990) Analysis of Repeated Measures. D. Elkstrom (1990) Statistical analysis of repeated measures in psychiatric research. Archives of General Psychiatry, 47, pp [ANOVA (for non-repeated measures) is covered in most basic stats books.]