Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECON 129

Homework 1

It is best to use Stata in the following way:

1. Download any data files into your working directory.

2. Start Stata and change the directory to your working directory using the File menu and then Change Working Directory or command cd.

3. Create a log file that saves results from the session. For example, if it is homework1_results.txt type Stata command log using homework1_results.log, replace (The replace means that any previous file named homework1_results.log will be overwritten).

4. Read in the data. For a Stata dataset this is the use command. For other formats it is often the import command - for details help import. If typing data in use command input. Examples: use xyz.dta, clear and import delimited using xyz.csv, comma.

5. Once data is read in if it was not a Stata dataset then save it as a Stata dataset.

6. When you leave Stata give the command log close to save the log file.

1.   The Stata dataset AED_PRICEEARNINGS.DTA at has annual data on the price-earnings ratio (variable

pe) for S&P500 firms (in real terms) from 1881 to 2012.

a)    Read the data into Stata using the use command.

b)    List the first five observations, using Stata command list in 1/5.

2.    Current values (in $ millions) of 32 NFL teams, as well as the percentage changes in values from 2010 to 2011, debt-to-value ratios, annual revenues, and operating incomes are saved in NFL.txt.

c)    Read the data into Stata using import delimited command

d)    List rank, team and revenue for the teams with annual revenues between $300 and $400 million.

3.    A sample of 20 people aged 30 had the following number of annual doctor visits: 0, 0, 3, 4, 2, 5, 5, 2, 11, 2, 1, 2, 3, 0, 8, 0, 8, 1, 1, 4

1.    Read the data into Stata using the input command.

2.    List the last five observations, using Stata command list in -5/l.

4.   Types of Economic Data

For each of the following examples state whether the data are numerical or categorical, and state whether the data are cross-section, time series or panel data.

(a) Quarterly data on the level of U.S. new housing construction from 2000 to 2012.

(b) Data on number of doctor visits in 2012 for a sample of 192 individuals.

(c) Data on annual health expenditures for each U.S. state from 2000 to 2012.

(d) Data on usual mode of transportation used to commute to work for a sample of 151 individuals.

5.   Types of Economic Data

For each of the following state whether the data are observational or experimental

(a) Data on earnings for individuals some of whom chose to participate in a training program and some who did not.

(b) Data on earnings for individuals some of whom were randomly assigned to a training program and some who were not.

(c) Data on school outcomes for charter schools and for traditional schools.