Read in Denver average rent, denver rental trend and denver vacancy rate data
Col1 Denver.Average.Rents Denver.Rental.Trend Denver.Vacancy.Rate
1 2005 971 NA 0.0970
2 2006 969 -0.002059732 0.0756
3 2007 950 -0.019607843 0.0840
4 2008 1016 0.069473684 0.0719
5 2009 1006 -0.009842520 0.0775
6 2010 998 -0.007952286 0.0647
7 2011 1000 0.002004008 0.0510
8 2012 1019 0.019000000 0.0494
9 2013 1051 0.031403337 0.0400
10 2014 1111 0.057088487 0.0397
11 2015 1226 0.103510351 0.0341
Denver.GDP...bn. Denver.GDP.Growth Denver.HH.Median.Income
1 134.79 0.08950000 66625
2 141.19 0.04748127 64649
3 147.17 0.04235427 67302
4 154.50 0.04980635 66430
5 150.09 -0.02854369 65184
6 155.60 0.03671131 63848
7 160.97 0.03451157 62421
8 169.20 0.05112754 63439
9 177.18 0.04716312 63861
10 188.17 0.06202732 66947
11 193.17 0.02657172 70283
Median.Income.Trend Annual.Rent.Median.Income WR.Median.Home.Price
1 NA 0.1748893 NA
2 -0.029658537 0.1798636 NA
3 0.041036984 0.1693858 222000
4 -0.012956524 0.1835315 219000
5 -0.018756586 0.1851988 215000
6 -0.020495827 0.1875705 212000
7 -0.022349956 0.1922430 207000
8 0.016308614 0.1927521 215000
9 0.006652059 0.1974914 238000
10 0.048323703 0.1991426 269000
11 0.049830463 0.2093252 306000
WR.Home.Appreciation
1 NA
2 NA
3 NA
4 -0.01351351
5 -0.01826484
6 -0.01395349
7 -0.02358491
8 0.03864734
9 0.10697674
10 0.13025210
11 0.13754647
Provide a summary of the Denver real estate stats
Col1 Denver.Average.Rents Denver.Rental.Trend
Min. :2005 Min. : 950.0 Min. :-0.019608
1st Qu.:2008 1st Qu.: 984.5 1st Qu.:-0.006479
Median :2010 Median :1006.0 Median : 0.010502
Mean :2010 Mean :1028.8 Mean : 0.024302
3rd Qu.:2012 3rd Qu.:1035.0 3rd Qu.: 0.050667
Max. :2015 Max. :1226.0 Max. : 0.103510
NA's :1
Denver.Vacancy.Rate Denver.GDP...bn. Denver.GDP.Growth
Min. :0.03410 Min. :134.8 Min. :-0.02854
1st Qu.:0.04470 1st Qu.:148.6 1st Qu.: 0.03561
Median :0.06470 Median :155.6 Median : 0.04716
Mean :0.06226 Mean :161.1 Mean : 0.04170
3rd Qu.:0.07655 3rd Qu.:173.2 3rd Qu.: 0.05047
Max. :0.09700 Max. :193.2 Max. : 0.08950
Denver.HH.Median.Income Median.Income.Trend Annual.Rent.Median.Income
Min. :62421 Min. :-0.029659 Min. :0.1694
1st Qu.:63854 1st Qu.:-0.020061 1st Qu.:0.1817
Median :65184 Median :-0.003152 Median :0.1876
Mean :65544 Mean : 0.005793 Mean :0.1883
3rd Qu.:66786 3rd Qu.: 0.034855 3rd Qu.:0.1951
Max. :70283 Max. : 0.049830 Max. :0.2093
NA's :1
WR.Median.Home.Price WR.Home.Appreciation
Min. :207000 Min. :-0.02358
1st Qu.:215000 1st Qu.:-0.01503
Median :219000 Median : 0.01257
Mean :233667 Mean : 0.04301
3rd Qu.:238000 3rd Qu.: 0.11280
Max. :306000 Max. : 0.13755
NA's :2 NA's :3
Create standard deviation for each data point
[1] 78.62674
[1] NA
[1] 0.02068382
Create bar charts for each data point
Warning in arrange_impl(.data, dots): '.Random.seed' is not an integer
vector but of type 'NULL', so ignored
Warning: Ignoring 1 observations
Warning: Ignoring 1 observations
Creating scatter plots of rent, rent trends and vacancy rates against nominal GDP and GDP growth
Warning: Ignoring 1 observations
Warning: Ignoring 1 observations
Summary linear model statistics Denver GDP vs. Rental Trends
Call:
lm(formula = denReData$Denver.GDP...bn. ~ rent.rate, data = denReData)
Residuals:
Min 1Q Median 3Q Max
-24.166 -2.262 2.895 6.578 13.601
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 163.724 3.846 42.569 1.02e-10 ***
rent.rate 330.776 99.994 3.308 0.0107 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 12.16 on 8 degrees of freedom
(1 observation deleted due to missingness)
Multiple R-squared: 0.5777, Adjusted R-squared: 0.5249
F-statistic: 10.94 on 1 and 8 DF, p-value: 0.01073
Summary linear model Statistics Denver GDP vs. Vacancy Rates
Call:
lm(formula = denReData$Denver.GDP...bn. ~ vacancy.rate, data = denReData)
Residuals:
Min 1Q Median 3Q Max
-9.870 -3.281 1.744 4.318 7.708
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 161.094 1.908 84.449 2.32e-14 ***
vacancy.rate -865.250 96.728 -8.945 8.98e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 6.327 on 9 degrees of freedom
Multiple R-squared: 0.8989, Adjusted R-squared: 0.8877
F-statistic: 80.02 on 1 and 9 DF, p-value: 8.975e-06
Creating scatter plots of rent, rent trends and vacancy rates against Denver HHI and Denver Median HHI Trend
Warning: Ignoring 1 observations
Warning: Ignoring 1 observations
Warning: Ignoring 1 observations
Warning: Ignoring 1 observations
Creating scatter plots of rent, rent trends and vacancy rates against Annual Rent/Median Income Ratio
Warning: Ignoring 1 observations
Summary linear model Statistics Denver Rent/Income Ratio vs. Rental Trends
Call:
lm(formula = denReData$Annual.Rent.Median.Income ~ rent.ratio,
data = denReData)
Residuals:
Min 1Q Median 3Q Max
-0.015100 -0.002825 0.003449 0.004289 0.007026
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.189650 0.002594 73.120 1.36e-12 ***
rent.ratio 0.198829 0.067433 2.949 0.0185 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.008202 on 8 degrees of freedom
(1 observation deleted due to missingness)
Multiple R-squared: 0.5208, Adjusted R-squared: 0.4609
F-statistic: 8.694 on 1 and 8 DF, p-value: 0.01847
Summary linear model Statistics Denver Rent/Income Ratio vs. Rental Trends
Call:
lm(formula = denReData$Annual.Rent.Median.Income ~ vacancy.ratio,
data = denReData)
Residuals:
Min 1Q Median 3Q Max
-0.0076051 -0.0020922 -0.0009143 0.0025989 0.0063525
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.188309 0.001276 147.535 < 2e-16 ***
vacancy.ratio -0.520678 0.064720 -8.045 2.12e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.004233 on 9 degrees of freedom
Multiple R-squared: 0.8779, Adjusted R-squared: 0.8644
F-statistic: 64.72 on 1 and 9 DF, p-value: 2.116e-05
Prediction model for Rental Rate Trends vs. GDP
#creating the training and test data
set.seed(100)
trainingRowIndex1<- sample(1:nrow(denReData), 0.80*nrow(denReData))
trainingData1<- denReData[trainingRowIndex1,]
testDataI<- denReData[-trainingRowIndex1,]
#building the model on the test data
model1<- lm(denReData$Denver.Rental.Trend ~ denReData$Denver.GDP...bn.)
distPred1<- predict(model1, testDataI)
## Warning: 'newdata' had 3 rows but variables found have 11 rows
summary(model1)
##
## Call:
## lm(formula = denReData$Denver.Rental.Trend ~ denReData$Denver.GDP...bn.)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.018066 -0.016048 -0.012599 0.007268 0.061281
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.2616281 0.0868875 -3.011 0.0168 *
## denReData$Denver.GDP...bn. 0.0017464 0.0005279 3.308 0.0107 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02795 on 8 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.5777, Adjusted R-squared: 0.5249
## F-statistic: 10.94 on 1 and 8 DF, p-value: 0.01073
#calculating preciction accuracy and error rates
actual_preds1<- data.frame(cbind(actuals=testDataI$Denver.Rental.Trend, predicteds=distPred1))
## Warning in cbind(actuals = testDataI$Denver.Rental.Trend, predicteds =
## distPred1): number of rows of result is not a multiple of vector length
## (arg 1)
corr_accuracy1<- cor(actual_preds1)
head(actual_preds1)
## actuals predicteds
## 1 -0.007952286 -0.026228994
## 2 0.002004008 -0.015051945
## 3 0.019000000 -0.004608389
## 4 -0.007952286 0.008192826
## 5 0.002004008 0.000491140
## 6 0.019000000 0.010113881
Prediction model for Vacancy Rate vs. Denver GDP
#creating the training and test data
set.seed(100)
trainingRowIndex2<- sample(1:nrow(denReData), 0.80*nrow(denReData))
trainingData2<- denReData[trainingRowIndex2,]
testData2<- denReData[-trainingRowIndex2,]
#building the model on the test data
model2<- lm(denReData$Denver.Vacancy.Rate ~ denReData$Denver.GDP...bn.)
distPred2<- predict(model2, testData2)
## Warning: 'newdata' had 3 rows but variables found have 11 rows
summary(model2)
##
## Call:
## lm(formula = denReData$Denver.Vacancy.Rate ~ denReData$Denver.GDP...bn.)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.011392 -0.004997 0.002786 0.005363 0.007410
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.2296215 0.0188256 12.197 6.70e-07 ***
## denReData$Denver.GDP...bn. -0.0010389 0.0001161 -8.945 8.98e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.006933 on 9 degrees of freedom
## Multiple R-squared: 0.8989, Adjusted R-squared: 0.8877
## F-statistic: 80.02 on 1 and 9 DF, p-value: 8.975e-06
#calculating preciction accuracy and error rates
actual_preds2<- data.frame(cbind(actuals=testDataI$Denver.Vacancy.Rate, predicteds=distPred2))
## Warning in cbind(actuals = testDataI$Denver.Vacancy.Rate, predicteds =
## distPred2): number of rows of result is not a multiple of vector length
## (arg 1)
corr_accuracy2<- cor(actual_preds2)
head(actual_preds2)
## actuals predicteds
## 1 0.0647 0.08959010
## 2 0.0510 0.08294123
## 3 0.0494 0.07672870
## 4 0.0647 0.06911367
## 5 0.0510 0.07369515
## 6 0.0494 0.06797089
Prediction model for Rental Rate Trends vs. Denver Rent/Income Ratio
#creating the training and test data
set.seed(100)
trainingRowIndex3<- sample(1:nrow(denReData), 0.80*nrow(denReData))
trainingData3<- denReData[trainingRowIndex3,]
testData3<- denReData[-trainingRowIndex3,]
#building the model on the test data
model3<- lm(denReData$Denver.Rental.Trend ~ denReData$Annual.Rent.Median.Income)
distPred3<- predict(model3, testData3)
## Warning: 'newdata' had 3 rows but variables found have 11 rows
summary(model3)
##
## Call:
## lm(formula = denReData$Denver.Rental.Trend ~ denReData$Annual.Rent.Median.Income)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.029088 -0.020222 -0.007076 0.008858 0.061199
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.4724 0.1687 -2.800 0.0232 *
## denReData$Annual.Rent.Median.Income 2.6193 0.8883 2.949 0.0185 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02977 on 8 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.5208, Adjusted R-squared: 0.4609
## F-statistic: 8.694 on 1 and 8 DF, p-value: 0.01847
#calculating preciction accuracy and error rates
actual_preds3<- data.frame(cbind(actuals=testDataI$Denver.Rental.Trend, predicteds=distPred3))
## Warning in cbind(actuals = testDataI$Denver.Rental.Trend, predicteds =
## distPred3): number of rows of result is not a multiple of vector length
## (arg 1)
corr_accuracy3<- cor(actual_preds3)
head(actual_preds3)
## actuals predicteds
## 1 -0.007952286 -0.014361592
## 2 0.002004008 -0.001332671
## 3 0.019000000 -0.028776856
## 4 -0.007952286 0.008274706
## 5 0.002004008 0.012641768
## 6 0.019000000 0.018853770
Prediction model for Vacancy vs. Denver Rent/Income Ratio
#creating the training and test data
set.seed(100)
trainingRowIndex4<- sample(1:nrow(denReData), 0.80*nrow(denReData))
trainingData4<- denReData[trainingRowIndex4,]
testData4<- denReData[-trainingRowIndex4,]
#building the model on the test data
model4<- lm(denReData$Denver.Vacancy.Rate ~ denReData$Annual.Rent.Median.Income)
distPred4<- predict(model4, testData4)
## Warning: 'newdata' had 3 rows but variables found have 11 rows
summary(model4)
##
## Call:
## lm(formula = denReData$Denver.Vacancy.Rate ~ denReData$Annual.Rent.Median.Income)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.0101695 -0.0050005 -0.0009028 0.0044273 0.0121101
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.37977 0.03953 9.606 4.99e-06
## denReData$Annual.Rent.Median.Income -1.68611 0.20958 -8.045 2.12e-05
##
## (Intercept) ***
## denReData$Annual.Rent.Median.Income ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.007618 on 9 degrees of freedom
## Multiple R-squared: 0.8779, Adjusted R-squared: 0.8644
## F-statistic: 64.72 on 1 and 9 DF, p-value: 2.116e-05
#calculating preciction accuracy and error rates
actual_preds4<- data.frame(cbind(actuals=testDataI$Denver.Vacancy.Rate, predicteds=distPred4))
## Warning in cbind(actuals = testDataI$Denver.Vacancy.Rate, predicteds =
## distPred4): number of rows of result is not a multiple of vector length
## (arg 1)
corr_accuracy4<- cor(actual_preds4)
head(actual_preds4)
## actuals predicteds
## 1 0.0647 0.08488994
## 2 0.0510 0.07650277
## 3 0.0494 0.09416955
## 4 0.0647 0.07031817
## 5 0.0510 0.06750694
## 6 0.0494 0.06350806
Arima based model for rental rates
Arima based model for vacancy rates