House Prices in the City of Windsor, Canada
HousePrices.RdSales prices of houses sold in the city of Windsor, Canada, during July, August and September, 1987.
Usage
data("HousePrices")Format
A data frame containing 546 observations on 12 variables.
- price
Sale price of a house.
- lotsize
Lot size of a property in square feet.
- bedrooms
Number of bedrooms.
- bathrooms
Number of full bathrooms.
- stories
Number of stories excluding basement.
- driveway
Factor. Does the house have a driveway?
- recreation
Factor. Does the house have a recreational room?
- fullbase
Factor. Does the house have a full finished basement?
- gasheat
Factor. Does the house use gas for hot water heating?
- aircon
Factor. Is there central air conditioning?
- garage
Number of garage places.
- prefer
Factor. Is the house located in the preferred neighborhood of the city?
References
Anglin, P., and Gencay, R. (1996). Semiparametric Estimation of a Hedonic Price Function. Journal of Applied Econometrics, 11, 633–648.
Verbeek, M. (2004). A Guide to Modern Econometrics, 2nd ed. Chichester, UK: John Wiley.
Examples
data("HousePrices")
### Anglin + Gencay (1996), Table II
fm_ag <- lm(log(price) ~ driveway + recreation + fullbase + gasheat +
aircon + garage + prefer + log(lotsize) + log(bedrooms) +
log(bathrooms) + log(stories), data = HousePrices)
### Anglin + Gencay (1996), Table III
fm_ag2 <- lm(log(price) ~ driveway + recreation + fullbase + gasheat +
aircon + garage + prefer + log(lotsize) + bedrooms +
bathrooms + stories, data = HousePrices)
### Verbeek (2004), Table 3.1
fm <- lm(log(price) ~ log(lotsize) + bedrooms + bathrooms + aircon, data = HousePrices)
summary(fm)
#>
#> Call:
#> lm(formula = log(price) ~ log(lotsize) + bedrooms + bathrooms +
#> aircon, data = HousePrices)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -0.81782 -0.15562 0.00778 0.16468 0.84143
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 7.09378 0.23155 30.636 < 2e-16 ***
#> log(lotsize) 0.40042 0.02781 14.397 < 2e-16 ***
#> bedrooms 0.07770 0.01549 5.017 7.11e-07 ***
#> bathrooms 0.21583 0.02300 9.386 < 2e-16 ***
#> airconyes 0.21167 0.02372 8.923 < 2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 0.2456 on 541 degrees of freedom
#> Multiple R-squared: 0.5674, Adjusted R-squared: 0.5642
#> F-statistic: 177.4 on 4 and 541 DF, p-value: < 2.2e-16
#>
### Verbeek (2004), Table 3.2
fm_ext <- lm(log(price) ~ . - lotsize + log(lotsize), data = HousePrices)
summary(fm_ext)
#>
#> Call:
#> lm(formula = log(price) ~ . - lotsize + log(lotsize), data = HousePrices)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -0.68355 -0.12247 0.00802 0.12780 0.67564
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 7.74509 0.21634 35.801 < 2e-16 ***
#> bedrooms 0.03440 0.01427 2.410 0.016294 *
#> bathrooms 0.16576 0.02033 8.154 2.52e-15 ***
#> stories 0.09169 0.01261 7.268 1.30e-12 ***
#> drivewayyes 0.11020 0.02823 3.904 0.000107 ***
#> recreationyes 0.05797 0.02605 2.225 0.026482 *
#> fullbaseyes 0.10449 0.02169 4.817 1.90e-06 ***
#> gasheatyes 0.17902 0.04389 4.079 5.22e-05 ***
#> airconyes 0.16642 0.02134 7.799 3.29e-14 ***
#> garage 0.04795 0.01148 4.178 3.43e-05 ***
#> preferyes 0.13185 0.02267 5.816 1.04e-08 ***
#> log(lotsize) 0.30313 0.02669 11.356 < 2e-16 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 0.2104 on 534 degrees of freedom
#> Multiple R-squared: 0.6865, Adjusted R-squared: 0.6801
#> F-statistic: 106.3 on 11 and 534 DF, p-value: < 2.2e-16
#>
### Verbeek (2004), Table 3.3
fm_lin <- lm(price ~ . , data = HousePrices)
summary(fm_lin)
#>
#> Call:
#> lm(formula = price ~ ., data = HousePrices)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -41389 -9307 -591 7353 74875
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) -4038.3504 3409.4713 -1.184 0.236762
#> lotsize 3.5463 0.3503 10.124 < 2e-16 ***
#> bedrooms 1832.0035 1047.0002 1.750 0.080733 .
#> bathrooms 14335.5585 1489.9209 9.622 < 2e-16 ***
#> stories 6556.9457 925.2899 7.086 4.37e-12 ***
#> drivewayyes 6687.7789 2045.2458 3.270 0.001145 **
#> recreationyes 4511.2838 1899.9577 2.374 0.017929 *
#> fullbaseyes 5452.3855 1588.0239 3.433 0.000642 ***
#> gasheatyes 12831.4063 3217.5971 3.988 7.60e-05 ***
#> airconyes 12632.8904 1555.0211 8.124 3.15e-15 ***
#> garage 4244.8290 840.5442 5.050 6.07e-07 ***
#> preferyes 9369.5132 1669.0907 5.614 3.19e-08 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 15420 on 534 degrees of freedom
#> Multiple R-squared: 0.6731, Adjusted R-squared: 0.6664
#> F-statistic: 99.97 on 11 and 534 DF, p-value: < 2.2e-16
#>