<<

AnalysisofVariance 1 1.Introduction I Analysisofvariance(ANOVA) describesthepartitionoftheresponse- variablesumofsquaresinalinearmodelinto‘explained’and‘unex- plained’components. Lecture Notes I Thetermalsoreferstoproceduresfor fittingandtestinglinearmodelsin whichtheexplanatoryvariablesarecategorical. Asinglecategoricalexplanatoryvariable(factor or classification) 6. Analysis of • correspondsto one-way analysisofvariance; twofactorsto two-way analysisofvariance; • threefactorsto three-way analysisofvariance; • andsoon. •

c °

AnalysisofVariance 2 AnalysisofVariance 3 2.Goals: 3.One-WayANOVA I Tointroducestatisticalmodelsforone-andtwo-wayanalysisofvariance. I Dummyregressorscanbeemployedtocodeaone-wayANOVAmodel. I Toshowhowthemodelscanbe fittodatabyplacingrestrictionsontheir I Forexample,forathree-categoryclassification: parametersandappropriatelycodingregressors. = + 1 1 + 2 2 + I Toexplainhowinteractionisreflectedintwo-wayanalysisofvariance. with Group 1 2 I Toshowhowtheincremental-sum-of-squaresapproachcanbeadapted 1 10 totestingmainandinteractioneffectsintwo-wayanalysisofvariance. 2 01 3 00 ITheresponsevariableexpectation(populationmean)ingroup is .

c c ° ° AnalysisofVariance 4 AnalysisofVariance 5 I Becausetheerror hasameanof0undertheusuallinear-model I One-wayanalysisofvariancefocusesontestingfordifferencesamong assumptions,takingtheexpectationofbothsidesofthemodelproduces groupmeans.

thefollowingrelationshipsbetweengroupmeansandmodelparameters: Theomnibus -statisticforthemodeltests 0: 1 = 2 =0,which Group1: = + 1+ 0= + • correspondsto : = = ,thenullhypothesisofnodifferences 1 1 × 2× 1 0 1 2 3 Group2: 2 = + 1 0+ 2 1= + 2 amongthepopulationgroupmeans. Group3: = + × 0+ ×0= 3 1 × 2× I Ourconsiderationofone-wayanalysisofvariancemightwellendhere, butforadesiretodevelopmethodsthatgeneralizeeasilytohigher-way Therearethreeparameters( 1 and 2)andthreegroupmeans,so ANOVA. •wecansolveuniquelyfortheparametersintermsofthegroupmeans:

= 3 1 = 1 3 2 = 2 3 Thus representsthemeanofthebaselinecategory(group3),and • 1 and 2 capturedifferencesbetweentheothergroupmeansandthe meanofthebaselinecategory.

c c ° °

AnalysisofVariance 6 AnalysisofVariance 7 3.1TheOne-WayANOVAModel I Upontakingexpectations: = + . Theparametersofthemodelare,therefore,under-determined,for Newnotation: I • thereare +1parameters(including )butonly populationgroup denotesthe thobservationwithinthe thof groups. • . isthenumberofobservationsinthe thgroup. • Forexample,for =3: = isthetotalnumberofobservations. • • =1 1 = + 1 ( ) representsthepopulationmeaningroup (asbefore). = + • P 2 2 I Theone-wayANOVAmodel: 3 = + 3 = + + –Evenifweknewthethreepopulationgroupmeans,wecouldnot where: solveuniquelyforthefourparameters. shouldrepresentthegeneralleveloftheresponsevariableinthe Becausetheparametersofthemodelareunder-determined,they • population. • cannotbeuniquelyestimated. shouldrepresenttheeffectontheresponsevariableofmembership – Toestimatethemodel,wewouldneedtocodeonedummy • inthe thgroup. regressorforeachgroup-effectparameter ,andtheresulting dummyregressorswouldbeperfectlycollinear. isanerrorvariablethatfollowstheusuallinear-modelassumptions. •

