https://aumontgomery-my.sharepoint.com/:x:/g/personal/ppaudel_aum_edu/EacaJ3AV9L
ID: 3063105 • Letter: H
Question
https://aumontgomery-my.sharepoint.com/:x:/g/personal/ppaudel_aum_edu/EacaJ3AV9LdJqORUMWDUT4UBfDop9-FgUQ1bTYRHeJ7vBg?e=hwhXWF (data set in excel online)
Estimate the model
log(Y1) = beta_0 + beta_1 X1 + beta_2 log(X2) + u
Calculate the residual for all observations using the appropriate STATA command. What is the residual for observation number 500
12.7
-0.3
-3.29
54.9
1.86
4.23
Question 5
Now you change the dependent variable to Y2. You think that the correct model is either
(Model 1) Y2 = beta_0 + beta_1 X1 + beta_2 X1^2 + beta_3 log(X2) + beta_4 X1*log(X2) + u
or the simpler model
(Model 2) Y2 = beta_0 + beta_1 X1 + beta_2 log(X2) + u
We want to use the Regression Specification Error Test (RESET) to test whether Model 1 or Model 2 is correctly specified. First let’s test Model 2. Run the regression, calculate the predicted values of the dependent variable, and then generate the squares and cubes of those values. Then run another regression including those two terms as regressors. Then perform an F test of joint significance on those two coefficients. What is the value of the test statistic and p value respectively?
12.9 and 0.07
40.5 and 0.45
40.5 and 0.000
9.5 and 0.02
Question 6
Now you change the dependent variable to Y2. You think that the correct model is either
(Model 1) Y2 = beta_0 + beta_1 X1 + beta_2 X1^2 + beta_3 log(X2) + beta_4 X1*log(X2) + u
or the simpler model
(Model 2) Y2 = beta_0 + beta_1 X1 + beta_2 log(X2) + u
We want to use the Regression Specification Error Test (RESET) to test whether Model 1 or Model 2 is correctly specified. First let’s test Model 2. Run the regression, calculate the predicted values of the dependent variable, and then generate the squares and cubes of those values. Then run another regression including those two terms as regressors. Then perform an F test of joint significance on those two coefficients. What is the conclusion based on the test?
The model is correctly specified
The model is not correctly specified
Explanation / Answer
Analysis is done using R studio (lm and ANOVA function in R ).
The following is the conclusion.
The calculated F-statistic is fval= 412.7379 and the critical value corresponding to a significance level =0.05 is 3.01 which rejects the null hypothesis that both 2 and 44 are zero. The p-value of the test is p=0
Based on the statistic, Model1 is correctly specified.
Here is the code in R studio.
alpha <- 0.05
N <- NROW(data$x1) #Number of observations in dataset
K <- 5 #Five Betas in the unrestricted model
J <- 2 #Because Ho has two restrictions
fcr <- qf(1-alpha, J, N-K)
mod1 <-lm(y2~ x1+x1sq+logx2+ I(x1*logx2),data = data)
anov <- anova(mod1)
anov # prints 'anova' table for the unrestricted mode
SSEu <- anov[4, 2]
mod2=lm(y2~ x1+logx2,data = data)
anov2=anova(mod2)
SSEr <- anov[3,2]
fval <- ((SSEr-SSEu)/J) / (SSEu/(N-K))
pval <- 1-pf(fval, J, N-K)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.