ECMT3110: Computational Assignment April 6, 2025 This assessment task requires you to write a program to investigate the properties of econometric estimators. You can use any software that you are familiar with, such as Matlab, R, Python, etc. Some of the questions may require knowledge that is beyond the scope of this class. You can use all the resources available online to solve them. Your submission should consist of two files: a PDF containing typed answers to each question, and a file containing the code you have used to obtain your results. Your code needs to be ready to run. Points will be deducted if the code cannot be run. You should include comments in your code to make it easily understandable. Submit your files through the Canvas course website. The assignment is worth a total of 25 points towards your final assessment. 1 Question Consider the following linear regression model: Y = β1 + β2X2 + β3X3 + β4X4 + u. (1) Let β1 = 1, β2 = 2, β3 = 3, and β4 = 4. Let the joint distribution of X2, X3, X4, and u be X2 X3 X4 u ∼ N (µ,Ω) with µ = 1 0 −2 0 and Ω = 2 1 1 0 1 1 0 0 1 0 4 0 0 0 0 2 , where N (µ,Ω) denotes the joint Normal distribution with µ and Ω being the mean and variance-covariance matrix of the Normal distribution. 1. Simulate n = 10 observations of X ≡ (X2, X3, X4) and u. Compute Y using Model (1) and the simulated values of X and u. Calculate the OLS estimator β̂ ≡ ( β̂1, β̂2, β̂3, β̂4 ) . 2. Using the simulated values of X and Y to numerically show that PXY is orthogonal to MXY , and that ‖Y ‖2 = ‖PXY ‖2 + ‖MXY ‖2 . 1 3. Numerically show that the FWL theorem applies to β̂3. 4. Repeat Question 1 five hundred times. We now focus on β3. You will ob- tain five hundred estimators for β3, denoted as β̂3,1, β̂3,2, . . . , β̂3,500. Com- pute the mean squared error (MSE) as MSEn=10 = 1 500 500∑ b=1 ( β̂3,b − β3 )2 . 5. Repeat Question 4 for sample sizes of 20, 30, 40, 50, 100, 200. Now you will have MSEn=20,..., MSEn=200. Plot them as a function of the sample size. What can you conclude from your graph? What theorem does your conclusion relate to? 6. Given any set of observations, rather regressing Model (1), we can es- timate β2, β3, β4 by regressing the demeaned Y on the demeaned X ≡ (X2, X3, X4). Simulate a set of observations to show this. 7. What is the central limit theorem? Can you apply the central limit the- orem to obtain the asymptotic distribution of √ n ( β̂3 − β3 ) ? (For this question, we can search for answers on the Internet.) 8. Numerically show that the central limit theorem holds for Model (1). For example, you can show that the difference between √ n ( β̂3 − β3 ) and its asymptotic distribution becomes smaller and smaller when n increases. 2
学霸联盟