104K - views

Title stata

com describe Describe data in memory or in 64257le Syntax Menu Description Options to describe data in memory Options to describe data in 64257le Remarks and examples Stored results References Also see S

Embed :
Pdf Download Link

Download Pdf - The PPT/PDF document "Title stata" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Title stata






Presentation on theme: "Title stata"— Presentation transcript:

2describe—Describedatainmemoryorinle DescriptiondescribeproducesasummaryofthedatasetinmemoryorofthedatastoredinaStata-formatdataset.Foracompactlistingofvariablenames,usedescribe,simple.Optionstodescribedatainmemorysimpledisplaysonlythevariablenamesinacompactformat.simplemaynotbecombinedwithotheroptions.shortsuppressesthespecicinformationforeachvariable.Onlythegeneralinformation(numberofobservations,numberofvariables,size,andsortorder)isdisplayed.fullnamesspeciesthatdescribedisplaythefullnamesofthevariables.Thedefaultistopresentanabbreviationwhenthevariablenameislongerthan15characters.describeusingalwaysshowsthefullnamesofthevariables,sofullnamesmaynotbespeciedwithdescribeusing.numbersspeciesthatdescribepresentthevariablenumberwiththevariablename.Ifnumbersisspecied,variablenamesareabbreviatedwhenthenameislongerthaneightcharacters.Thenumbersandfullnamesoptionsmaynotbespeciedtogether.numbersmaynotbespeciedwithdescribeusing.replaceandcleararealternativestotheoptionsabove.describeusuallyproducesawrittenreport,andtheoptionsabovespecifywhatthereportistocontain.Ifyouspecifyreplace,however,noreportisproduced;thedatainmemoryareinsteadreplacedwithdatacontainingtheinformationthatthereportwouldhavepresented.Eachobservationofthenewdatadescribesavariableintheoriginaldata;seedescribe,replacebelow.clearmaybespeciedonlywhenreplaceisspecied.clearspeciesthatthedatainmemorybeclearedandreplacedwiththedescriptioninformation,eveniftheoriginaldatahavenotbeensavedtodisk.Thefollowingoptionisavailablewithdescribebutisnotshowninthedialogbox:varlist,anoptionforprogrammers,speciesthat,inadditiontotheusualstoredresults,r(varlist)andr(sortlist)bestored,too.r(varlist)willcontainthenamesofthevariablesinthedataset.r(sortlist)willcontainthenamesofthevariablesbywhichthedataaresorted.Optionstodescribedatainleshortsuppressesthespecicinformationforeachvariable.Onlythegeneralinformation(numberofobservations,numberofvariables,size,andsortorder)isdisplayed.simpledisplaysonlythevariablenamesinacompactformat.simplemaynotbecombinedwithotheroptions. describe—Describedatainmemoryorinle5 Example3Ifwespecifytheshortoption,onlygeneralinformationaboutthedataispresented:.describe,shortContainsdatafromhttp://www.stata-press.com/data/r13/states.dtaobs:50Statedatavars:53Jan201315:17size:1,100Sortedby:region Ifwespecifyavarlist,onlythevariablesinthatvarlistaredescribed. Example4Let'schangedatasets.Thedescribevarlistcommandisparticularlyusefulwhencombinedwiththe`*'wildcardcharacter.Forinstance,wecandescribeallthevariableswhosenamesstartwithpopbytypingdescribepop*:.usehttp://www.stata-press.com/data/r13/census(1980Censusdatabystate).describepop*storagedisplayvaluevariablenametypeformatlabelvariablelabel poplong%12.0gcPopulationpoplt5long%12.0gcPop,5yearpop5_17long%12.0gcPop,5to17yearspop18plong%12.0gcPop,18andolderpop65plong%12.0gcPop,65andolderpopurbanlong%12.0gcUrbanpopulationWecandescribethevariablesstate,region,andpop18pbyspecifyingthem:.describestateregionpop18pstoragedisplayvaluevariablenametypeformatlabelvariablelabel statestr14%-14sStateregionint%-8.0gcenregCensusregionpop18plong%12.0gcPop,18andolder Typingdescribeusinglenamedescribesthedatastoredinlename.Ifanextensionisnotspecied,.dtaisassumed. describe—Describedatainmemoryorinle7 6.vallab,avariablecontainingthenameofthevaluelabelassociatedwiththeoriginalvariable,ifany.7.varlab,avariablecontainingthevariablelabeloftheoriginalvariable,suchas"MakeandModel","Price","Mileage(mpg)",:::.Inaddition,thedatacontainthefollowingcharacteristics: dta[d filename],thenameofthelecontainingtheoriginaldata. dta[d filedate],thedateandtimethelewaswritten. dta[d N],thenumberofobservationsintheoriginaldata. dta[d sortedby],thevariablesonwhichtheoriginaldataweresorted,ifany.Storedresultsdescribestoresthefollowinginr():Scalarsr(N)numberofobservationsr(k)numberofvariablesr(width)widthofdatasetr(changed)agindicatingdatahavechangedsincelastsavedMacrosr(varlist)variablesindataset(ifvarlistspecied)r(sortlist)variablesbywhichdataaresorted(ifvarlistspecied)describe,replacestoresnothinginr().ReferencesCox,N.J.1999.dm67:Numbersofmissingandpresentvalues.StataTechnicalBulletin49:7–8.ReprintedinStataTechnicalBulletinReprints,vol.9,pp.26–27.CollegeStation,TX:StataPress. .2001.dm67.1:Enhancementstonumbersofmissingandpresentvalues.StataTechnicalBulletin60:2–3.ReprintedinStataTechnicalBulletinReprints,vol.10,pp.7–9.CollegeStation,TX:StataPress. .2003.SoftwareUpdates:Numbersofpresentandmissingvalues.StataJournal3:449. .2005.SoftwareUpdates:Numbersofpresentandmissingvalues.StataJournal5:607.Gleason,J.R.1998.dm61:AtoolforexploringStatadatasets(WindowsandMacintoshonly).StataTechnicalBulletin45:2–5.ReprintedinStataTechnicalBulletinReprints,vol.8,pp.22–27.CollegeStation,TX:StataPress. .1999.dm61.1:Updatetovarxplor.StataTechnicalBulletin51:2.ReprintedinStataTechnicalBulletinReprints,vol.9,p.15.CollegeStation,TX:StataPress.