i need to complete the project before wensday

1 answer below »
i need to complete the project before wensday
Answered Same DayMar 31, 2021

Answer To: i need to complete the project before wensday

Medhini answered on Apr 01 2021
144 Votes
Output of Regression
Output of Regression
library(readxl)
## Warning: package 'readxl' was built under R version 3.5.3
data=read_excel("tampalms.xlsx")
data
## # A tibble: 92 x 2
## Appraised Sale
##
## 1 170
. 180
## 2 213. 245.
## 3 68.1 85.4
## 4 65.5 87.9
## 5 68.7 84.2
## 6 65.0 85
## 7 67.6 81
## 8 101. 125
## 9 109. 124
## 10 103. 126
## # ... with 82 more rows
First take the logarithem transformation on both X and Y and use them as response and predictor
x=log(data$Appraised)
y=log(data$Sale)
Question 1 Make a scatterplot of the data.Doesit appear that a straight line model will be an appropriate
fit to the data
attach(mtcars)
plot(x, y, main="Scatterplot",
xlab="Appraised ", ylab="Sale" )
abline(lm(y ~ x, data = data), col = "blue")
1
4.5 5.0 5.5 6.0 6.5
4.
0
4.
5
5.
0
5.
5
6.
0
6.
5
Scatterplot
Appraised
S
al
e
Ans:-Yes it appear that a straight line model and will be an appropriate fit to the data
Question2 Compute the pearson correlation, together with 95% confidence interval for r,and interpret
cor.test(x, y, method=c("pearson"))
##
## Pearson's product-moment correlation
##
## data: x and y
## t = 27.819, df = 90, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.9200104 0.9643515
## sample estimates:
## cor
## 0.9464788
Interpretation The extreme values r=0.9464 telling that it is near to 1 it indicates a perfectly linear
relationship where a change in X variable is accompanied by a perfectly consistent change in the Y. For these
relationships, all of the data points fall on a line
Question 3 Regression model, Provide the table of parameter Estimates and the fitted LSline to a scatterplot
model <- lm(y ~ x, data = data)
model
##
## Call:
## lm(formula = y ~ x, data = data)
2
##
## Coefficients:
## (Intercept) x
## 0.4672 0.9414
summary(model)
##
## Call:
## lm(formula = y ~ x, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.29041 -0.04047 0.01847 0.06966 0.22438
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.46723 0.17570 2.659 0.00927 **
## x 0.94145 0.03384 27.819 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here