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

ECN 102: Analysis of Economic Data

Assignment 5: Due 5 p.m. 3/5

Winter 2023

No credit for late assignments.

Answer questions 1-4. Keep answers as brief as possible. Include key Stata output with answers. You must hand in your own work.

1. Use data in le ADVERTISING.DTA on Canvas. The data are for 200 regional markets in the U.S.

(a) Regress sales on tv .

(b) Predict population conditional mean sales for TV advertising expenditure of $100,000. (Note: Check the units of measurement using command describe).

(c) Provide a 95% confidence interval for this population conditional mean with TV adver- tising expenditure of $100,000.

[Hint: Use the formula for se(yCM ) given in the coursepack. You will need output se , n, and sx(2)  and can compute P(xi − )2  as sx(2) multiplied by n − 1, since sx(2) = n 1 P(xi −)2 ).]

(d) Provide a 95% confidence interval for actual sales with TV advertising expenditure of $100,000. [Hint: Use se(yf) = seq1+ + P)2 .]

(e) Give the following commands and save the resulting combined graph.

twoway (lfitci sales tv) (scatter sales tv), saving(graph1, replace)

twoway (lfitci sales tv, stdf) (scatter sales tv), saving(graph2,replace)

graph combine graph1 .gph graph2 .gph, iscale(1 .2) ysize(2 .5) xsize(6) rows(1) ycommon

What do you learn from the combined graph? Hint: give command help twoway lfitci

2. For each of the following estimated models provide the simplest possible explanation of the e↵ect of IQ (intelligent quotient has mean of 100) on EARNS (annual earnings in $). Hint: For models with logs use elasticities or semi-elasticities.

(a) EARNS = 1000 + 500 ⇥IQ.

(b) EARNS = 20000 + 200 ⇥IQ + 2 ⇥IQ2 .

(c) EARNS = -20000 + 50000⇥ln(IQ).

(d) EARNS = 45000 + 10000 ⇥d , where d = 1 if IQ>100 and d = 0 if IQ<100 . (e) ln(EARNS) = 10 + 0.010⇥IQ.

(f) ln(EARNS) = 5 + 0.90⇥ln(IQ).

(g) For the model in (c) give the marginal e↵ect at the mean if IQ=110.

3. Use data in le ADVERTISING.DTA on Canvas.

In answering the following it can be helpful (though not necessary) to use estimates store and estimates table to present model results side by side. Example:

regress y x

estimates store MODEL1

regress y z

estimates store MODEL2

regress y w

estimates store MODEL3

estimates table MODEL1 MODEL2 MODEL3, b se t p stat(N r2)

(a) Fit linear, linear-log, log-linear and log-log models for regression of sales on tv. (b) Which model, if any, do you prefer? Explain.

(c) Compute the average marginal e↵ect (AME) and the marginal e↵ect at the mean (MEM) for the linear-log model.

(d) Use command predict after the linear regression to predict sales from the linear model. Does the prediction on average equal sales on average?

(e) Use command predict after the log-linear regression to predict log-sales from the log- linear model. Then create a crude prediction of sales as follows.

predict plnsales, xb

generate psales = exp(plnsales)

Does the prediction on average equal sales on average?

(f) The notes suggest multiplying the preceding prediction by exp(se(2)/2) where se  is the standard error of the regression of lny on x. Does this lead to a better prediction? Explain.

(g) Plot the three di↵erent predictions from parts (d), (e) and (f) against tv on the same graph. Comment on these plots. Suppose the predictions are called p1, p2 and p3. Then the Stata commands (where c(l) uses the letter l as in lamp) to use are

sort tv

scatter p1 tv, c(l) | | scatter p2 tv, c(l) | | scatter p3 tv, c(l)

4. Use data in le ADVERTISING.DTA on Canvas.

(a) Obtain summary statistics for sales, tv, radio, and newspaper.

Are the data in the expected ranges? HINT: Use command describe to get variable descriptions.

(b) Test the claim that the population mean sales are less than 13000 at level 0.05. (Use command ttest sales=13000).

(c) Give command graph matrix sales tv radio newspaper, half

Which variable(s) do you think will be important explanators of sales?

(d) Give command correlate sales tv radio newspaper

Which variables are most highly correlated with sales? Are there any surprises?

(e) Give command regress sales tv radio newspaper

Which variables are statistically significant (two-sided test at 5%)? Use the individual p-values.

(f) State which, if any, of the regressors do not have the sign you expect a priori, and give an explanation for why you expected a di↵erent sign.