Professional Documents
Culture Documents
WithinSubjectsANOVA
Chapter:
Home
I.
II.
III.
IV.
V.
VI.
VII.
VIII.
IX.
X.
XI.
XII.
XIII.
XIV.
Introduction
GraphingDistributions
SummarizingDistributions
DescribingBivariateData
Probability
ResearchDesign
NormalDistribution
AdvancedGraphs
SamplingDistributions
Estimation
LogicofHypothesisTesting
TestsofMeans
Power
Regression
XV. AnalysisofVariance
1. Contents
Standard
2. Introduction
StandardVideo
3. ANOVADesigns
StandardVideo
4. OneFactorANOVA
StandardVideo
5. OneWayDemo
Standard
6. MultiFactorBetween
Subjects
StandardVideo
7. Unequaln
StandardVideo
8. TestsSupplementing
StandardVideo
9. WithinSubjects
Standard
10. PowerofWithinSubjects
DesignsDemo
Standard
11. StatisticalLiteracy
Standard
12. Exercises
Standard
XVI.
XVII.
XVIII.
XIX.
XX.
XXI.
XXII.
Transformations
ChiSquare
DistributionFreeTests
EffectSize
CaseStudies
Calculators
Glossary
Section:
15.AnalysisofVariance
WithinSubjects
Home|PreviousSection|NextSection
Video
WithinSubjectsANOVA
Author(s)
DavidM.Lane
Prerequisites
Designs,IntroductiontoANOVA,ANOVADesigns,MultiFactorANOVA,Difference
BetweenTwoMeans(CorrelatedPairs)
LearningObjectives
1. Defineawithinsubjectsfactor
2. Explainwhyawithinsubjectsdesigncanbeexpectedtohavemorepower
thanabetweensubjectsdesign
3. BeabletocreatetheSourceanddfcolumnsofanANOVAsummarytable
aonewaywithinsubjectsdesign
4. Explainerrorintermsofinteraction
5. Discusstheproblemofcarryovereffects
6. BeabletocreatetheSourceanddfcolumnsofanANOVAsummarytable
adesignwithonebetweensubjectsandonewithinsubjectsvariable
7. Definesphericity
8. Describetheconsequencesofviolatingtheassumptionofsphericity
9. Discusscoursesofactionthatcanbetakenifsphericityisviolated
Withinsubjectsfactorsinvolvecomparisonsofthesamesubjectsunderdifferent
conditions.Forexample,inthe"ADHDTreatment"study,eachchild's
performancewasmeasuredfourtimes,onceafterbeingoneachoffourdrug
dosesforaweek.Therefore,eachsubject'sperformancewasmeasuredateachof
thefourlevelsofthefactor"Dose."Notethedifferencefrombetweensubjects
factorsforwhicheachsubject'sperformanceismeasuredonlyonceandthe
comparisonsareamongdifferentgroupsofsubjects.Awithinsubjectsfactoris
sometimesreferredtoasarepeatedmeasuresfactorsincerepeated
measurementsaretakenoneachsubject.Anexperimentaldesigninwhichthe
independentvariableisawithinsubjectsfactoriscalledawithinsubjectsdesign
AdvantageofWithinSubjectsDesigns
ONE FACTORDESIGNS
Let'sconsiderhowtoanalyzethedatafromthe"ADHDTreatment"casestudy
Thesedataconsistofthescoresof24childrenwithADHDonadelayof
gratification(DOG)task.Eachchildwastestedunderfourdosagelevels.Fornow,
wewillbeconcernedonlywithtestingthedifferencebetweenthemeaninthe
placebocondition(thelowestdosage,D0)andthemeaninthehighestdosage
condition(D60).Thedetailsofthecomputationsarerelativelyunimportantsince
theyarealmostuniversallydonebycomputers.Thereforewejumprighttothe
ANOVASummarytableshowninTable1.
Table1.ANOVASummaryTable.
Source
df
SSQ
MS
295.02
Error
23
653.48
Total
47 6730.48
Thefirstsourceofvariation,"Subjects,"referstothedifferencesamongsubjects.
Ifallthesubjectshadexactlythesamemean(acrossthetwodosages),thenthe
sumofsquaresforsubjectswouldbezerothemoresubjectsdifferfromeach
other,thelargerthesumofsquaressubjects.
Dosagereferstothedifferencesbetweenthetwodosagelevels.Ifthemeans
forthetwodosagelevelswereequal,thesumofsquareswouldbezero.The
largerthedifferencebetweenmeans,thelargerthesumofsquares.
Theerrorreflectsthedegreetowhichtheeffectofdosageisdifferentfor
http://onlinestatbook.com/2/analysis_of_variance/withinsubjects.html
1/4
6/10/2015
WithinSubjectsANOVA
differentsubjects.Ifsubjectsallrespondedverysimilarlytothedrug,thenthe
errorwouldbeverylow.Forexample,ifallsubjectsperformedmoderatelybetter
withthehighdosethantheydidwiththeplacebo,thentheerrorwouldbelow.
Ontheotherhand,ifsomesubjectsdidbetterwiththeplacebowhileothersdid
betterwiththehighdose,thentheerrorwouldbehigh.Itshouldmakeintuitive
sensethatthelessconsistenttheeffectofdosage,thelargerthedosageeffect
wouldhavetobeinordertobesignificant.Thedegreetowhichtheeffectof
dosagediffersdependingonthesubjectistheSubjectsxDosageinteraction.
Recallthataninteractionoccurswhentheeffectofonevariablediffersdepending
onthelevelofanothervariable.Inthiscase,thesizeoftheerrortermisthe
extenttowhichtheeffectofthevariable"Dosage"differsdependingonthelevel
ofthevariable"Subjects."Notethateachsubjectisadifferentlevelofthe
variable"Subjects."
Otherportionsofthesummarytablehavethesamemeaningasinbetween
subjectsANOVA.TheFfordosageisthemeansquarefordosagedividedbythe
meansquareerror.Forthesedata,theFissignificantwithp=0.004.Noticethat
thisFtestisequivalenttothettestforcorrelatedpairs,withF=t2.
Table2showstheANOVASummaryTablewhenallfourdosesareincludedin
theanalysis.Sincetherearenowfourdosagelevelsratherthantwo,thedffor
dosageisthreeratherthanone.SincetheerroristheSubjectsxDosage
interaction,thedfforerroristhedffor"Subjects"(23)timesthedfforDosage
(3)andisequalto69.
Table2.ANOVASummaryTable.
Source
df
Subjects 23
SSQ
MS
9065.49
394.15
Dosage
557.61
Error
69
2476.64
Total
95 12099.74
35.89
CARRYOVEREFFECTS
Oftenperforminginoneconditionaffectsperformanceinasubsequentcondition
insuchawayastomakeawithinsubjectsdesignimpractical.Forexample,
consideranexperimentwithtwoconditions.Inbothconditionssubjectsare
presentedwithpairsofwords.InConditionA,subjectsareaskedtojudge
whetherthewordshavesimilarmeaningwhereasinConditionB,subjectsare
askedtojudgewhethertheysoundsimilar.Inbothconditions,subjectsaregiven
asurprisememorytestattheendofthepresentation.IfConditionwereawithin
subjectsvariable,thentherewouldbenosurpriseafterthesecondpresentation
anditislikelythatthesubjectswouldhavebeentryingtomemorizethewords.
Notallcarryovereffectscausesuchseriousproblems.Forexample,ifsubjects
getfatiguedbyperformingatask,thentheywouldbeexpectedtodoworseon
thesecondconditiontheywerein.However,aslongastheorderofpresentation
iscounterbalancedsothathalfofthesubjectsareinConditionAfirstand
ConditionBsecond,thefatigueeffectitselfwouldnotinvalidatetheresults,
althoughitwouldaddnoiseandreducepower.Thecarryovereffectissymmetric
inthathavingConditionAfirstaffectsperformanceinConditionBtothesame
degreethathavingConditionBfirstaffectsperformanceinConditionA.
Asymmetriccarryovereffectscausemoreseriousproblems.Forexample,
supposeperformanceinConditionBweremuchbetterifprecededbyConditionA,
whereasperformanceinConditionAwasapproximatelythesameregardlessof
whetheritwasprecededbyConditionB.Withthiskindofcarryovereffect,itis
probablybettertouseabetweensubjectsdesign.
http://onlinestatbook.com/2/analysis_of_variance/withinsubjects.html
6/10/2015
WithinSubjectsANOVA
Table3.ANOVASummaryTableforStroop
Experiment.
Source df
Gender
Error
SSQ
MS
83.32
83.32
1.99
0.165
41.79
45 1880.56
Task
Gender
xTask
Error
90 1879.67
27.92
1.34
0.268
20.89
Thecomputationsforthesumsofsquareswillnotbecoveredsincecomputations
arenormallydonebysoftware.However,therearesomeimportantthingsto
learnfromthesummarytable.First,noticethattherearetwoerrorterms:one
forthebetweensubjectsvariableGenderandoneforboththewithinsubjects
variableTaskandtheinteractionofthebetweensubjectsvariableandthewithin
subjectsvariable.Typically,themeansquareerrorforthebetweensubjects
variablewillbehigherthantheothermeansquareerror.Inthisexample,the
meansquareerrorforGenderisabouttwiceaslargeastheothermeansquare
error.
Thedegreesoffreedomforthebetweensubjectsvariableisequaltothe
numberoflevelsofthebetweensubjectsvariableminusone.Inthisexample,it
isonesincetherearetwolevelsofgender.Similarly,thedegreesoffreedomfor
thewithinsubjectsvariableisequaltothenumberoflevelsofthevariableminus
one.Inthisexample,itistwosincetherearethreetasks.Thedegreesoffreedom
fortheinteractionistheproductofthedegreesoffreedomforthetwovariables.
FortheGenderxTaskinteraction,thedegreesoffreedomistheproductof
degreesoffreedomGender(whichis1)andthedegreesoffreedomTask(which
is2)andisequalto2.
ASSUMPTIONOFSPHERICITY
WithinsubjectsANOVAmakesarestrictiveassumptionaboutthevariancesand
thecorrelationsamongthedependentvariables.Althoughthedetailsofthe
assumptionarebeyondthescopeofthisbook,itisapproximatelycorrecttosay
thatitisassumedthatallthecorrelationsareequalandallthevariancesare
equal.Table4showsthecorrelationsamongthethreedependentvariablesinthe
"StroopInterference"casestudy.
Table4.CorrelationsAmong
DependentVariables.
word
color
reading naming interference
wordreading
0.7013
0.1583
colornaming
0.7013
0.2382
interference
0.1583
0.2382
Notethatthecorrelationbetweenthewordreadingandthecolornaming
variablesof0.7013ismuchhigherthanthecorrelationbetweeneitherofthese
variableswiththeinterferencevariable.Moreover,asshowninTable5,the
variancesamongthevariablesdiffergreatly.
Table5.Variances.
Variable
Variance
wordreading
15.77
colornaming
13.92
interference
55.07
Naturallytheassumptionofsphericity,likeallassumptions,referstopopulations
notsamples.However,itisclearfromthesesampledatathattheassumption
notmetinthepopulation.
http://onlinestatbook.com/2/analysis_of_variance/withinsubjects.html
3/4
6/10/2015
WithinSubjectsANOVA
CONSEQUENCES OFVIOLATINGTHEASSUMPTIONOFSPHERICITY
AlthoughANOVAisrobusttomostviolationsofitsassumptions,theassumption
ofsphericityisanexception:Violatingtheassumptionofsphericityleadstoa
substantialincreaseintheTypeIerrorrate.Moreover,thisassumptionisrarely
metinpractice.Althoughviolationsofthisassumptionhadatonetimereceived
littleattention,thecurrentconsensusofdataanalystsisthatitisnolonger
consideredacceptabletoignorethem.
ApproachestoDealingwithViolationsofSphericity
Ifaneffectishighlysignificant,thereisaconservativetestthatcanbeusedto
protectagainstaninflatedTypeIerrorrate.Thistestconsistsofadjustingthe
degreesoffreedomforallwithinsubjectsvariablesasfollows:Thedegreesof
freedomnumeratoranddenominatoraredividedbythenumberofscoresper
subjectminusone.ConsidertheeffectofTaskshowninTable3.Therearethree
scorespersubjectandthereforethedegreesoffreedomshouldbedividedby
two.Theadjusteddegreesoffreedomare:
(2)(1/2)=1forthenumeratorand
(90)(1/2)=45forthedenominator
TheprobabilityvalueisobtainedusingtheFprobabilitycalculatorwiththenew
degreesoffreedomparameters.TheprobabilityofanFof228.06orlargerwith1
and45degreesoffreedomislessthan0.001.Therefore,thereisnoneedto
worryabouttheassumptionviolationinthiscase.
Possibleviolationofsphericitydoesmakeadifferenceintheinterpretationof
theanalysisshowninTable2.TheprobabilityvalueofanFof5.18with1and23
degreesoffreedomis0.032,avaluethatwouldleadtoamorecautious
conclusionthanthepvalueof0.003showninTable2.
Thecorrectiondescribedaboveisveryconservativeandshouldonlybeused
when,asinTable3,theprobabilityvalueisverylow.Abettercorrection,butone
thatisverycomplicatedtocalculate,istomultiplythedegreesoffreedombya
quantitycalled(theGreekletterepsilon).Therearetwomethodsofcalculating
.ThecorrectioncalledtheHuynhFeldt(orHF)isslightlypreferredtotheone
calledtheGreenhouseGeisser(orGG),althoughbothworkwell.TheGG
correctionisgenerallyconsideredalittletooconservative.
Afinalmethodfordealingwithviolationsofsphericityistouseamultivariate
approachtowithinsubjectsvariables.Thismethodhasmuchtorecommendit,
butitisbeyondthescopeofthistext.
Question1outof5.
Whichofthefollowingrepresentwithinsubjectsvariables?
Age:Subjectsoffourdifferentageswereusedintheexperiment.
Trial:Eachsubjecthadthreetrialsonthetaskandtheirscorewasrecorded
foreachtrial.
Dose:Eachsubjectwastestedundereachoffivedosagelevels.
Day:Eachsubjectwastestedonceadayforfourdays.
Intensity:Eachsubjectwasrandomlyassignedtooneoffiveintensity
levels.
CheckAnswer
PreviousQuestion NextQuestion
PreviousSection|NextSection
http://onlinestatbook.com/2/analysis_of_variance/withinsubjects.html
4/4