c c ° ° AnalysisofVariance 8 AnalysisofVariance 9 I Onesolutionistoplacealinearrestrictionontheparametersofthe 3.2‘Sigma’Constraints model: Itisadvantageoustoselectarestrictionthatproduceseasilyinter- + + + =0 I 0 1 1 pretableparametersandestimates,andthatgeneralizesusefullyto wherethe ’sarepre-specifiedcon···stants,notallequalto0. morecomplexmodels: Alllinearrestrictionsyieldthesame -testforthenullhypothesisofno • differencesinpopulationgroupmeans. = + + + =0 1 2 ··· – Forexample,ifweemploytherestriction =0,weareineffect =1 deletingtheparameterforthelastcategory,makingitabaseline X IEmployingthisrestriction(calledasigmaconstraint)tosolveforthe category.Theresultisthedummy-codingscheme. parametersproduces – Alternatively,wecouldusetherestriction =0,whichisequivalent todeletingtheconstanttermfromthelinearmodel,inwhichcase = the‘effect’parametersandgroupmeansareidentical: = . = P Thedot(in ) indicatesaveragingovertherangeofasubscript,here • overgroups.The grand or generalmean ,then,istheaverageof thepopulationgroupmeans,while givesthedifferencebetweenthe meanofgroup andthegrandmean.

c c ° °

AnalysisofVariance 10 AnalysisofVariance 11 Thehypothesisofnodifferencesingroupmeans Forexample,when =3: • • : = = = ( 1)(2) 0 1 2 ··· isequivalenttothehypothesisthatalloftheeffectparametersare group 1 2 zero 1 10 0: 1 = 2 = = =0 2 01 ··· 3 11 IThesigma-constrainedmodelcanbeestimatedbycoding deviation regressors,analternativetothedummy-codingscheme. –Writingouttheequationsforthegroupmeansintermsofthe Werequire 1 deviationregressors, 1 2 1,the thofwhich • iscodedaccordingtothefollowingrule: deviationregressors: 1 forobservationsingroup group1: 1 = +1 1+0 2 = + 1 group2: × × = 1 forobservationsingroup 2 = +0 1+1 2 = + 2 group3: = 1 × 1× = 0 forobservationsinallothergroups 3 × 1 × 2 1 2 – Theequationforthethirdgroupincorporatesthesigmaconstraint, since 3 = 1 2 isequivalentto 1 + 2 + 3 =0.

c c ° ° AnalysisofVariance 12 AnalysisofVariance 13 – Theomnibus -statisticteststhehypothesis : = =0,which, Theregressionandresidualsumsofsquaresthereforetakeparticu- 0 1 2 • underthesigmaconstraint,impliesthat 3 is0aswell—andthatall larlysimpleformsinone-wayanalysisofvariance: ofthepopulationgroupmeansareequal. 2 2 RegSS = = Althoughitisoftenconvenientto fittheone-wayANOVAmodelby I =1 =1 =1 least-squaresregression,itisalsopossibletoestimatethemodeland X X ³ ´ X ¡ ¢ b 2 2 calculatesumsofsquaresdirectly. RSS = = Thesamplemean ingroup istheleast-squaresestimatorofthe =1 =1 • X X ³ ´ XX¡ ¢ correspondingpopulationmean .Estimatesof andthe may Thisinformationcanbepresentedb inanANOVAtable: thereforebewrittenasfollows: • Source 2 RegSS RegMS = = = Groups 1 P 1 RMS P ¡ ¢ = b = 2 RSS Residual The fitted -valuesarethegroupmeans, • 2 = + b= +( )= Total PP¡ ¢ 1 ¡ ¢ b PP c c ° °

AnalysisofVariance 14 AnalysisofVariance 15 I IwilluseDuncan’soccupational-prestigedatatoillustrateone-way analysisofvariance. (a) (b) Parallelboxplotsforprestigeinthreetypesofoccupationsappearin • Figure1(a). – Prestige,recall,isapercentage,andthedatapushboththelower andupperboundariesof0and100percent,suggestingthelogit RR.engineer

reporter

transformationinFigure1(b). e / 100 g

– Thedataarebetter-behavedonthelogitscale,whicheliminatesthe P r e s t ige store.manager skewintheblue-collarandprofessionalgroupsandpullsinallof P r e s ti l o g i t ( P r e s ige / 10 0) store.clerk theoutlyingobservations,withtheexceptionofstoreclerksinthe store.clerk - 3 2 1 0 23 white-collarcategory. 0 . 5 2 8 95 0 2 4 6 8 1 00

