Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

HousePrices

House Prices in the City of Windsor, Canada


Description

Sales 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?

Source

Journal of Applied Econometrics Data Archive.

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)

### Verbeek (2004), Table 3.2
fm_ext <- lm(log(price) ~ . - lotsize + log(lotsize), data = HousePrices)
summary(fm_ext)

### Verbeek (2004), Table 3.3
fm_lin <- lm(price ~ . , data = HousePrices)
summary(fm_lin)

AER

Applied Econometrics with R

v1.2-10
GPL-2 | GPL-3
Authors
Christian Kleiber [aut] (<https://orcid.org/0000-0002-6781-4733>), Achim Zeileis [aut, cre] (<https://orcid.org/0000-0003-0918-3766>)
Initial release
2022-06-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.