How to import data into STATA?
STATA comes with a set of sample data files. This helps the learner in understanding how different set of tests can be applied to single data. For the purpose of understanding this module I will be using auto.dta and will be applying some tests to this data. However, importing data from MS excel to STATA is important.
Selecting example datasets
In order to select example datasets, click on File and scroll down to example datasets. Click on “Example Datasets…”. A new window will open. There will be two options:
- Example Datasets installed with STATA
- STATA Manual Datasets
While option 1 provides different datasets in STATA, that were installed as default with the software. On the other hand, option 2 will enable to have web access all the datasets which have been computed using STATA.
To full fill the purpose of this article select option 1. After which a new page will open that enlists different datasets. For every dataset you can use 2 options, i.e. use or describe. When you Click “Describe”, it will give you the description of dataset variables in Output window and when you click “Use” it will reflect all the variables in Variable window.
Importing data to Data Editor
Since we have selected an Example Dataset, the data for each variable is automatically transferred to data editor window (see below):
If the data is stored in excel, then import the data to STATA by copying the data from MS Excel into the Data Editor. In order to do so, click on the Data Editor icon on the bar as shown below:
While pasting the data in the data editor window, it will give you two options:
- Treat first row as data
- Treat first row as variable names
In cases where there are variable names we will select Option 2 so that the variables names are added on the top row. The Data Editor like MS excel allows the analyst to make changes in the responses if and when needed.
I am a management graduate with specialisation in Marketing and Finance. I have over 12 years' experience in research and analysis. This includes fundamental and applied research in the domains of management and social sciences. I am well versed with academic research principles. Over the years i have developed a mastery in different types of data analysis on different applications like SPSS, Amos, and NVIVO. My expertise lies in inferring the findings and creating actionable strategies based on them.
Over the past decade I have also built a profile as a researcher on Project Guru's Knowledge Tank division. I have penned over 200 articles that have earned me 400+ citations so far. My Google Scholar profile can be accessed here.
I now consult university faculty through Faculty Development Programs (FDPs) on the latest developments in the field of research. I also guide individual researchers on how they can commercialise their inventions or research findings. Other developments im actively involved in at Project Guru include strengthening the "Publish" division as a bridge between industry and academia by bringing together experienced research persons, learners, and practitioners to collaboratively work on a common goal.
Discuss