Blue-CollarWhite-CollarProfessional Blue-CollarWhite-CollarProfessional

Type of Occupation Type of Occupation

Figure1.Parallelboxplotsfor(a)prestigeand(b)thelogitofprestigeby typeofoccupation.

c c ° ° AnalysisofVariance 16 AnalysisofVariance 17 Means,standarddeviations,andfrequenciesforprestigewithin Onbothscales,thestandarddeviationisgreatestamongtheblue- • occupationaltypesareasfollows: • collaroccupationsandsmallestamongthewhite-collaroccupations, Prestige butthedifferencesarenotverylarge. TypeofOccupation MeanStandardDeviation Usingthelogitofprestigeastheresponsevariable,theone-way Professionalandmanagerial 80 4414 11 18 • ANOVAfortheDuncandatais Whitecollar 36 6711 79 6 SumofMean Bluecollar 22 7618 05 21 Source SquaresdfSquare Groups 95 550247 77551 98 0001 ¿ – Professionaloccupationsthereforehavethehighestaveragelevelof Residuals 38 604420919 prestige,followedbywhite-collarandblue-collaroccupations. Total 134 15444 Theorderofthegroupmeansisthesameonthelogitscale: • logit(Prestige/100) – Occupationaltypesaccountfornearlythree-quartersofthevari- TypeofOccupation MeanStandardDeviation ationinthelogitofprestigeamongtheseoccupations( 2 = Professionalandmanagerial 1 632109089 95 550 134 154=0712 ). Whitecollar 0 579105791 Bluecollar 1 482110696

c c ° °

AnalysisofVariance 18 AnalysisofVariance 19 Themarginalmeanincolumn is 4.Two-WayANOVA • =1 I Notationforpopulationmeansinthetwo-wayclassification: 1 2 andthegrandmeanis P ··· 1 11 12 1 1 ··· = = 2 21 22 2 2 . . . ··· . . P P× P P I If and donotinteractindeterminingtheresponsevariable,thenthe 1 2 ··· partialrelationshipbetweeneachfactorand doesnotdependupon 1 2 ··· thecategoryatwhichtheotherfactoris‘heldconstant.’ ThispatternisillustratedinFigure2(a)forthesimplecasewhere Withineach cell ofthedesignthereisapopulationcellmean for • • = =2. theresponsevariable.Extendingthedotnotation,the marginalmean –Thedifferenceincellmeansacrossthetwocategoriesof isthe oftheresponsevariableinrow is samewithinthetwocategoriesof (andisthereforeequaltothe =1 differenceinthemarginalmeans):

11 21 = 12 22 = 1 2 P · · – Nointeractionimpliesparallel‘profiles’ofcellmeans.

c c ° ° AnalysisofVariance 20 AnalysisofVariance 21 – Parallelprofilesalsoimplythatthecolumndifferenceforcategories 1 and 2 isconstantacrossrows,andisequaltothedifferencein (a) No Interaction (b) Interaction columnmarginalmeans: Y Y 11 12 = 21 22 = 1 2 12 12 R1 R1 Interaction—wheretherowdifferencechangesacrosscolumns(and 11 • .2 thecolumndifferencechangesacrossrows)—isillustratedinFigure 11 .2 2(b). .1 .1 R2 22 21 R2 21 22

C1 C2 C1 C2

Figure2.Nointeraction(a)andinteraction(b)inthetwo-wayclassification.

c c ° °

AnalysisofVariance 22 AnalysisofVariance 23 I Thegeneralizationofthisisasfollows: 4.1PatternsofMeansintheTwo-WayClassification Foranynumberofcategories of and of ,nointeractionimplies Severalpatternsofrelationshipinthetwo-wayclassification,allshowing • thatallcorrespondingrowdifferencesareconstantacrosscolumns, I nointeraction,aregraphedinFigure3: = = forall 0 and 0 0 0 0 0 0 in(a)therearebothrowandcolumnmaineffects; and,equivalently,thatallcorrespondingcolumndifferencesare • in(b)onlycolumnmaineffects; constantacrossrows, • = = forall 0 and 0 in(c)onlyrowmaineffects; 0 0 0 0 0 • Wheninteractionsareabsent,thepartialeffectofeachfactor— in(d)neitherrownorcolumnmaineffects. • • thefactor’s maineffect —isthereforegivenbydifferencesinthe I Figure4showstwodifferentpatternsofinteractions: populationmarginalmeans. In(a),theinteractionisdramatic:Theorderofroweffectschanges • acrosscolumnsandvice-versa.Interactionofthissortissometimes called disordinal. In(b),theinteractionislessdramatic. •

