# Model-1
M1X1 <- lm(YHousePriceOfUnitArea~X1TransactionDate, data=rev_data_clean)
summary(M1X1)
M1X2 <- lm(YHousePriceOfUnitArea~X2HouseAge, data=rev_data_clean)
summary(M1X2)
M1X3 <- lm(YHousePriceOfUnitArea~X3distanceToTheNearestMRTstation, data=rev_data_clean)
summary(M1X3)
M1X4 <- lm(YHousePriceOfUnitArea~X4NumberOfConvenienceStores, data=rev_data_clean)
summary(M1X4)
M1X5 <- lm(YHousePriceOfUnitArea~X5Latitude, data=rev_data_clean)
summary(M1X5)
M1X6 <- lm(YHousePriceOfUnitArea~X6Longitude, data=rev_data_clean)
summary(M1X6)
# Comparing the best version of model-1
summary(M1X1)$adj.r.squared
summary(M1X2)$adj.r.squared
summary(M1X3)$adj.r.squared
summary(M1X4)$adj.r.squared
summary(M1X5)$adj.r.squared
summary(M1X6)$adj.r.squared
# p-values for versions of model-1
summary(M1X1)$coefficients[2, 4]
summary(M1X2)$coefficients[2, 4]
summary(M1X3)$coefficients[2, 4]
summary(M1X4)$coefficients[2, 4]
summary(M1X5)$coefficients[2, 4]
summary(M1X6)$coefficients[2, 4]
# Model-1
M1X1 <- lm(YHousePriceOfUnitArea ~ X1TransactionDate,
data=rev_data_clean)
summary(M1X1)
M1X2 <- lm(YHousePriceOfUnitArea ~ X2HouseAge, data=rev_data_clean)
summary(M1X2)
M1X3 <- lm(YHousePriceOfUnitArea ~ X3distanceToTheNearestMRTstation,
data=rev_data_clean)
summary(M1X3)
M1X4 <- lm(YHousePriceOfUnitArea ~ X4NumberOfConvenienceStores,
data=rev_data_clean)
summary(M1X4)
M1X5 <- lm(YHousePriceOfUnitArea ~ X5Latitude, data=rev_data_clean)
summary(M1X5)
M1X6 <- lm(YHousePriceOfUnitArea ~ X6Longitude, data=rev_data_clean)
summary(M1X6)
# Comparing the best version of model-1
summary(M1X1)$adj.r.squared
summary(M1X2)$adj.r.squared
summary(M1X3)$adj.r.squared
summary(M1X4)$adj.r.squared
summary(M1X5)$adj.r.squared
summary(M1X6)$adj.r.squared
# p-values for versions of model-1
summary(M1X1)$coefficients[2, 4]
summary(M1X2)$coefficients[2, 4]
summary(M1X3)$coefficients[2, 4]
summary(M1X4)$coefficients[2, 4]
summary(M1X5)$coefficients[2, 4]
summary(M1X6)$coefficients[2, 4]
# Comparing the best version of model-1
> summary(M1X1)$adj.r.squared
[1] 0.005246001
> summary(M1X2)$adj.r.squared
[1] 0.04201891
> summary(M1X3)$adj.r.squared
[1] 0.4524284
> summary(M1X4)$adj.r.squared
[1] 0.3244108
> summary(M1X5)$adj.r.squared
[1] 0.2967482
> summary(M1X6)$adj.r.squared
[1] 0.2720662
>
> # p-values for versions of model-1
> summary(M1X1)$coefficients[2, 4]
[1] 0.07537113
> summary(M1X2)$coefficients[2, 4]
[1] 1.560426e-05
> summary(M1X3)$coefficients[2, 4]
[1] 4.639825e-56
> summary(M1X4)$coefficients[2, 4]
[1] 3.413483e-37
> summary(M1X5)$coefficients[2, 4]
[1] 1.387761e-33
> summary(M1X6)$coefficients[2, 4]
[1] 1.765191e-30
# Comparing the best version of model-1
> summary(M1X1)$adj.r.squared
[1] 0.005246001
> summary(M1X2)$adj.r.squared
[1] 0.04201891
> summary(M1X3)$adj.r.squared
[1] 0.4524284
> summary(M1X4)$adj.r.squared
[1] 0.3244108
> summary(M1X5)$adj.r.squared
[1] 0.2967482
> summary(M1X6)$adj.r.squared
[1] 0.2720662
>
> # p-values for versions of model-1
> summary(M1X1)$coefficients[2, 4]
[1] 0.07537113
> summary(M1X2)$coefficients[2, 4]
[1] 1.560426e-05
> summary(M1X3)$coefficients[2, 4]
[1] 4.639825e-56
> summary(M1X4)$coefficients[2, 4]
[1] 3.413483e-37
> summary(M1X5)$coefficients[2, 4]
[1] 1.387761e-33
> summary(M1X6)$coefficients[2, 4]
[1] 1.765191e-30