Please Use R program do it. (a) Fit a simple linear regression model relating se
ID: 3274203 • Letter: P
Question
Please Use R program do it.
(a) Fit a simple linear regression model relating selling price of the house to the current taxes ( x 1). Report your point estimates for all parameters of your model. Make a plot
of the data and the fitted regression line.
b. Test for significance of regression. which asks you to run and interpret an F test.
c. What percent of the total variability in selling price is explained by this model? asks you to interpret the sums-of-squares decomposition.
Explanation / Answer
Sol:
code:
mod1 <- lm(sphouse$y~sphouse$x1,data=sphouse)
output:
Call:
lm(formula = sphouse$y ~ sphouse$x1, data = sphouse)
Residuals:
Min 1Q Median 3Q Max
-3.8343 -2.3157 -0.3669 1.9787 6.3168
Coefficients:
Estimate Std. Error t value
(Intercept) 13.3202 2.5717 5.179
sphouse$x1 3.3244 0.3903 8.518
Pr(>|t|)
(Intercept) 3.42e-05 ***
sphouse$x1 2.05e-08 ***
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.961 on 22 degrees of freedom
Multiple R-squared: 0.7673, Adjusted R-squared: 0.7568
F-statistic: 72.56 on 1 and 22 DF, p-value: 2.051e-08
regression eq is
y=13.32+3.32x1
slope=3.32
y intercept=13.32
slope=3.32
y intercept=13.32
Intrepretation of y intercept
when x1=0
price=13.32
selling price is 13.32 when there are no taxes
intrepretaion of slope
slope=3.32
change in y/change in x=3.32
For unit increase in current tax, price increases by 3.32
Solutionb:
F-statistic: 72.56 on 1 and 22 DF, p-value: 2.051e-08
p<0.05
model is significant
Solutionc:
Multiple R-squared: 0.7673,
76.73% variation in y is explained by model.good model.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.