c c ° ° AnalysisofVariance 24 AnalysisofVariance 25

(a) R and C Main Effects (b) C Main Effects Only

jk jk

R1 (a) (b)

jk jk

R2 R1, R2 R2

R2

C1 C2 C3 C1 C2 C3

R1 R1 (c) R Main Effects Only (d) No Effects

jk jk

R1

R1, R2 C1 C2 C3 C1 C2 C3

R2

C1 C2 C3 C1 C2 C3 Figure4.Twopatternsofinteractioninthetwo-wayclassification. Figure3.Patternsofassociation:(a)RowandColumnmaineffects;(b) Columnmaineffectsonly;(c)Rowmaineffectsonly;(d)noeffects. c c ° °

AnalysisofVariance 26 AnalysisofVariance 27 I Evenwheninteractionsareabsentinthepopulation,wecannotexpect perfectlyparallelprofilesof sample means:Thereissamplingerrorin Authoritarianism sampleddata. Partner’sStatus Low Medium High Wehavetodeterminewhetherdeparturesfromparallelismobserved Low 8 900 7 250 12 63 • inasamplearesufficientlylargetobestatisticallysignificant,and,if 2 644 3 948 7 347 significant,aresufficientlylargetobeofinterest. 10 4 8 High 17 40 14 27 11 86 Ingeneral,ifinteractionsarenon-negligible,thenwedonotinterpret 4 506 3 952 3 934 • themaineffectsofthefactors—consistentwiththeprincipleof 5 11 7 marginality. I Thefollowingtableshowsmeans( ),standarddeviations( ),and Becauseoftheconceptual-rigiditycomponentofauthoritarianism, cellfrequencies( )fordatafromasocial-psychologicalexperiment, • MooreandKrupatexpectedthatlow-authoritariansubjectswouldbe reportedbyMooreandKrupat(1971),designedtodeterminehow more responsivethanhigh-authoritariansubjectstothesocialstatus therelationshipbetweenconformityandsocialstatusisinfluencedby oftheirpartner. ‘authoritarianism.’

c c ° ° AnalysisofVariance 28 AnalysisofVariance 29 ThecellmeansaregraphedalongwiththedatainFigure5,and • appeartoconfirmtheexperimenters’expectations. L16 H 19 L – Therearetwooutlyingobservationsinthelow-statuspartner, H high-authoritarianismcondition. H High-Status Partner H HHH HH HH HHH L HL L

C o n f r m i ty L LHL H H L Low-Status Partner H LLH LL HL L L HLH L L 5 1 0 20 L L L

LowMediumHigh

Authoritarianism

Figure5.Meanconformitybyauthoritarianismandpartner’sstatus,for MooreandKrupat’sdata.Theobservationsarejitteredhorizontally. c c ° °

AnalysisofVariance 30 AnalysisofVariance 31 4.2TheTwo-WayANOVAModel I Itisconvenienttoexpresshypothesesconcerningmaineffectsinterms ofthemarginalmeans. Our firstconcernistotestthenullhypothesisofnointeraction. I Thus,fortherowclassificationwehavethenullhypothesis Basedonthepreviousdiscussion,thishypothesiscanbeexpressed • • : = = = intermsofthecellmeans: 0 1 2 ··· andforthecolumnclassification 0: = forall 0 and 0 0 0 0 0 : = = = – Inwords:theroweffectsarethesamewithinalllevelsofthecolumn 0 1 2 ··· factor. Themain-effecthypothesesaretestablewhetherinteractionsare •presentorabsent,butthesehypothesesaregenerallyofinterestonly Rearrangingterms, • whentheinteractionsarenil. : = forall and 0 0 0 0 0 0 0 – Thatis,thecolumneffectsareinvariantacrossrows. I Thetwo-wayANOVAmodelprovidesaconvenientmeansfortestingthe hypothesesaboutmaineffectsandinteractions.Themodelis = + + + + where isthe thobservationinrow ,column ofthe table; • isthegeneralmeanof ; •

