Professional Documents
Culture Documents
Assignment Report 1
UTAR, Malaysia
INTRODUCTION
+6011-26169767
* X2 is the Built-up Area.
* X3 is the Tenure Type.
* X4 is the Number of Bedroom.
* X5 is the Number of Bathroom.
* X6 is the Distance to the nearest
LRT/KTM/Monorial station.
* X7 is the Distance to the nearest primary school.
* X8 is the Distance to the nearest secondary school
* X9 is the Distance to nearest shopping mall/
convenience store
* X10 is the Furnished.
The significance level that we will use throughout
this project is =0.05.
II.
Methodology
Residuals:
Min
1Q Median
-532028 -101390
Coefficients:
3Q
Max
3.
4.
5.
6.
X2
220.92
X3
***
X4
***
X5
X6
X7
X8
X9
Input
X10
model.reg<-lm(Y~X2,data=model.dat)
abline(h=0,col="blue")
Output
---
1.
2.
model.reg<-lm(Y~X4,data=model.dat)
plot(x=model.dat$X4, y=model.reg$residuals, xlab
= "Bedrooms", ylab = "Residuals",
main="Residuals vs. Bedrooms", col = "red", pch =
19,cex=1.5,panel.first=grid(col="gray",lty="dotted
"))
abline(h=0,col="blue")
UTAR, Malaysia
Residual VS Bedrooms
Input
model.reg<-lm(Y~X4,data=model.dat)
plot(x=model.reg$fitted.values,
y=model.reg$residuals, xlab = "Bedrooms", ylab =
"Residuals", main="Residuals vs. Predicted
Values", col = "red", pch =
19,cex=1.5,panel.first=grid(col="gray",lty="dotted
"))
abline(h=0,col="blue")
Output
model.reg<-lm(Y~X2,data=model.dat)
plot(x=model.reg$fitted.values,
y=model.reg$residuals, xlab = "Built-Up Area",
ylab = "Residuals", main="Residuals vs. Predicted
Values", col = "red", pch =
19,cex=1.5,panel.first=grid(col="gray",lty="dotted
"))
abline(h=0,col="blue")
Output
Output
R.sq
adj.R.sq
x1
0.1331626
0.1194033
x1, x2
0.5943963
0.5813123
x1, x2, x3
0.7551079
0.7343543
x1,x2,x3,x4,x5,x6
0.7769258
0.7538492
x1,x2,x3,x4,x5,x6,x7
0.7831864
0.7565602
x1,x2,x3,x4,x5,x6,x7,x8
0.7832118
0.7522420
x1,x2,x3,x4,x5,x6,x7,x8,x9
0.7883409
0.7537057
0.7909363
0.7522208
Price vs Bedrooms
0.6297972 0.6115905
0.7343859
10 x1,x2,x3,x4,x5,x6,x7,x8,x9,x10
0.7166783
Input
model.reg<-lm(Y~X4,data=model.dat)
Call:
qqplot<qqnorm(model.reg$residuals,main="Normal
Probability
Plot",xlab="Bedrooms",ylab="Price",plot.it=TRUE
,col="blue", pch=19,
cex=1.5,panelfirst=grid(col="gray",lty="dotted"))
lm(formula = Y ~ X1 + X2 + X3 + X4 + X5 + X6 +
X7, data = model.dat)
abline(lm(qqplot$y~qqplot$x))
Residuals:
Min
1Q Median
3Q
Max
Output
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 139279.00 138479.11 1.006 0.318774
X1
X2
X3
***
X4
X5
**
X6
X7
Conclusion
Reference