资源描述:
《PROC TABULATEÒ and the Neat Things You Can Do With It》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、SASGlobalForum2008ReportingandInformationVisualizationPaper264-2008PROCTABULATEandtheNeatThingsYouCanDoWithItWendiL.Wright,CTB/McGraw-Hill,Harrisburg,PAABSTRACTThispaperstartswithanintroductiontoPROCTABULATE.Itlooksatthebasicsyntax,andthenbuildsonthissyntaxbyusingexamplesonhowt
2、oproduceone-,two-,andthree-dimensionaltablesusingtheTABLEstatement.Someoftheexamplescoverhowtochoosestatisticsforthetable,labelingvariablesandstatistics,howtoaddtotalsandsubtotals,workingwithpercentsandmissingdata,andhowtocleanupthetable.Thepresentationthenshowsseveralexamplesusing
3、theODSSTYLE=optioninPROCTABULATEtocustomizetablesandimprovetheirattractiveness.Thisoptionisversatileand,dependingonwheretheoptionisused,hastheabilitytojustifycellsorrowandcolumnheadings,changecolorsforboththeforegroundandbackgroundofthetable,modifyborders,addaflyovertextboxinODSHTM
4、L,oraddGIFfigurestotheroworcolumnheadings.INTRODUCTIONPROCTABULATEisaprocedurethatdisplaysdescriptivestatisticsintabularformat.Itcomputesmanystatisticsthatotherprocedurescompute,suchasMEANS,FREQ,andREPORTanddisplaysthesestatisticsinatableformat.TABULATEwillproducetablesinuptothreed
5、imensionsandallows,withineachdimension,multiplevariablestobereportedoneafteranotherhierarchically.Therearealsosomeverynicemechanismsthatcanbeusedtolabelandformatthevariablesandthestatisticsproduced.BASICSYNTAXPROCTABULATE;CLASSvariables;VARvariables;TAB
6、LE,,column;…otherstatements…;RUN;Let’stakealookatthebasicsyntaxofthePROCTABULATEProcedure.WewillstartwiththreeofthestatementsthatyoucanuseinPROCTABULATE,CLASS,VAR,andTABLE.Asyoucanseeeachofthesestatements,aswellasthePROCTABULATEstatementitselfallowsoptionstobea
7、dded.Foreachofthestatements,theoptionsneedtobeprecededwitha‘/’.NotetwodifferencesinthesyntaxfromanyotherProcedureinSAS®.One,thevariablesinallthreestatementscannotbeseparatedbycommas.Andtwo,thecommasinthetablestatementaretreatedinaspecialwayandmeanachangeindimension.1SASGlobalForum2
8、008ReportingandInformation