c c ° ° AnalysisofVariance 32 AnalysisofVariance 33 and aremain-effectparameters,forrow-effectsandcolumn- – Withthispurposeinmind,wespecifythefollowingsigmaconstraints • effects,respectively; onthemodelparameters: areinteractionparameters;and • =0 2 (0 ) andindependent. =1 • X Takingexpectations,themodelbecomes I =0 ( )= + + + =1 Sincethereare populationcellmeansand 1+ + +( ) X • × × parameters,theparametersofthemodelarenotuniquelydetermined =0 forall =1 bythecellmeans. =1 X Asinone-wayANOVA,theindeterminacyofthemodelcanbe • overcomebyimposing 1+ + independentrestrictionsonits =0 forall =1 parameters. X=1 – Itisconvenienttoselectrestrictionsthatmakeitsimpletotestthe –At firstglance,itseemsasifwehavespecifiedtoomanyconstraints, hypothesesofinterest. fortheequationsdefine 1+1+ + restrictions. – Oneoftherestrictionsontheinteractionsisredundant,however.

c c ° °

AnalysisofVariance 34 AnalysisofVariance 35

– Inshort-handform,thesigmaconstraintsspecifythateachsetof Thehypothesisofnorowmaineffectsisthereforeequivalentto 0:all • parameterssumsto0overeachofitscoordinates. =0,forunderthishypothesis = = = = I Theconstraintsproducethefollowingsolutionformodelparametersin 1 2 ··· termsofpopulationcellandmarginalmeans: Likewise,thehypothesisofnocolumnmaineffectsisequivalentto 0: • = all =0,sincethen = = = = 1 2 ··· = Finally,itisnotdifficulttoshowthatthehypothesisofnointeractions • isequivalentto 0:all =0. =

= = +

c c ° ° AnalysisofVariance 36 AnalysisofVariance 37 4.3FittingtheTwo-WayANOVAModeltoData Theresidualsarejustthedeviationsoftheobservationsfromtheircell • means,sincethe fittedvaluesarethecellmeans: Sincetheleast-squaresestimatorof isthesamplecellmean I = ( + + + ) = =1 = least-squaresestimatorsoftheconPstrainedmodelparametersfollow I Intestinghypothesesaboutsetsofmodelparameters,however,we immediately requireincrementalsumsofsquaresforeachset,and(unlessallofthe cellfrequencies areequal)thereisnowayofcalculatingthesesums = = ofsquaresdirectly. PP× Asinone-wayanalysisofvariance,therestrictionsonthetwo-way • ANOVAmodelcanbeusedtoproducedeviation-codedregressors. b = = P Incrementalsumsofsquaresmaythenbecalculatedintheusual • manner. b = = Toillustratethisprocedure,wewillexamineatwo-row three-column P I classification: × b = + Inlightoftherestriction + =0, canbedeletedfromthemodel, • 1 2 2 substituting 1.

c b c ° °

AnalysisofVariance 38 AnalysisofVariance 39 Similarly,because + + =0, canbereplacedby . • 1 2 3 3 1 2 Theinteractionsinthe 2 3 classificationsatisfythefollowing 13 = 11 12 • × constraints: 21 = 11

11 + 12 + 13 =0 22 = 12 21 + 22 + 23 =0 23 = 13 = 11 + 12 11 + 21 =0 I Theseobservationsleadtothefollowingcodingofregressorsforthe + =0 2 3 classification: 12 22 × cell ( 1)( )( )( )( ) 13 + 23 =0 1 2 11 12 –Althoughthereare fivesuchconstraints,the fifthfollowsfromthe rowcolumn 1 1 2 1 1 1 2 firstfour.) 11 11010 12 10101 Wecan,asaconsequence,deletealloftheinteractionparameters 13 11111 • except and ,substitutingfortheremainingfourparametersin 11 12 21 110 10 thefollowingmanner: 22 10101 23 11111

