how to graph[1] - wesleyan university · once you have completed all changes, right click on the...
TRANSCRIPT
1
HowtoGraphinMicrosoftExcel2007QAC201
SimpleGraphing:Categorical‐by‐Categorical&Categorical‐by‐Continuous
1) InRow1,typethelabelsforyourindependentvariable;inColumnA,typethelabelsforthevariableyouwanttoplaceonthex‐axisExampleIamexaminingtherelationshipbetweengenderandheightduringadolescence.OnthexaxisIwillplacemyindependentvariablegender,andonthexaxisIwillplacetheages13through19.
Note:BoxA1shouldnotbefilledin.Note:Yourdependentvariablewillberepresentedonthey‐axiswhenthegraphiscreated.
2)Undertheselabels,typetheinformationyouwanttographintotheappropriateboxes.
ExampleAtage13,theaverageheightaccordingtomydatais63inchesformalesand61inchesforfemales.Iwillthereforewanttoputthevalue63inboxB2andthevalue61inboxC2.Thiswillbedoneforallmydatapoints.
2
3)Highlightthedataforthegraphbyclickinganddraggingyourmouseacrossthedatainthespreadsheet.4)Clickonthe“Insert”tabatthetopofthescreen.OntheInsertribbon,select“Charts”.Atabwiththedifferentgraphtypeswillappearatthetopofthescreen.
5)Selectthegraphtypethatwillmosteffectivelyrepresentyourdataset.Anewmenuofonlythatgraphtypewillappearforyoutoselectfrom.
ExampleIwanttorepresenttherelationshipbetweengenderandheightduringadolescencethroughalinegraph.Ipreferthefirstlinegraph,andselectit.Note:Somegraphsstackinformation.Becarefultoselectonlygraphtypesthatappropriatelydisplayyourinformation.
6)Excelwillthenmakeagraphdisplayingthedatayouprovidedinthespreadsheet.
Mostcommongraphtypes
3
7)Graphtitles,axistitles,etc.canbeadjustedusing“Toolbox”inaMaccomputerorthe“Design”tabonaPC.8)Color,size,gradient,etc.canbeeditedbyrightclickingonthegraphandselecting“Format”.9)Onceyouhavecompletedallchanges,rightclickonthegraphandselect“SaveasPicture”.SimpleGraphing:Continuous‐by‐Continuous1)InColumnA,typethelabelforyourindependentvariable,whichwillappearonthex‐axis;inColumnB,typethelabelforyourdependentvariable,whichwillappearonthey‐axis.
ExampleIamexaminingwhethermajordepressioniscorrelatedwithhighcigarettesmoking,andwillbeusingacontinuousmeasurefordepressionasmyindependentvariableandrecordedcigarettesmokingfrequencyasmydependentvariable.Therefore,Iwillwrite“DepressionScore”inboxA1and“SmokingFrequency”inA2.
2)BeginningwithRow2,eachrowwillrepresentanewindividual.Typeintheappropriatecolumninformationforanindividualintoeachrow.
ExampleMyfirstindividualhadadepressionscoreof15andsmoked22cigarettestheweekhewasinterviewed.Therefore,Iwilltypethevalue15intoA2and22intoB2.Thiswillbedoneforeachindividualintheset.
4
Note:Ifyouhavealargedataset,itisbesttocopyandpastethevaluesdirectlyoffyourdataanalysisprogram.Oneachprogram:
3)FollowSteps3–9fromabove.AtStep4,makesureyouselectedthe“XY(Scatter)”graphtype.
SPSS On the “data editor” screen, right click on the variable name to highlight the entire column, then select copy; paste into Excel
Stata browse IV DV; right click on the variable name to highlight the entire column, then select copy; paste into Excel
SAS Go to your library and then right-click on the icon of the SAS datafile and select “View in Excel”. You can reduce the data set to the two variables you need by right-clicking on the columns you don’t need and selecting “delete”.
R > var.graph <- cbind(dataset$IV, dataset$DV) > write.table(file=”P:[link to your name within the QAC course]\File.Name”, sep=”\t”, row.names=F) In excel, select “Open” and make sure “all files” is selected from drop down menu and open “File.Name”.
5
OtherImportantNotesAddingErrorBarsAtypicaluseforerrorbarsistoshowvariabilityinthemeasuresthatareplottedinacolumn/bargraph. 1)Createyourcolumnorbargraphusingtheabovesteps.2)Oncethegraphhasbeencreated,moveyourcursortooneofthebarsandleftclick.Allthebarsofthatcolorshouldnowbehighlighted.3)Bydoubleclickingononeofthehighlightedbars,an“Edit”dropdownmenuwillappear.4)SelecttheErrorBarstabintheEditmenu.5)Selectthepreferreddisplayorerroramount.
Note:Thiswillneedtobeperformedforeverydifferentcolorbar.AddingaBestFitLineBestfitlinesareusedtoestimatethedirectionalityanddegreeoftherelationshipbetweentwoquantitativevariablesrepresentedinascatterplot.
1) Createascatterplotusingtheabovesteps.2) Oncethegraphhasbeencreated,moveyourcursortoanydatapointandleftclick.
Allthepointsshouldnowbehighlighted.3) Rightclickononeofthehighlighteddotsandselect“AddTrendline”
6