Chapter 12: ANCOVA Flashcards
What is ANCOVA?
When we measure covariates and include them in an analysis of variance we call it analysis of covariance: ANCOVA
Covariates
Continuous variables that are not part of the main experimental manipulation but have an influence on the dependent variable
Reasons for including covariates in ANOVA
1- To reduce within-group error variance
2- Eliminate confounds
ANCOVA: Equation
Outcome=bo+b1Dummy1+b2Dummy2+b3covariate+error
- Covariate: added as a predictor in ANCOVA
- this model tests the difference in group means adjusted for covariate
ANCOVA:
ANOVA table: Model 1
- how well the model fits when only the covariate is used in model
ANCOVA:
ANOVA table: Model 2
- the goodness of fit of model when covariate & dummy variables are used is used in model
- difference in R^2: the individual contribution of experimental groups
—> R^2 (M.2)- R^2 (M.1)
Constant
bo in ANCOVA
ANCOVA as ‘controlling’ for the covariate
- compares the predicted group means at the average value of the covariate, so the groups are being compared at a level of the covariate that is the same for each group
- ‘controlling for covariate’ analogy is not a good one
Assumptions of ANCOVA
- Linearity
- Normality
- Independence of error
- Homoscedasticity
- Independence of the covariate and experimental groups
- homogeneity of regression slopes
Independence of the covariates and predictor groups
- covariate must be independent of categorical predictor
- this situation arises mostly when participants aren’t randomly assigned to experimental conditions
- covariance must share no variance with experimental groups: the expected value of covariance will be the same for every group
—> group means for covariance will be equal
Solution for violation of:
The independence of covariate and experimental effect
- assign participants randomly to experimental groups
- or: match experimental groups on the covariate
Statistical Requirement:
Independence of Covariate and experimental effect
- no statistical requirement for experimental effect to be independent of covariate
- this assumption makes interpretation more straightforward
Temporal Additivity
- assumption that all experimental groups would experience the same change in covariate over time if the experimental groups had no effect
- according to Senn: the idea that ANCOVA is biased unless experimental groups are equal on the covariate applies only when there is temporal additivity
- when we have temporal additivity: make sure that the covariate is same in all experimental groups
Homogeneity of Regression Slopes
- relationship between outcome (dependent variable) & covariate is the same in each of our treatment groups
- visual representation: scatter plot of covariate vs outcome for each experimental group
Homogeneity of Regression Slopes
- how to check for it
- When an ANCOVA is conducted we look at overall relationship between outcome (dependent variable) & covariate
- fit a regression line to entire data set, ignoring to which group a person belongs
- imagine plotting a scatterplot for each group of participants with covariate on one axis and outcome on the other
Heterogeneity of regression slopes
- relationship between participant’s outcome and covariate is different in the different experimental groups
What are the consequences of violating the assumption of homogeneity of regression slopes?
I. Type I error rate is inflated and the power to detect effects is not maximized
—> This is especially true when group sizes are unequal and when the standardized regression slopes differ by more than .4
What to do when assumptions are violated?
- bootstrap (robust)
- post hoc (robust)
- R (main bits of ANCOVA can not be done using bootstrap or post-hoc test)
If assumption of Homogeneity of Regression Slopes is violated:
- use a multilevel model
ANCOVA: SPSS
- Testing the independence of the treatment variable and covariate
- Run ANOVA
- Outcome or Dependent Variable: Covariate
- Predictor or Independent Variable: Experimental groups
- if F of predictor is non-significant then assumption has not been violated
ANCOVA: Main Analysis: SPSS
I. Analyze
II. General Linear Model
III. Univariate
ANCOVA: Contrasts
- You can NOT enter your own codes
- Select one of the standard contrasts
ANCOVA: Other Options
- here you can get a limited range of Post-Hoc tests
ANCOA:
How to specify Post-Hoc test?
- select the independent variable and drag it to the box labeled: Display Means
- select compare main effects
- Select either Bonferroni or Sidak
- Sidak more power than Bonferroni
- Descriptive
- Parameter Estimates
- Homogeneity test
Planned Contrasts in ANCOVA
- use regression
- create all dummy variables
- Compute a hierarchical regression where the covariate is entered first and then enter all dummy variables
Dummy 1 Control -2 G1 1 G2 1 Dummy 2 Control 0 G1 - 1 G2 1
ANCOVA: Bootstrap
- useful for parameter estimates and post-hoc tests but not main F test
ANCOVA: Options
- Estimates of Effect Size
- produces partial eta square
ANCOVA: Options
- Contrast Coefficient Matrix
- useful to see which groups are compared in which contrast
Spread vs Level plot
- useful to check if there is a relationship between mean and standard deviation
- if a relationship exists: transform
Residual Plot
- useful to assess homoscedasticity
ANCOVA: Levene’s test
- ANCOVA is more concerned about the homogeneity of residuals rather than that of variance
- so if Levene’s test is significant: ignore
Homogeneity of Residuals
- use Residual plots
- Post-Hoc tests
- bootstrap
ANCOVA: b
- df of t-test
- df(t-test)= N-p-1
- p: number of predictors including the covariate
ANCOVA: Dummy Variables
- experiment 1: all who have value 1
- experiment 2 all who have value 2
- experiment 3: control: coded with 0
Experiment 1: b: represents the difference of means for those who have 0 and those who have 1
Experiment 1: b: represents the difference of means for those who have 0 and those who have 2
ANCOVA: Contrasts
- if results in bootstrap are different from other contrast analysis: reflects that our data may be biased
ANCOVA: Interpreting the Covariate
- draw Scatter plot:
x-axis: covariate
Y-axis: outcome
—> check their relationship - also use the parameter estimates table for Beta value of covariate
ANCOVA:
- Testing the assumption of homogeneity of regression slopes
- relationship between covariate & outcome should be similar at different levels of the predictor variable
- Rerun ANCOVA: Specify Model: Custom
- Enter main effects as well as interaction!!
ANCOVA: Calculating Effect Size
- eta squared (mu squared): total variance that a variable explains
- partial eta squared (partial mu squared: the proportion of variance that a variable explains that is not explained by other variables in the analysis
Eta Square Formula
- μ^2= SSeffect/SST
Partial Eta Square Formula
- partial μ^2= SSeffect/ (SSeffect+SSR)
What is ANCOVA used for?
- to compare several means adjusted for 1 or more other variables (covariates)
ANCOVA: Effect Size:
- Omega Squared (ω^2)
- can be calculated only when we have equal number of participants in each group
ANCOVA: Effect Size
- Contrasts
- r contrast = √[t^2/ (t^2 +df)]
- r covariate: same formula
ANCOVA: Reporting Results
- The covariate, partner’s libido, was significantly related to the participant’s libido, F(1, 26) = 4.96,
p =.035, r =.40. There was also a significant effect of Viagra on levels of libido after controlling for the effect of partner’s libido, F(2, 26) = 4.14, p = .027, partial η2 =.24. - Planned contrasts revealed that having a high dose of Viagra significantly increased libido compared to having a placebo, t(26) = −2.77, p =.01, r =.48, but not compared to having a low dose, t(26) = −0.54, p =.59, r =.11.