c c ° ° AnalysisofVariance 40 AnalysisofVariance 41

Here, 1 istheregressorfortherowmaineffects; 2. Thereare 1 regressors(and df )forthecolumnmaineffects;the th • 1 and 2 aretheregressorsforthecolumnmaineffects; suchregressor, ,iscodedaccordingtothefollowingscheme: • 1 ifobs. isincolumn and aretheinteractionregressors. 1 1 1 2 = 1 ifobs. isincolumn • – Thenotationfortheinteractionregressorsissuggestiveofmultipli- 0 ifobs. isinanyothercolumn cation,andinfactwecanseethat 1 1 istheproductof 1 and 1, andthat 1 2 istheproductof 1 and 2. 3. Thereare ( 1)( 1) regressors(and df )forthe interactions. Theseinteractionregressorsconsistofallpairwiseproductsofthe 1 Ihaveconstructedtheseregressorstoreflecttheconstraintsonthe I main-effectregressorsforrowsand 1 main-effectregressorsfor model,buttheycanalsobecodedmechanicallybyapplyingtheserules: columns. 1. Thereare 1 regressors(andhencedegreesoffreedom)forthe rowmaineffects;the thsuchregressor, ,iscodedaccordingtothe followingscheme: 1 ifobs. isinrow = 1 ifobs. isinrow 0 ifobs. isinanyotherrow

c c ° °

AnalysisofVariance 42 AnalysisofVariance 43 4.4TestingHypothesesinTwo-WayANOVA – Thislastmodelviolatestheprincipleofmarginality,butitplaysa roleinconstructingtheincrementalsumofsquaresfortestingthe Ihavespecifiedconstraintsonthetwo-wayANOVAmodelsothattesting I columnmaineffects. hypothesesabouttheparametersoftheconstrainedmodelisequivalent Asusual,incrementalsumsofsquaresaregivenbydifferences totestinghypothesesaboutinteractionsandmaineffectsofthetwo • factors. betweentheregressionsumsofsquaresforalternativemodels: SS( )=SS( ) SS( ) Testsforinteractionsandmaineffectscanbeconstructedbythe | I SS( )=SS( ) SS( ) incrementalsumofsquaresapproach. | SS( )=SS( ) SS( ) LetSS( ) denotetheregressionsumofsquaresforthefull | • model,whichincludesbothsetsofmaineffectsandtheinteractions. SS( )=SS( ) SS( ) | SS( )=SS( ) SS( ) Theregressionsumsofsquaresforothermodelsaresimilarly | • – WereadSS( ),forexample,as‘thesumofsquaresfor represented. | – Forexample,fortheno-interactionmodel,wehaveSS( ); interaction after themaineffects,’andSS( ) as‘thesumof squaresfortherowmaineffects after thecolu| mnmaineffectsand – andforthemodelthatomitsthecolumnmain-effectregressors,we ignoring theinteractions.’ haveSS( ).

c c ° ° AnalysisofVariance 44 AnalysisofVariance 45 – Theresidualsumofsquaresis Inthe absence ofinteractions,SS( ) andSS( ) canbeusedto I | | RSS = 2 testformaineffects,buttheuseofSS( ) andSS( ) isalso | | 2 appropriate. = XXX( ) If,however,interactionsare present,then -testsbasedonSS( ) • | = XTSSXXSS( ) andSS( ) donot testthemain-effectnullhypotheses 0:all =0 | I Theincrementalsumofsquaresforinteraction,SS( ),isappropri- and 0:all =0;instead,theinteractionparametersbecome | implicatedinthesetests. atefortestingthenullhypothesisofnointeraction, 0:all =0. IInthepresenceofinteractions,wecanuseSS( ) andSS( ) totesthypothesesconcerningmaineffects(i.e.,d|ifferencesamon|grow andcolumnmarginalmeans),butthesehypothesesareusuallynotof interestwhentheinteractionsareimportant.

c c ° °

