CS代考计算机代写 1. (11 Points) Consider the multiplicative model
1. (11 Points) Consider the multiplicative model
Yi = 1Xi 2e”i, i=1,…,n
Hint: You can use R for the computations below, but you need to write down your answers in the written part of the exam.
(a) (1 P.) Written answer:
Apply an ln()-transformation to derive the standard simple linear regression model.
(b) (4 P.) Written answers:
Suppose that the following data are observed:
Compute the value of the OLS-estimate ˆ = (X ̃ 0X ̃ ) 1X ̃ 0Y ̃ . Additionally, write down the values of the following quantities:
(X ̃ 0X ̃ ), (X ̃ 0X ̃ ) 1 and X ̃ 0Y ̃ .
(c) (2 P.) Written answers:
Compute the t-test statistic to test (significance level ↵ = 0.05)
H0 : 2 =0 against H1 : 2 6=0 What’s the p-value and what’s your test-decision?
(d) (4 P.) Written answers:
Consider the multiplicative model and show that the elasticity of f(x) = E(Y|X = x) with respect to x equals 2. Comment on the role of the independence between “i and Xi in your derivations.
Assumptions 1-4 of Chapter 3 of our script are assumed to hold for this model. Additionally, i.i.d. 2
you can assume homoscedastic, spherical errors with “i ⇠ N(0, ), and independence between “i and Xi for all i = 1,…,n.
2
i
1
2
3
4
5
X ̃i =ln(Xi)
3
1
1
3
5
Y ̃i =ln(Yi)
0
1
4
5
6
2. (11 Points) Consider the multiple linear regression model Yi =Xi0 +”i
Assumptions 1⇤, 2, 3⇤ 4 of Chapter 5 of our script are assumed to hold. Additionally, you can assume homoscedastic, spherical errors “i . Unfortunately, we cannot observe the (K ⇥ 1) dimensional random vector Xi directly, but only
Consider the estimator
ˆn = (X ̃ 0X ̃ ) 1X ̃ 0Y
0B 1 1C X ̃ = B B X i 2 + M i 2 C C ,
i @ . A XiK +MiK
i.i.d.
with measurement errors Mi2,…,MiK ⇠ N(0,1). You can assume that the random vari-
ables X ̃i, Xi, and “i are all independent to each other; that is E(“i |X ̃i) = E(“i |Xi) = E(“i) = 0 for all i = 1,…,n.
(a) (4 P.) Written answers: ˆ ˆ
Compute the unconditional mean E( n). Is the estimator n (unconditionally) biased for fixed n?
(b) (3 P.) Written answers:
Let’s assume ˆn is inconsistent (i.e., ˆn 6!p as n ! 1). Is sU2B in this case also inconsistent for Var(“i )? Explain qualitatively (no mathematical derivations are needed here).
(c) (4 P.) Written answers:
i.i.d
Let’s assume Xi is observed directly, but a measurement error, ” ̃i ⇠ N(0,1), which
is independent from all other random model components, affects Yi . So you have the
following model
Y ̃i =Xi0 +”i, where Y ̃i =Yi +” ̃i Compute the unconditional mean E( ̃) of the estimator
̃ = ( X 0 X ) 1 X 0 Y ̃
Is the estimator ̃n (unconditionally) biased for fixed n?
3
3. (15 Points) Consider the following multiple linear regression model Yi = 1 + 2Xi2 + 3Xi3 +”i
Assumptions 1⇤, 2, 3⇤ 4 of Chapter 5 of our script are assumed to hold. Let the sample size be n = 100 and let
= ( 1, 2, 3)0 = (2,3,4)0 Xi2 ⇠U[1,4]
Xi3 ⇠ 2Xi2 + Vi
Vi ⇠N(0,1)
“i ⇠N(0,2/3),
where Zi is independent from all other random variables in the model.
Hints: You can use large sample inference. This is how you can draw n = 100 realiza- tions of the regressors and the error term. Don’t get confused, the regressor Xi3 has no measurement error.
n <-100
X_2 <- runif(n, 1, 4)
V <- rnorm(n)
X_3 <- 2 * X_2 + V
eps <- rnorm(n, sd=sqrt(2/3))
(a) (5 P.) R-Coding (no written answers):
Write a Monte Carlo (MC) simulation with 500 MC replications to produce 500 re- alizations of the OLS estimator ˆ2 for 2. Compute the empirical mean of the 500 realizations of ˆ2.
(b) (5 P.) R-Coding (no written answers):
Repeat the MC simulation in (a), but when computing the OLS estimates, omit Xi3 from the estimation formula for all i = 1, ... , n. Compute again the empirical mean of the 500 realizations of ˆ2.
(c) (5 P.) Written answers:
What do the simulation results in (a) and (b) indicate? In (b), we omit Xi3, i = 1, ... , n, when computing ˆ2. Does this violate the exogeneity assumption (Assumption 2)? Explain your answer using mathematical derivations.
4
4. (15 Points) Consider the following R code: library("AER")
data("Affairs")
## Estimation
lm_obj <- lm(affairs ~ age + yearsmarried + religiousness + rating,
data = Affairs)
Explanation: The variable affairs contains the number of affairs of a person. The variable rating contains information about how good/bad one rates his/her own marriage.
(a) (3 P.) R-Coding (no written answers):
Produce a typical regression output table (estimates, standard errors, t-values, and p-values) using HC3 robust standard errors.
(b) (4 P.) R-Coding & written answers:
What’s the p-value when testing H0: age = 0 versus H1: age < 0? What’s the p-value when testing H0: age = 0 versus H1: age > 0?
(c) (4 P.) R-Coding & written answers:
Test the multiple parameter hypothesis H0: age = yearsmarried = 0 using HC3 robust standard errors. What’s the corresponding R matrix? Can you reject the null hypothe- sis?
(d) (4 P.) R-Coding & written answers:
Test the multiple parameter hypothesis H0: age + yearsmarried = 0 using HC3 robust standard errors. What’s the corresponding R matrix? Can you reject the null hypothe- sis?
5
5. (8 Points)
(a) (2 P.) Written answer:
In case of large sample inference (n ! 1), the t-test statistic is asymptotically normal distributed. Why is it good practice to use nevertheless a t-distribution to compute the critical values? Answer shortly.
(b) (2 P.) Written answer:
Give an example of a conditionally heteroscedastic error term.
(c) (2 P.) Written answer:
Let’s say you test the null-hypothesis H0: 2 = 3 = 0 using an F-test and the re- sulting p-value is smaller than your significance level. What’s the interpretation of this significant test result regarding 2 and 3?
(d) (2 P.) Written answer:
Let’s assume you do an OLS regression with a small sample sizes of n = 10. All necessary regularity assumptions from Chapter 4 hold. You estimate the parameters of the following simple linear regression model
Yi= 1+ 2Xi+”i, i=1,…,n (In matrix notation: Y = X + “)
where ⇢1 ifiisodd Xi= 0ifiiseven
For this specific example, your professor claims that
ˆ2 ⇠ N( 2, 2[(X0X) 1]22)
Is this correct or is this a typo? Explain your answer shortly.
6