欢迎来到天天文库
浏览记录
ID:34842603
大小:5.24 MB
页数:208页
时间:2019-03-12
《A Modern Approach to Regression with R-SASPrimerChapters1to8.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、CharlesLindsey&ElizabethYoungAModernApproachtoRegressionwithRSASPrimerJune8,20091.Introduction1.1BuildingValidModelsSASworkswiththreetypesofcommands,orstepsastheSASliteraturecallsthem:data,proc,andoption.DatastepsreaddataintoSASandperformelementaryoperationsonth
2、edata.Procstepsperformmoresophisticatedoperationsonthedata,includingstatisticalanalysis.OptionstepssetattributesoftheSASsession,suchasthenumberofcolumnsusedforoutputandthedefaultcolorofpointsingraphics.Thedataandprocstepsaremadeupofcomponentstatements.Thesestate
3、mentsaresimilartotheonelinecommandsinStata.Wemayviewthedataandprocstepsasbatchesofstatements.TheSASliteraturereferstotheoptionsstepsasstatementsaswell,sincetheireffectsareatomicandstraightforward.IntheStataprimerwefocusedonexplainingindividualstatements.Duetothe
4、setupoftheSASlanguage,wewilldiscussourprogramsintermsofdataandprocstepsandoptionsstatements.Weshouldbeconsistentlythorough,butsomebrevitymayberequiredforreadability.Wenotethatourgraphicsareformulatedusingthe“charactercell”unit.ThisisthepixelsizethatSASprovidesfo
5、rdrawingasinglecharacter.ItisdependentonthepixelsizeoftheSASwindow.InrenderingthegraphicswegenerallyhaveSASmaximizedina1024x768screenresolutionenvironment.Ingeneral,thesizeofelementsofourgraphicswillvarydependingonwhetherthewindowismaximizedandwhattheoverallscre
6、enresolutionis.Sodependingonyourdesktopenvironment,yourgraphicsmayappeardifferent.Youcanexperimentwiththe“h=”optionspecificationintheaxisstatementsandothersizespecificationstomakethegraphicsvisuallyclearinyourenvironment.ThereareotherwaystoformulategraphicsinSAS
7、thanthe“charactercell”,butthe“charactercell”formulationisthedefault.Forsimplicitywewillstickwithitsuse.ItshouldalsobenotedthattheseprogramswerecreatedunderSASversion9.2.TheymayprovidedifferentresultsunderearlierorlaterversionsofSAS.1.2MotivatingExamplesWebeginwi
8、ththefootballexamplethatgivesusfigure1.1.Firstwereadinthedatawiththeprocstepimport.ThissavesthedataintheSASdatasetmyfootb.Thenamesofthedataareobtainedbythegetnamessta
此文档下载收益归作者所有