Lets assume that you haven't changed your 'ancillary files' directory and that your Stata current. I have a question regarding the ancillary files of xsmle. These files contain informations on public capital productivity in 48 US states observed over 17 years, as well as the spatial weights matrix for the US states (Munnel, 1990). For the ancillary file brcacurves, make the following changes: 1) remove the Winjunk ac217mvrs from the use statement 2) replace the 'meanzero f., replace' line with center f. (if you do not have Ben Jann's -center-, ssc install center) 3) change the names of. Jan 18, 2018 Maurizio Pisati, 2007. 'SPMAP: Stata module to visualize spatial data,' Statistical Software Components S456812, Boston College Department of Economics, revised 18 Jan 2018.
In Stata, the very first step of analyzing a dataset should be opening the dataset in Stata so that it knows which file you are going to work with. Yes, you can simply double click on a Stata data file that ends in .dta to open it, or you can do something fancier to achieve the same goal – like write some codes. Okay, there is at least one more reason than being fancier that makes me prefer to write syntax than clicking through things in Stata – I like to have everything I did recorded so that I can easily reproduce the same work or use the scripts again when working on similar tasks next time. In this post, I introduce ways of reading in, using and saving Stata and other formats of data files.
-sysuse-: reading in datasets come with Stata
Several example datasets are installed with Stata. Test anxiety inventory spielberger pdf free. This command reads in one of them, census.dta, to memory. You should be able to see the data in your Stata Data Browser after running this following line.
-describe-: the information of the dataset in memory
Tip: run “set more off” to tell Stata to pause for -more- messages
-summarize-: summary statistics
-clear-: wipe out the data in memory
-use-: read in Stata datasets
Most of the time, we use datasets that are either stored on our machine or on the web. Simply use the -use- command to read in the data file to memory.
-cd-: change directory
R Open Stata File
Now let’s save this dataset on the web to your machine. You can use the -cd- command to tell Stata where to save this file.
-save-: save files
-dir-: display file names
-insheet- and -outsheet-: import and export .csv files
Oftentimes we work with Stata and other software for the same project. In that case we need to import data files that are not in a Stata format or export Stata data files to other formats. Here is an example of how to save datasets as .csv files and read them into Stata.
View the entire collection of UVA Library StatLab articles.
Yun Tai
CLIR Postdoctoral Fellow
University of Virginia Library
CLIR Postdoctoral Fellow
University of Virginia Library
Corrections
All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:bocode:s435901. See general information about how to correct material in RePEc.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F Baum). General contact details of provider: http://edirc.repec.org/data/debocus.html .
If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.
We have no references for this item. You can help adding them by using this form .
If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the 'citations' tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.
Stata
Please note that corrections may take a couple of weeks to filter through the various RePEc services.