Instructions for creating a new dataset in Stata

Step 1: Open Stata

For this example, we use the following research question: How do regime type and population size influence economic performance in Sub-Saharan Africa? Data for these variables were taken from Freedom House (freedomhouse.org) and the World Bank (data.worldbank.org). Regime type is measured by Freedom House on a scale from 0 to 100, with 0 representing no democracy and 100 representing full democracy. Population size is taken from the World Bank (in real numbers).  Economic performance, measured as GDP per capita per annum, is also taken from the World Bank.

Step 2: After opening Stata, select “Data” located on the top of the screen, then “Data Editor,” then “Data Editor (Edit).

This will open a blank spreadsheet, as seen below.

Step 3: Create new variables

You can begin creating variables by entering in the data in the top left corner. In this example, you can see that only three countries have been added. Your dataset will clearly have more observations, depending on your research population.

Now you need to label this variable. To do this, find Variables under Properties (in the center right of the screen). Click on ‘var1’ and use your backspace key to remove ‘var1’ and then change its name to “Country.” You will now see that var1 has been changed to Country at the top of the screen.

You can now create the variable names for the variables you will populate with data. For this example, new variables for the level of democracy “Democracy,” population size “Population” and economic performance “GDP per capita” were created.

To do this, begin to enter the data for “Democracy.” As soon as you type in the Democracy score for the first country (Angola), you will see that ‘var2’ is created. Now continue to enter the data for all the countries. Use caution as you enter the data so that you do not make mistakes by entering incorrect values and be sure to check your work.

To change ‘var2’ to “Democracy,” simply click on ‘var2’ under Properties, use the backspace key to delete the characters for ‘var2,’ and then type in the new name “Democracy.”

Repeat the same steps for the remaining variables to complete the dataset as seen below. Keep in mind that these instructions include data from only three countries, but you should ensure you have enough observations to conduct your analysis. Generally, as mentioned in the text, you should include at least 10 observations for every independent variable. That means, for an example like this one, you should include at least 20 Sub-Saharan countries. However, the best choice would be to include all possible observations for your research population; there are 46 countries for example in Sub-Saharan Africa.

Step 4: Save your dataset

Once you have completed entering the data into your dataset, be sure to save your dataset. At the top, select File, then Save as. Give your file a name and save it to your computer.

Once these steps are complete (and your dataset is populated with data), you can perform quantitative analysis exactly as you did with the data from the Dataprac. First perform descriptive statistics on your variables, and then conduct bivariate and multivariate data analysis.

Back to top