Você está na página 1de 7

KruskalWallisHTestusingSPSSStatistics

Introduction
TheKruskalWallisHtest(sometimesalsocalledthe"onewayANOVAonranks")isarankbasednonparametrictestthatcanbeusedto
determineiftherearestatisticallysignificantdifferencesbetweentwoormoregroupsofanindependentvariableonacontinuousor
ordinaldependentvariable.ItisconsideredthenonparametricalternativetotheonewayANOVA,andanextensionoftheMannWhitney
Utesttoallowthecomparisonofmorethantwoindependentgroups.
Forexample,youcoulduseaKruskalWallisHtesttounderstandwhetherexamperformance,measuredonacontinuousscalefrom0
100,differedbasedontestanxietylevels(i.e.,yourdependentvariablewouldbe"examperformance"andyourindependentvariable
wouldbe"testanxietylevel",whichhasthreeindependentgroups:studentswith"low","medium"and"high"testanxietylevels).
Alternately,youcouldusetheKruskalWallisHtesttounderstandwhetherattitudestowardspaydiscrimination,whereattitudesare
measuredonanordinalscale,differedbasedonjobposition(i.e.,yourdependentvariablewouldbe"attitudestowardspay
discrimination",measuredona5pointscalefrom"stronglyagree"to"stronglydisagree",andyourindependentvariablewouldbe"job
description",whichhasthreeindependentgroups:"shopfloor","middlemanagement"and"boardroom").
ItisimportanttorealizethattheKruskalWallisHtestisanomnibusteststatisticandcannottellyouwhichspecificgroupsofyour
independentvariablearestatisticallysignificantlydifferentfromeachotheritonlytellsyouthatatleasttwogroupsweredifferent.Since
youmayhavethree,four,fiveormoregroupsinyourstudydesign,determiningwhichofthesegroupsdifferfromeachotherisimportant.
Youcandothisusingaposthoctest(N.B.,wediscussposthoctestslaterinthisguide).
This"quickstart"guideshowsyouhowtocarryoutaKruskalWallisHtestusingSPSSStatistics,aswellasinterpretandreportthe
resultsfromthistest.However,beforeweintroduceyoutothisprocedure,youneedtounderstandthedifferentassumptionsthatyour
datamustmeetinorderforaKruskalWallisHtesttogiveyouavalidresult.Wediscusstheseassumptionsnext.

SPSSStatistics

top^

Assumptions
WhenyouchoosetoanalyseyourdatausingaKruskalWallisHtest,partoftheprocessinvolvescheckingtomakesurethatthedatayou
wanttoanalysecanactuallybeanalysedusingaKruskalWallisHtest.Youneedtodothisbecauseitisonlyappropriatetousea
KruskalWallisHtestifyourdata"passes"fourassumptionsthatarerequiredforaKruskalWallisHtesttogiveyouavalidresult.In
practice,checkingforthesefourassumptionsjustaddsalittlebitmoretimetoyouranalysis,requiringyoutoclickafewmorebuttonsin
SPSSStatisticswhenperformingyouranalysis,aswellasthinkalittlebitmoreaboutyourdata,butitisnotadifficulttask.
Beforeweintroduceyoutothesefourassumptions,donotbesurprisedif,whenanalysingyourowndatausingSPSSStatistics,oneor
moreoftheseassumptionsisviolated(i.e.,isnotmet).Thisisnotuncommonwhenworkingwithrealworlddataratherthantextbook
examples,whichoftenonlyshowyouhowtocarryoutaKruskalWallisHtestwheneverythinggoeswell!However,dontworry.Even
whenyourdatafailscertainassumptions,thereisoftenasolutiontoovercomethis.First,letstakealookatthesefourassumptions:
Assumption#1:Yourdependentvariableshouldbemeasuredattheordinalorcontinuouslevel(i.e.,intervalorratio).Examplesofordinal
variablesincludeLikertscales(e.g.,a7pointscalefrom"stronglyagree"throughto"stronglydisagree"),amongstotherwaysofranking
categories(e.g.,a3pontscaleexplaininghowmuchacustomerlikedaproduct,rangingfrom"Notverymuch",to"ItisOK",to"Yes,alot").
Examplesofcontinuousvariablesincluderevisiontime(measuredinhours),intelligence(measuredusingIQscore),examperformance
(measuredfrom0to100),weight(measuredinkg),andsoforth.Youcanlearnmoreaboutordinalandcontinuousvariablesinourarticle:Types
ofVariable.
Assumption#2:Yourindependentvariableshouldconsistoftwoormorecategorical,independentgroups.Typically,aKruskalWallisH
testisusedwhenyouhavethreeormorecategorical,independentgroups,butitcanbeusedforjusttwogroups(i.e.,aMannWhitneyUtestis
morecommonlyusedfortwogroups).Exampleindependentvariablesthatmeetthiscriterionincludeethnicity(e.g.,threegroups:Caucasian,
AfricanAmericanandHispanic),physicalactivitylevel(e.g.,fourgroups:sedentary,low,moderateandhigh),profession(e.g.,fivegroups:
surgeon,doctor,nurse,dentist,therapist),andsoforth.
Assumption#3:Youshouldhaveindependenceofobservations,whichmeansthatthereisnorelationshipbetweentheobservationsineach
grouporbetweenthegroupsthemselves.Forexample,theremustbedifferentparticipantsineachgroupwithnoparticipantbeinginmorethan
onegroup.Thisismoreofastudydesignissuethansomethingyoucantestfor,butitisanimportantassumptionoftheKruskalWallisHtest.If
yourstudyfailsthisassumption,youwillneedtouseanotherstatisticaltestinsteadoftheKruskalWallisHtest(e.g.,aFriedmantest).Ifyouare
unsurewhetheryourstudymeetsthisassumption,youcanuseourStatisticalTestSelector,whichispartofourenhancedcontent.

AstheKruskalWallisHtestdoesnotassumenormalityinthedataandismuchlesssensitivetooutliers,itcanbeusedwhenthese
assumptionshavebeenviolatedandtheuseofaonewayANOVAisinappropriate.Inaddition,ifyourdataisordinal,aoneway
ANOVAisinappropriate,buttheKruskalWallisHtestisnot.However,theKruskalWallisHtestdoescomewithanadditionaldata
consideration,Assumption#4,whichisdiscussedbelow:
Assumption#4:InordertoknowhowtointerprettheresultsfromaKruskalWallisHtest,youhavetodeterminewhetherthedistributionsin
eachgroup(i.e.,thedistributionofscoresforeachgroupoftheindependentvariable)havethesameshape(whichalsomeansthesame
variability).Tounderstandwhatthismeans,takealookatthediagrambelow:

Copyright2014.LaerdStatistics

Inthediagramontheleftabove,thedistributionofscoresforthe"Caucasian","AfricanAmerican"and"Hispanic"groupshavethesameshape.
Ontheotherhand,inthediagramontherightabove,thedistributionofscoresforeachgrouparenotidentical(i.e.,theyhavedifferent
shapesandvariabilities).
Ifyourdistributionshavethesameshape,youcanuseSPSSStatisticstocarryoutaKruskalWallisHtesttocomparethemediansofyour
dependentvariable(e.g.,"engagementscore")forthedifferentgroupsoftheindependentvariableyouareinterestedin(e.g.,thegroups,
Caucasian,AfricanAmericanandHispanic,fortheindependentvariable,"ethnicity").However,ifyourdistributionshaveadifferentshape,you
canonlyusetheKruskalWallisHtesttocomparemeanranks.Havingsimilardistributionssimplyallowsyoutousemedianstorepresenta
shiftinlocationbetweenthegroups(asillustratedinthediagramontheleftabove).Assuch,itisveryimportanttocheckthisassumptionoryou
canendupinterpretingyourresultsincorrectly.
Youcancheckassumption#4usingSPSSStatistics.Youshouldalsocheckthatyourdatameetsassumptions#1,#2and#3,whichyou
candowithoutusingSPSSStatistics.Justrememberthatifyoudonotcheckassumption#4,youwillnotknowwhetheryouareableto
comparemediansorjustmeanranks,meaningthatyoumightincorrectlyinterpretandreporttheresultoftheKruskalWallisHtest.Thisis
whywededicateanumberofsectionsofourenhancedKruskalWallisHtestguidetohelpyougetthisright.Youcanlearnmoreabout
assumption#4andwhatyouwillneedtointerpretintheAssumptionssectionofourenhancedKruskalWallisHtestguide,whichyou
canaccessbysubscribingtothesitehere.
IntheTestProcedureinSPSSStatisticssectionofthis"quickstart"guide,weillustratetheSPSSStatisticsproceduretoperforma
KruskalWallisHtestassumingthatyourdistributionsarenotthesameshapeandyouhavetointerpretmeanranksratherthanmedians.
First,wesetouttheexampleweusetoexplaintheKruskalWallisHtestprocedureinSPSSStatistics.

SPSSStatistics

top^

Example
Amedicalresearcherhasheardanecdotalevidencethatcertainantidepressivedrugscanhavethepositivesideeffectoflowering
neurologicalpaininthoseindividualswithchronic,neurologicalbackpain,whenadministeredindoseslowerthanthoseprescribedfor
depression.Themedicalresearcherwouldliketoinvestigatethisanecdotalevidencewithastudy.Theresearcheridentifies3wellknown,
antidepressivedrugswhichmighthavethispositivesideeffect,andlabelsthemDrugA,DrugBandDrugC.Theresearcherthenrecruits
agroupof60individualswithasimilarlevelofbackpainandrandomlyassignsthemtooneofthreegroupsDrugA,DrugBorDrugC
treatmentgroupsandprescribestherelevantdrugfora4weekperiod.Attheendofthe4weekperiod,theresearcherasksthe
participantstoratetheirbackpainonascaleof1to10,with10indicatingthegreatestlevelofpain.Theresearcherwantstocomparethe
levelsofpainexperiencedbythedifferentgroupsattheendofthedrugtreatmentperiod.TheresearcherrunsaKruskalWallisHtestto
comparethisordinal,dependentmeasure(
Pain_Score )betweenthethreedrugtreatments(i.e.,theindependent
variable,
Drug_Treatment_Group ,isthetypeofdrugwithmorethantwogroups).

TAKETHETOUR

PLANS&PRICING

SPSSStatistics

top^

TestProcedureinSPSSStatistics
TheeightstepsbelowshowyouhowtoanalyseyourdatausingtheKruskalWallisHtestinSPSSStatistics.Attheendoftheseeight
steps,weshowyouhowtointerprettheresultsfromyourKruskalWallisHtest.Ifyouwanttofindoutwherethedifferencesbetweenyour
groupslie(i.e.,theKruskalWallisHtestonlytellsyouwhethertherewasastatisticallysignificantdifferencebetweenyourgroups),you
willneedtofollowupyourKruskalWallisHtestwithaposthoctest.WealsoshowyouhowtocarrytheseoutaposthoctestusingSPSS
StatisticsinourenhancedKruskalWallisHtestguide,whichyoucanaccessbysubscribingtothesitehere.
Note:SPSSStatisticshastwodifferentproceduresthatcanbeusedtorunaKruskalWallisHtest:alegacyprocedureanda'new'
procedure(N.B.,wejustcallit'new'forease).TheprocedurewesetoutbelowisSPSSStatistics'legacyprocedure.Weshowyou
thelegacyprocedurebecauseitcanbeusedformorerecentandolderversionsofSPSSStatistics.However,ithasthe
disadvantageofnotautomaticallyrunningposthoctests.ThenewprocedurecanbeusedforSPSSStatisticsversions18and
above(i.e.,uptothecurrentversion22),butnotforolderversions(i.e.,version17andolder).However,weshowyouhowtocarry
outthenewprocedureinourenhancedKruskalWallisHtestguidebecauseithasthebenefitofautomaticallyrunningposthoc
tests,makingtheanalysisproceduremuchquickerandeasier.

ClickAnalyze>NonparametricTests>LegacyDialogs>KIndependentSamples...onthetopmenuasshownbelow:

PublishedwithwrittenpermissionfromSPSSStatistics,IBMCorporation.

Youwillbepresentedwiththe"TestsforSeveralIndependentSamples"dialoguebox,asshownbelow:

PublishedwithwrittenpermissionfromSPSSStatistics,IBMCorporation.

Note:The

KruskalWallisH checkboxinthe TestType

areashouldbeselectedbydefault,butifitisnot,makesureto

checkthisoption.ThisoptioninstructsSPSSStatisticstorunaKruskalWallisHtestonthevariablesyouaregoingto
transferinthenextstepofthisprocedure.

Transferthedependentvariable,
variable,

Pain_Score ,intothe TestVariableList: boxandtheindependent

Drug_Treatment_Group ,intothe GroupingVariable: box.Youcantransferthesevariablesbyeitherdraganddropping

eachvariableintotheappropriateboxesorbyhighlighting(i.e.,clickingon)eachvariableandusingtheappropriate

button.

Youwillendupwithascreensimilartotheonebelow:

PublishedwithwrittenpermissionfromSPSSStatistics,IBMCorporation.

Clickthe

button.Youwillbepresentedwiththe"SeveralIndependentSamples:DefineRange"dialoguebox,as

shownbelow:

Note:Ifthe
the
the

buttonisnotactive(i.e.,itlooksfadedlikethis,

),makesurethat

Drug_Treatment_Group variableishighlightedinyellow(asshownaboveinstep2)byclickingonit.Thiswillactivate

button.

Publishedwithwrittenpermissionfrom
SPSSStatistics,IBMCorporation.

Enter"1"intothe Minimum: boxand"3"intothe Maximum box.Thesevaluesrepresenttherangeofcodesyougavethegroupsof


theindependentvariable,

Drug_Treatment_Group (i.e.,DrugAwascoded"1"throughtoDrugCwhichwascoded"3").Youwill

endupwithascreensimilartobelow:

Publishedwithwrittenpermissionfrom
SPSSStatistics,IBMCorporation.

Note:Ifyouhadfourgroups(e.g.,DrugAthroughDrugD)andonlywantedtoanalyseDrugBthroughDrugD,youcould
enter"2"and"4"intothe Minimum: and Maximum boxes,respectively(assumingyouorderedthegroupsnumerically).

Clickthe

buttonandyouwillbereturnedtothe"TestsforSeveralIndependentSamples"dialoguebox,butnowwitha

completed GroupingVariable: box,ashighlightedbelow:

PublishedwithwrittenpermissionfromSPSSStatistics,IBMCorporation.

Clickthe
below:

button.Youwillbepresentedwiththe"SeveralIndependentSamples:Options"dialoguebox,asshown

Publishedwithwrittenpermissionfrom
SPSSStatistics,IBMCorporation.

Selectthe

Descriptive checkboxifyouwantdescriptivesand/orthe

youselectedthe

Quartiles checkboxifyouwantmediansandquartiles.If

Descriptives option,youwillbepresentedwiththefollowingscreen:

Publishedwithwrittenpermissionfrom
SPSSStatistics,IBMCorporation.

Clickthe

Clickthe

button.Youwillbereturnedtothe"TestsforSeveralIndependentSamples"dialoguebox.

button.Thiswillgeneratetheresults.

Jointhe1,000sofstudents,academicsandprofessionalswho
relyonLaerdStatistics.
TAKETHETOUR

PLANS&PRICING

SPSSStatistics

top^

SPSSStatisticsOutputfortheKruskalWallisHTest
Youwillbepresentedwiththefollowingoutput(assumingyoudidnotselectthe
Samples:Options"dialoguebox):

Descriptive checkboxinthe"SeveralIndependent

PublishedwithwrittenpermissionfromSPSSStatistics,IBM
Corporation.

Themeanrank(i.e.,the"MeanRank"columnintheRankstable)ofthe

Pain_Score foreachdrugtreatmentgroupcanbeusedto

comparetheeffectofthedifferentdrugtreatments.Whetherthesedrugtreatmentgroupshavedifferentpainscorescanbeassessed
usingtheTestStatisticstablewhichpresentstheresultoftheKruskalWallisHtest.Thatis,thechisquaredstatistic(the"ChiSquare"
row),thedegreesoffreedom(the"df"row)ofthetestandthestatisticalsignificanceofthetest(the"Asymp.Sig."row).

SPSSStatistics

top^

ReportingtheOutputoftheKruskalWallisHTest
Usingthedatafromthetwotablesabove,youcouldreporttheresultas:
General

AKruskalWallisHtestshowedthattherewasastatisticallysignificantdifferenceinpainscorebetweenthedifferent
drugtreatments,2(2)=8.520,p=0.014,withameanrankpainscoreof35.33forDrugA,34.83forDrugBand21.35
forDrugC.

InourenhancedKruskalWallisHtestguideweshowyouhowtorunaKruskalWallisHtestusingSPSSStatistics'newnonparametric
procedurewhichincludesaposthoctestsothatyoucandeterminewhereanydifferencesliebetweenyourgroups.Forexample,youcan
usetheposthoctesttodeterminewhetherpainscoreisstatisticallysignificantlydifferentbetweenDrugAandDrugB.Wealsoshowyou
howtowriteupyourresultsifyouneedtoreporttheseinadissertation/thesis,assignmentorresearchreport.Wedothisusingthe
HarvardandAPAstyles.Remember,thedistributionofyourdatawilldeterminewhetheryoucanreportdifferenceswithrespectto
medians.Inourenhancedguide,notonlydoweexplainhowtotestforthisassumption,butwealsoshowyouhowtointerpretandreport
theresultswhetheryoupassthisassumptionornot.Youcanlearnmoreaboutourenhancedcontenthere.

Você também pode gostar