Economics 102 Problem Set 4 Su2018.pdf (page 1 of 4) Consider the following rand
ID: 2949667 • Letter: E
Question
Economics 102 Problem Set 4 Su2018.pdf (page 1 of 4) Consider the following random sample of five 30-year old females (n 5), where the dependent variable, Y, is each person's hourly wage and the explanatory variable, X, is each person's years of education. Hourly wages in dollars Years of education Y) 30 20 20 40 40 15 12 14 16 18 A. Use ordinary least squares (OLS) to estimate the following linear regression model by hand: B. Compute the coefficient of determination (R2) by hand. C.Use R to replicate the results from Parts A and B using the 1m command as shown in lecture. Report your results in tabular form using the package stargazer. D. Is the slope coefficient statistically different from zero at the 10-percent level of significance? Is it statistically different from zero at the 5-percent level of significance? Show your work and explain. Precisely interpret the exact meaning of the estimated slope coefficient in this particular case? E. F. What is the predicted hourly wages of someone with 15 years of education, based on the regression results? Show your work and explain.Explanation / Answer
Please see the R snippet below
Y <- c(30,20,20,40,40)
X <- c(15,12,14,16,18)
fit <- lm(Y~X)
summary(fit)
###################
The results are
summary(fit)
Call:
lm(formula = Y ~ X)
Residuals:
1 2 3 4 5
-6.55e-15 2.00e+00 -6.00e+00 6.00e+00 -2.00e+00
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -30.000 17.474 -1.717 0.1845
X 4.000 1.155 3.464 0.0405 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.164 on 3 degrees of freedom
Multiple R-squared: 0.8, Adjusted R-squared: 0.7333
F-statistic: 12 on 1 and 3 DF, p-value: 0.04052
The regression equation is
y = -30 + 4*X , from the coefficients table
the r2 value is 0.8 , this means that the model is able to explain 80% variation in Y due to variation in X
The slope is 4 , this means that for every unit change in the value of X , Y increases by 4 units
also ,we see that the p value of X is 0.0405 , hence considering an alpha of 0.05 , we can reject the null hypothesis and conclude that the variable is statistically signficant for the model
we put x = 15 in the equation to get the value of Y as
y = -30 + 4*15
y = 30
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.