Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Econometrics I

Problem Set 1 – Introduction to Stata


EXERCISE 1

We have downloaded the microdata file of the Encuesta de Estructura Salarial of 2014
from the Instituto Nacional de Estadística website: www.ine.es. You can find this datafile
in Aula Global under the name EES_2014.dta. In Aula Global there is also an Excel file
that describes the variables (Description EES_2014).

With this data, do the following exercises using Stata:


a. Open a log file.
b. Open the dataset EES_2014.dta
c. Open the Data Browser.
d. Sort out the database by the variables ordencc and ordentra.
e. Describe the data, and obtain the mean and standard deviation of the variables
salbase, anoanti, extraorm.
f. Use the command tabstat to generate a table of descriptive statistics for the
variable salbruto which contains the following information:
• Minimum value
• Median
• Mean
• Maximum value
• Number of observations
• Coefficient of variation
g. Generate a similar table, but this time only for the observations that correspond to
the females in the sample. Then, destring (convert to numeric) the gender variable
and redo the table.
h. Obtain a frequency table for the variables sexo and control.
i. Generate a variable (sal_tot) being the sum of base salary (salbase), extraordinary
payments (extraorm), extra payment per hour (phextra) and other complements
(comsaltt).
j. Generate a variable for the seniority of the worker in months (antig) based on the
variables anoanti and mesanti.
k. Close the log file.
l. View your log file.
Hint: Save all your commands in a do file, so you can reproduce the whole code later.

You might also like