The Analyss of Covarance ERSH 830 Keppel and Wckens Chapter 5
Today s Class Intal Consderatons Covarance and Lnear Regresson The Lnear Regresson Equaton TheAnalyss of Covarance Assumptons Underlyng the Analyss of Covarance Example ANCOVA Analyss
THE ANALYSIS OF COVARIANCE
The Analyss of Covarance In a completely randomzed desgn subjects are randomly assgned to the expermental treatments The completely randomzed desgn s relatvely defcent n power If there s a varable avalable before the start of experment that s reasonably correlated wth the dependent varable abe(e,co (.e., control o varable, abe,concomtant varable, or covarate; e.g., ntellgence, grade pont average, etc.), we may ether employ blockng or statstcal ttt adjustment t
The Analyss of Covarance The randomzed blocks desgn ncludes groups of homogeneous subjects drawn from respectve blocks Advantages of the randomzed blocks desgn are: Blockng helps to equate the treatment groups before the start of the experment more effectvely than s accomplshed n the completely l randomzed ddesgn The power s ncreased because smallererrorerror term usually assocated wth the blockng desgn Interactons can be assessed
The Analyss of Covarance Dsadvantages may nclude: There wll be cost of ntroducng the blockng factor It may be dffcult to fnd blockng factors that are hghly correlated ltdwth the dependent d varable bl Loss of power may occur f a poorly correlated blockng p y p y g factor s used
The Analyss of Covarance The analyss of covarance reduces expermental error by statstcal, rather than expermental, means Subjects arefrstmeasured on the concomtant varable called the covarate whch conssts of some relevant ablty or characterstcs Subjects are then randomly assgned to the treatment j y g group wthout regard for ther scores on the covarate
The Analyss of Covarance The analyss of covarance refnes estmates of expermental error and uses the adjust treatment effects for any dfferences between the treatment groups that exsted before the expermental treatments were admnstered
Today s Example Data We wll rehash data from Secton.5 A researcher was studyng the effects of nstructonal materal on how well college students learn basc concepts n statstcs Two nstructonal materal groups (a 2) Pretest gven General quanttatve ablty (now called the covarate X) DV Scores on a test on basc statstcs test (Y)
The Data Group a Group a 2 X Y X Y 9 3 2 6 7 3 5 2 7 8 3 9 2 9 5 5 5 4 2 0 9 9 4 7 6 2 6 4 4 Mean: 8 4 7 6
Our Data As a Plot
COVARIANCE AND LINEAR REGRESSION
Covarance and Lnear Regresson The correlaton coeffcent between two varables X and Y s: r XY xy Where the covarance between X and Y s: ( X X )( Y Y ) s s x s y N N The standard devaton of The standard devaton of X s: Y s: s x N ( X X ) 2 N s XY s Y N ( ) 2 Y Y N
Wth Our Data Set The correlaton coeffcent between two varables X and Y s: xy 5.667 2.805*3.055 Where the covarance between X and Y s: ( X X )( Y Y ) s 0.66 r XY s 5. sxs 667 XY y N The standard devaton of The standard devaton of X s: Y s: s x N ( X X ) 2 N 2.805 s Y N N ( ) 2 Y Y N 3.055
Other Useful Terms (Wll Help n ANCOVA) We may defne the sum of products: SP And the sums of squares: 2 XY N ( X X )( Y Y ) 85 N SS ( ) X X X 8 N SS ( ) Y Y Y 40 Consequently: 2 r XY SP SS X XY SS Y 85 8*40 0.66
THE LINEAR REGRESSION EQUATION
The Lnear Regresson Equaton The lnear regresson lne relatng the dependent varable Y to the covarate X s: Y β 0 + β X + And the predcton equaton for s: Where: ˆ + E Y b0 b X b 0 Y b X S SPXY S X SS X Y b rxy
Wth Our Data The lnear regresson lne relatng the dependent varable Y to the covarate X s: Y β 0 + β X + And the predcton equaton for s: Where: Yˆ b. 720X E 0 + b X.403+ SY SPXY b0 Y b X.403 b rxy. 720 S SS X X
Regresson Hypothess Tests In regresson, the key hypothess test we are worred about s that for the slope, p, b H 0 : β 0 H : β 0 Usng these hypotheses, and our method for calculatng sums of squares from Chapter 4 (the GLM chapter), we can then create an ANOVA lke table for the regresson. We need: H0 H SSun exp SS unexp
Regresson Sums of Squares H Recall that SS 0exp un came from calculatng the sums of squares where the predcted value came from the lnear model when H 0 was true It was treatment + error Inregresson the correspondng predcted valuesare: are: Ths comes from: df un Yˆ b 0 Y b Y b X Y 0* X 0 H 0 The exp comes from the number of observatons (here 6) mnus the number of parameters () so H 0 df un exp 5 Y
Regresson Sums of Squares H Recall that SS exp un came from calculatng the sums of squares where the predcted value came from the lnear model when H was true It was error In regresson the correspondng predcted values are: ˆ + Y b 0 b X H The df un exp comes from the number of observatons (6) mnus the number of parameters (2), so H df un exp 4
Resdual Varaton and the Lnear Model Another way of lookng at Sums of Squares: The sum of the squared devaton from the mean s the Sums of Squares Total: T N SSY ( ) 2 H 0 Y Y SS exp SS Thesum of the squared resduals fromthe regresson lne s: N SS Re gresson SSY X un ( ) 2 ˆ H H Y Y SS SS Fnally, the sum of squares for error s: N 2 ˆ H ( ) Y Y SS SS Error un exp 0 unexp unexp
Puttng t Together n an ANOVA Table: See Excel worksheet on ELC for computatons
Resdual Varaton and the Lnear Model The amount of the Y varablty that can be attrbuted to the regresson equaton s: SS regresson SSY SSY X The squared correlaton coeffcent (or what we call the effect sze eta squared) s: r SS 2 regresson XY SSY.437
Now wth SPSS
THE ANALYSIS OF COVARIANCE
The Analyss of Covarance Now that we know a lttle about regresson, we can use t to mprove power to detect group dfferences n an ANOVA lke expermental desgn ANCOVA tests for dfferences between groups by comparng a descrpton of the data based on a sngle regresson lne to one based on lnes wth the same slope and dfferent ntercepts for each group
In the Begnnng There was the ANOVA Model Recall our GLM representaton of ANOVA: The H model: The H 0 model: Y μ + α + j T j E j Y μ + j μ T E j ANCOVA adds n the covarate X to the model
The Analyss of Covarance and the General Lnear Model For the analyss of covarance, the alternatvehypothess model s: Y X + j β0 + α j + β j E j And the null hypothess model (testng the effect of the treatment means) s: Y β 0 + β X + j j E j
Decomposng ANCOVA If the H model holds n ANCOVA, t means that the ntercepts of the regresson lne dffer across groups: For our 2 group example that means, for group : For group 2: ( β ) 0 + α + X E Y β + ( β ) 0 + α 2 + β X 2 E 2 Y β + 2
Does t? Hmm H 0 Model same ntercepts H Model Dff. Intercepts
...Its a Queston of Statstcal Sgnfcance Usng our knowledge of GLM, we could form SS for each of the possble categores or we could use SPSS: Covarate (X the score on the general quanttatve test) Treatment group (A)
Comparng ANOVA and ANCOVA ANOVA ANCOVA
The Dfference? Adjusted Means For ANCOVA, the adjusted mean (or Least Squares Mean) s: ' Y b ( X X ) Y j T
What about the Rest of ANOVA All of the rest of ANOVA happens on the adjusted means lke contrasts or post hoc tests Both of whch are made easy n SPSS The desgn can be extended to nclude more factors and more covarates Of course, thngs get more tedous to understand as you add more varables Th k t l th t f t f tl The key s to realze that f your covarate sgnfcantly predcts Y (above and beyond the group varable), you wll have more power to detect group dfferences
ASSUMPTIONS UNDERLYING THE ANALYSIS OF COVARIANCE
Assumptons Underlyng the Analyss of Covarance Three assumptons n addton to the usual analyss of varance assumptons are:. The assumpton of lnear regresson: The devatons from regresson are normally and ndependently dstrbuted n the populaton, wth means of zero and homogeneous varances Hard to check defntvely 2. The assumpton of homogeneous group regresson coeffcents: The wthn groupsregressoncoeffcent regresson s actually an average of the regresson coeffcents for the respectve treatment groups Can be checked by addng an nteracton term between the covarate and group varable 3. The exact measurement of the covarate: The covarate s measured wthout error Ubqutous term
Checkng the Homogenety of Slopes Assumpton You can easly check the homogenety of slopes assumpton by testng the nteracton between your group IV and the covarate The H model becomes: j β 0 + α j + j ( β ) X j E j Y β X + αβ + If true, t mples, for group : ( β ) [ ( ) ] 0 + α + β + X E Y αβ + And for group 2: ( β ) [ ( ) ] 0 + α 2 + β + X 2 E 2 Y αβ + 2 2 j
In SPSS Does t meet our assumpton of homogenety of slopes?
Wrappng Up Today s class covered a method for controllng for mportant varables n an experment: ANCOVA ANCOVA s a general technque that adds addtonal (contnuous/quanttatve) varables to a model and adjusts for the values of such varables Any ANOVA desgn can nclude such varables
Up Next In lab tonght: How to do ANCOVA n SPSS Homework: Assgned n the mornng, due next week before class Readng for next week: Chapter 6: Wthn Subject Desgns Only two lectures left!