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

Economics 102: Analysis of Economic Data Fall 2022

1.  Cross-section Data Example and manually read in data

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

(a) Read the data into Stata. There are several ways to do this.

(1) Use command input. In the command line give a series of commands:

input  docvis

3

1

3

 

end

or (2) Create a .csv Öle and then File / Import / Text data ....

or in the command line give command import  delimited  . . ..

or (3) Use the Stata data editor accessed by Data / Data Editor

(b) Obtain summary statistics from Statistics menu or more simply give command summarize.

(c) Give the inter-quartile range (this requires the detail option of the command summarize). So summarize,  detail

(d) List the Örst Öve observations using Stata command list  in  1/5

(e) Obtain a table of frequencies for these data using Statistics / Summaries, tables and tests / Frequency tables / One-way table.

What simple Stata command would provide this?

(f) Obtain a histogram using Graphics / Histogram and choosing the Data are discrete option to have a bin width of one for these discrete data.

What simple Stata command would provide this?

Do the data appear to be normally distributed?

(g) Obtain a smoothed histogram using Graphics / Smoothing and Densities / Kernel density estimation and within this select variable docvis

What simple Stata command would provide this?

2.  Cross-section Data Example and read in data from a Stata .dta Öle           The data set ass1_wages.dta (posted at Canvas / Files / Homeworks) contains data.

Note: In Canvas when you select ass1_wages.dta then choose download. (a) Read the data into Stata using command use.

(b) Obtain a description of the variables using command describe.

(c) Obtain summary statistics for the hourly wage, using the detail option.

Given the results does the hourly wage appear to be normally distributed?

(d) Obtain a box plot for the hourly wage, using the graph box command.

Does there appear to be outlying observations?

(e) Obtain a histogram of the hourly wage.

Do the data appear to be normally distributed?

(f) Generate a variable for the natural logarithm of the hourly wage.

(g) Obtain summary statistics for the natural logarithm of the hourly wage, using the detail option.

Given the results do the data appear to be normally distributed.

(h) Obtain a smoothed histogram of the natural logarithm of hourly wage using the kdensity command. Do the data appear to be normally distributed?

3.  Summary Statistics

(a) Obtain x 3i  for the following cases with n = 3:  (1) 3i  = 5.  (2) 3i  = i.  (3) 3i  = 2i3 .  (4) 3i  = 2/i.

(b) Compute from Örst principles (i.e.  using the formula and a calculator) the mean, standard deviation, and coe¢ cient of variation for the sample 5, 7, 2, 10. Show all calculations.

(c) The heights of U.S. males have a mean of 69 inches, a standard deviation of 3 inches and are approximately normally distributed.  What range of heights do you expect 95% of U.S. males to lie in?

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) Data on regular unleaded gasoline prices on September 15 2022 for a sample of 18 gas stations. (b) Monthly data on the consumer price index from begin 2001 to end 2021.

 

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.