AnalysisofVariance 46 AnalysisofVariance 47 I Theseremarksaresummarizedinthefollowingtable: OtherauthorspreferSS( ) andSS( ) (sometimescalled I | | Source 0 ‘Type-III’sumsofsquares)because,inthepresenceofinteractions, SS all testsbaseduponthesesumsofsquareshaveastraight-forward(if 1 ( ) =0( = 0) | all =0all =0 usuallyuninteresting)interpretation. SS( ) | | ( = noint.) 0| I Ibelievethateitherapproachisreasonable.Itisimportanttounderstand, 1 SS( ) all =0( = ) 0 however,thatwhileSS( ) andSS( ) areusefulasbuildingblocksof | all =0all =0 SS( ) | SS( ) andSS( ),itisingeneral inappropriate touseSS( ) and | ( = noint.) | | 0| SS( ) totesthypothesesaboutthe and maineffects:Eachofthese all =0 ( 1)( 1) SS( ) sumsofsquaresdependsupontheothersetofmaineffects(andthe ( = ) | 0 0 0 0 interactions,iftheyarepresent). Residual TSS SS( ) Consequently,thesequential(“Type-I”)sumsofsquaresSS( ) SS( ) Total 1 TSS • andSS( ) donotprovideanappropriatetestforthe mainef-| | I Certainauthorsprefermain-effectstestsbaseduponSS( ) and fects. SS( ) (sometimescalled‘Type-IIsumsofsquares’)becau| se,if intera|ctionsareabsent,testsbaseduponthesesumsofsquaresare morepowerfulthanthosebaseduponSS( ) andSS( ). | |

c c ° ° AnalysisofVariance 48 AnalysisofVariance 49 4.5AnExample:MooreandKrupat’sConformity I TheANOVAfortheexperimentisshowninthefollowingtable: Source Partner’sStatus 1 I FortheMooreandKrupatconformitydata,factor ispartner’sstatus 239.57239.5711.43.002 andfactor isauthoritarianism. | 212.22212.2210.12.003 | I Sumsofsquaresforvariousmodels fittothedataareasfollows: Authoritarianism 2 SS( )=391 44 36.0218.010.86.43 | 11.625.810.28.76 SS( )=215 95 | SS( )=355 42 Status Authoritarianism 175.49287.744.18.02 Residu×al 817.763920.97 SS( )=151 87 Total 1209.244 SS( )=204 33 SS( )=37333 I Aresearcherwouldnotnormallyreport both setsofmain-effectsumsof squares. TSS =1209 2

c c ° °

AnalysisofVariance 50 AnalysisofVariance 51 5.Summary I Thetwo-wayanalysisofvariancemodel = + + + + One-wayanalysisofvarianceexaminestherelationshipbetweena I incorporatesmaineffectsandinteractionsoftwofactors. quantitativeresponsevariableandacategoricalexplanatoryvariable(or Thefactorsinteractwhentheprofilesofpopulationcellmeansarenot factor). • parallel. I Theone-wayANOVAmodel I Thetwo-wayANOVAmodelisover-parameterized,butitmaybe fitto = + + databyplacingsuitablerestrictionsonitsparameters. isunder-determinedbecauseituses +1parameterstomodel Aconvenientsetofrestrictionsisprovidedbysigmaconstraints, groupmeans. • specifyingthateachsetofparameters( , ,and )sumsto0over Themodelcanbesolved,however,byplacingarestrictiononits eachofitscoordinates. • parameters. Testinghypothesesaboutthesigma-constrainedparametersis Settingoneofthe ’sto0leadstodummy-regressorcoding. • • equivalenttotestinginteraction-effectandmain-effecthypotheses Constrainingthe ’stosumto0leadstodeviation-regressorcoding. aboutcellandmarginalmeans. • Thetwocodingschemesareequivalentinthattheyprovidethesame • fittothedata,producingthesameregressionandresidualsumsof squares.

c c ° ° AnalysisofVariance 52 I Therearetworeasonableproceduresfortestingmain-effecthypotheses intwo-wayANOVA: TestsbasedonSS( ) andSS( ) (Type-IIIsumsofsquares) • employmodelsthatvi|olatetheprinci|pleofmarginality,butarevalid whetherornotinteractionsarepresent. TestsbasedonSS( ) andSS( ) (Type-IIsumsofsquares) • conformtotheprincipl|eofmarginali|ty,butarevalidonlyifinteractions areabsent.

c °