University of Victoria Department of Economics ECON 457 Computational Economics Spring Term 2018/19
Instructor:
Marco Cozzi
Take Home Exam1
April 13th 2019
Due: on April 15th 2019 before 1.30pm, in the ECON 457 Drop Box, 3rd Floor BEC.
Instructions:
• The exam consists of two questions: you have to answer both, using Python codes.
• The total number of marks is 100. Question 1 is worth 40 marks, while Question 2 is worth 60 marks.
• Include your name and student number on the front page of your answers.
• Answer clearly and concisely. Devote some time to give the graphs, plots and tables a format easy to understand. Also the way you present your answers matters for the final grade.
• Since the https://uvic.syzygy.ca/ web interface can be unreliable when several users are trying to access it at the same time, please try not to use it. Use a version of Python installed on your computer or in a computer lab.
• Please print your answers and submit them before the deadline. You must also submit the print-outs of the codes you have used to generate your results (together with this page, dated and signed).
• Tables and graphs must be printed, clearly labeled and referenced in the text.
• No late, group, or electronic (e.g., by email) submissions will be accepted.
• This is an exam, so neither myself nor Sheri will provide suggestions on how to solve the questions, or preliminary feedback on the quality of your answers.
• You are asked to work by yourselves on each question. UVic’s rules about cheating and plagiarism apply also to this exam. Please date and sign the bottom of this page as an acknowledgment of understanding and observing the exam rules.
• On April 15th, starting from 2.00pm, each student will have five minutes to explain their answers to Ms. Sheri Liu and Prof. Graham Voss. For privacy considerations, and not to give any students an advantage, these meetings will take place in office BEC 371. Please refer to the schedule attached to this document to know when you should go to BEC 371 (do not be late).
• The scheduled exam room, DTB A120, will not be used. You will submit your answers in the ECON 457 Drop Box by 1.30pm, and go to BEC 371 at the appropriate time.
Date
Name
Student Number Signature
1The material contained in this document is copyrighted ⃝c , property of the University of Victoria, meant exclusively for the use of students enrolled in ECON 457, and it cannot be shared without the author’s explicit consent.
Computational Economics ECON 457 – A01
Page 1 of 5
Question 1: Ordinary Least Squares and Instrumental Variables (40 Marks)
Consider the classical linear econometric model. We analyze some properties of the Ordinary Least Squares (OLS) and Instrumental Variables (IV) estimators. We will rely on Monte Carlo simulation methods. In terms of notation, the index i = 1, …, I denotes the units of observation in our (simulated) cross-sectional sample, and I is the sample size. As the initial seed number, use your date of birth (e.g., if you were born on April the 13th, use the number 13 as the seed).
(a) Set the sample size to I = 10,000. First consider the explanatory variable (xi). Generate it by drawing I independent observations from the standard normal distribution. Now consider the dependent variable (yi). For every data point, you are asked to generate it using the following model, setting the true parametervaluestoβ0 =0,β1 =1andσε2 =2:
yi =β0 +β1xi +εi, εi ∼N(0,σε2) where the errors εi are drawn from the normal distribution.
(a.1) Compute the OLS estimates βˆOLS and βˆOLS. Comment. You can find the relevant formulas here: 01
https://en.wikipedia.org/wiki/Simple linear regression
(a.2) Now reset the seed to its original value, and set the sample size to I = 100. Create 100 different datasets, generating the values for xi and yi using the same procedure as above. Use a for-loop and set the seed to seed=seed+itr, where itr stands for the iteration number. On each sample, compute the 100 OLS estimates βˆOLS and βˆOLS and plot them with two histograms. Comment.
(a.3) Now we move to analyze an IV estimator. Reset the seed to its original value and generate three sets of I = 10,000 independent error terms, denoting them as η1, η2 and η3. These shocks are drawn from independent normal distributions N (0, ση2 = 2).
Consider the explanatory variable (xi), and generate it as xi = β2η1,i + η2,i, with β2 = 1. Now consider an instrumental variable (zi), and generate it as zi = β3η2,i + η3,i, with β3 = 1.
To conclude with, generate the dependent variable (yi), using the following model and setting the true parameter values to β0 = 0, β1 = 1:
yi = β0 + β1xi + η1,i
Compute both the OLS estimate βˆOLS and the IV (2SLS) estimate βˆIV . To get the latter, first apply
the OLS formula to the model:
xi = γ0 + γ1zi + νi
Then, compute the predicted values xˆi = γˆ0 + γˆ1zi. Finally, apply the OLS formula to the model:
y i = β 0 + β 1 xˆ i + u i
Comment.
(a.4) Now reset the seed to its original value, and set the sample size to I = 100. Create 100 different
datasets, generating the values for xi, zi and yi using the same procedure as in part (a.3). Use a for-loop
and set the seed to seed=seed+itr, where itr stands for the iteration number. On each sample, compute
the 100 OLS estimates βˆOLS and the 100 IV estimates βˆIV . Plot them with two histograms and comment. 01
(a.5) Redo parts (a.3) and (a.4) when β3 = 0.1. Redo parts (a.3) and (a.4) when β3 = 0. Comment.
.
01
11
Page 2 of 5
Computational Economics ECON 457 – A01
(b) Now consider a multivariate case with two explanatory variables and two instruments.
Generate five sets of I = 10, 000 independent error terms, denoting them as η1, η2, η3, η4 and η5. These shocks are drawn from independent normal distributions N (0, ση2 = 2).
Consider the two explanatory variables (x1,i, x2,i). Generate the first one as x1,i = β3η1,i + η2,i, with β3 = 1. Generate the second one as x2,i = β4η1,i + η3,i, with β4 = −1.
Now consider two instrumental variables (z1,i, z2,i). Generate the first one as z1,i = β5η2,i + η4,i, with β5 = 1. Generate the second one as z2,i = β6η3,i + η5,i, with β6 = 1.
To conclude with, generate the dependent variable (yi), using the following model and setting the true parameter values to β0 = 0, β1 = 1, β2 = −1:
yi = β0 + β1×1,i + β2×2,i + η1,i
(b.1) Get both the OLS estimates and the IV estimates. For this part, you must use the matrix formula- tion of the model, and obtain the vectors βˆOLS and βˆIV with matrix operations on the matrices X, Z, and the vector y. The columns of the matrix X consists of the constant, the variable x1, and the variable x2. The columns of the matrix Z consists of the constant, the variable z1, and the variable z2.
Compute the OLS estimates βˆOLS, βˆOLS and βˆOLS as: 012
Comment.
(b.2) Now reset the seed to its original value, and set the sample size to I = 100. Create 100 different datasets, generating the values for x1, x2, z1, z2 and y using the same procedure as above. Use a for-loop and set the seed to seed=seed+itr, where itr stands for the iteration number. On each sample, compute the 100 OLS estimates βˆOLS and the 100 IV estimates βˆIV and plot them with histograms. Comment.
(b.3) Redo part (b.2) when β5 = 1 and β6 = 0.01, and when β5 = 0.01 and β6 = 1. Comment. (b.4) Redo part (b.2) when β5 = 0 and β6 = 0. Comment.
βˆOLS = (X′X)−1 X′y Compute the IV estimates βˆIV , βˆIV and βˆIV as:
012
βˆIV = (Z′X)−1 Z′y
Page 3 of 5
Computational Economics ECON 457 – A01
Question 2: Optimal Taxation Policies (60 Marks)
In this question, we want to study the optimal mix of labor income taxes (Tl) and corporate taxes (Tf ), in a situation where the tax revenues are used to finance total government expenditure (G). The government runs a balanced budget, namely:
G = Tl + Tf
Total government expenditure consists of public investment (I), which is exogenous and constant, and subsidies (S), which are variable and depend on the economy’s outcomes, with G = I + S. In order to balance the budget, a proportional tax rate (τl) is imposed on workers’ income and a proportional tax rate (τf ) is imposed on corporate income.
In the economy, there are L identical potential workers. The unemployed individuals, if any, do not pay taxes and do not produce any output. The employed ones they all earn the same wage (w), and their after-tax income is:
(1 − τl)w
Firms maximize their profits (π) and rely on one input, labor (l), to produce a homogeneous good (y). All firms have access to the same technology, a decreasing return to scale production function (with parameter 0 < φ < 1), but they differ in their productivity, captured by the variable a:
y = alφ
Productivity is assumed to be log-normally distributed across firms, with probability density function f(a) and parameters μa and σa2: a ∼ LN(μa,σa2). The price of the final good is normalized to 1. It follows that total pre-tax revenues (R(a)), net of labor costs, are:
R(a) = alφ − wl
The government subsidizes job creation, giving each firm a proportional subsidy (s) per employed worker. Total profits for a firm (π(a)), inclusive of the government interventions (corporate taxes and labor subsidies), are:
π(a)=(1−τf)R+sl=(1−τf)(alφ −wl)+sl
(a)Forthispartofthequestionassumethatφ=0.6,τf =0.4,τl =0.2,s=0.1,w=1,μa =0and σa2 = 2. Notice also that here the government does not run a balanced budget and L is to be interpreted as a large number that is not binding.
Solve the problem of the firm and obtain the labor demand functions at the level of the individual firm (l(a)). Calculate total output (Y ), which is defined as follows:
∞ ∞
Y = y(a)f(a)da = a[l(a)]φf(a)da
00
Explain how you implemented this computation.
Now compute total output using different parameter values. In one case they are:
In another case they are:
In a final case they are:
φ=0.7,τf =0.4,τl =0.2,s=0.1,w=1,μa =0,σa2 =2. φ=0.6,τf =0.6,τl =0.2,s=0.1,w=1,μa =0,σa2 =2.
φ=0.6,τf =0.6,τl =0.2,s=0.1,w=2,μa =0,σa2 =2. Page 4 of 5
Computational Economics ECON 457 - A01
Report your results in a table and comment on your findings, stressing the economic channels at play.
(b)Forthispartofthequestionassumethatφ=0.6,τf =0.4,s=0.1,I=10,w=1,μa =0and σa2 = 2. Notice that here L is to be interpreted as a large number that is not binding, namely L ≥ ld, where ld is total labor demand.
Find the labor income tax rate τl that allows the government to run a balanced budget. Explain how you implemented this computation and which numerical methods you have used.
(c) From now on, assume that labor supply (ls) is flexible and represented by the following schedule: lε
Assumethatφ=0.6,τf =0.4,τl =0.2,s=0.1,I=10,ε=0.5,μa =0andσa2 =2. Noticealsothat for this part of the question the government does not run a balanced budget, and L is to be interpreted as a large number that is not binding, namely L ≥ ls.
Find the wage w that clears the labor market. Explain how you implemented this computation, report your results and comment.
Hint: Use a guess and verify procedure. Guess the wage w0 and obtain the labor demand functions at the level of the individual firm by solving their profit maximization problem. Compute the total labor demand ld(w0) and the labor supply ls(w0). If they are different, update the guess on the wage and iterate until convergence. For this problem, bisection would work well.
(d) For this part of the question retain the same labor supply function used in part (c).
Assumethatφ=0.6,s=0.1,I =10,ε=0.5,μa =0andσa2 =2. NoticethathereListobeinterpreted as a large number that is not binding, namely L ≥ ls. The government runs a balanced budget and the labor market has to be in equilibrium.
For a constant job creation (proportional) subsidy s = 0.1, find the combination of corporate tax rate (τf) and labor income tax rate (τl) that maximizes aggregate output. Explain how you implemented this computation, report your results and comment.
(e) Now the job creation (proportional) subsidy s is no longer fixed. Find the combination of corporate tax rate (τf), labor income tax rate (τl), and labor subsidy (s) that maximizes aggregate output. Explain how you implemented this computation, report your results and comment.
ls =[10∗(1−τ)w]1
Computational Economics ECON 457 - A01
END OF THE EXAM
Page 5 of 5
Student Name
Student ID
Time (BEC 371)
Notes Q1
Notes Q2
Al-Hashimi, Afnan
2.00pm
Auchterlonie, Michael
2.05pm
Ben Ammar, Youssef
2.10pm
Blaney, Taryn
2.15pm
Bruce, Nicole
2.20pm
Cheng, Alex
2.25pm
Fairweather, Connor
2.30pm
Feng, Sina
2.35pm
Ford, Hayden
2.40pm
Hayer, Amrit
2.45pm
Hu, Yuhao
2.50pm
Hutchinson, Shaun
2.55pm
Jin, Joyce
VXXXXXXX9
3.00pm
Jin, Joyce
VXXXXXXX6
3.05pm
Kochhar, Sneh
3.10pm
Liao, Luying
3.15pm
Liu, Chloe
3.20pm
Liu, Kehan
3.25pm
Mathew, Nishant
3.30pm
Monks, Jordan
3.35pm
Peng, Xiangning
3.40pm
Qian, Xulin
3.45pm
Reyerse, Robbie
3.50pm
Schopper, Michael
3.55pm
Scott, Ryan
4.00pm
Su, Lisa
4.05pm
Todd, Brendan
4.10pm
Tolentino, Carlo
4.15pm
Wang, Zixuan
4.20pm
Yang, Candice
4.25pm
Yao, Kaspar
4.30pm
Zhang, Yihan
4.35pm
Zhu, Mingjia
4.40pm
Zhu, Yu
4.45pm