资源描述:
《An introduction to categorical data analysis Using R.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、AnIntroductiontoCategoricalDataAnalysisUsingRBrettPresnellMarch28,2000AbstractThisdocumentattemptstoreproducetheexamplesandsomeoftheexercisesinAnIntroductiontoCategor-icalDataAnalysis[1]usingtheRstatisticalprogrammingenvironment.Chapter0AboutThisDocumentThisdocumentattemptstorep
2、roducetheexamplesandsomeoftheexercisesinAnIntroductiontoCategori-calDataAnalysis[1]usingtheRstatisticalprogrammingenvironment.NumberingandtitlesofchapterswillfollowthatofAgresti’stext,soifaparticularexample/analysisisofinterest,itshouldnotbehardtofind,assumingthatitishere.SinceRi
3、sparticularlyversatile,thereareoftenanumberofdifferentwaystoaccomplishatask,andnaturallythisdocumentcanonlydemonstratealimitednumberofpossibilities.Thereaderisurgedtoexploreotherapproachesontheirown.Inthisregarditcanbeveryhelpfultoreadtheonlinedocumentationforthevariousfunctions
4、ofR,aswellasothertutorials.ThehelpfilesformanyoftheRfunctionsusedherearealsoincludedintheappendixforeasyreference,buttheonlinehelpsystemisdefinitelythepreferredwaytoaccessthisinformation.Itisalsoworthnotingthatasofthiswriting(early2000),Risstillverymuchunderdevelopment.Thusnewfunc
5、tionalityislikelytobecomeavailablethatmightbemoreconvenienttousethansomeoftheapproachestakenhere.OfcourseanyusercanalsowritetheirownRfunctionstoautomateanytask,sothepossibilitiesareendless.Donotbeintimidatedthough,forthisisreallythefunofusingRanditsbestfeature:youcanteachittodow
6、hateverisneede,insteadofbeingconstrainedonlytowhatis“builtin.”ANoteontheDatasetsOfteninthisdocumentIwillshowhowtoenterthedataintoRasaparttheexample.However,mostofthedatasetsareavaiablealreadyinRformatintheRpackageforthecourse,sta4504,availablefromthecoursewebsite.Afterinstalling
7、thelibraryonyourcomputerandstartingR,youcanlistthefunctionsanddatafilesavailableinthepackagebytyping>library(help=sta4504)>data(package=sta4504)YoucanmakethefilesinthepackagetoyourRsessionbytyping>library(sta4504)andyoucanreadoneofthepackage’sdatasetsintoyourRsessionsimplybytyping
8、,e.g.,>data(deathpen)1Chapter1Introduction1.3In