<p>I have been trying to reproduce the results for <a href="http://www.colorado.edu/ibs/crs/workshops/R_1-11-2012/root/Harrison_1978.pdf" rel="nofollow">"Hedonic Housing Prices and the Demand for Clean Air"</a> but to no avail thus far. In table 7 there are three regressions mentioned using the Boston data set, this is found <a href="https://archive.ics.uci.edu/ml/datasets/Housing" rel="nofollow">here</a> and in the MASS R package.</p>

<p>I have tested the means and stand deviations reported against those in the data, and have had accurate results (although some variables such as lstat, nox and medv needed some mapping). I could not accurately show that the mean and standard deviation of black, given his mapping of the variable as (x - 0.63)^2, in the data set this is multiplied by 1000.</p>

<p>What is more, I could not reproduce the results of the regression. Using both rlm and lm in R, the coefficients were consistently off.</p>

<p>This is a pretty major paper, and a data set which has been used pretty widely, so would be surprised if the error wasn't my own. But would be nice to see if anyone else has managed to reproduce this in R or elsewhere.</p>

<p>Please find my R code below:</p>

<pre><code># Load MASS for rlm and Boston
library(MASS)

# Sort into the correct order
data &lt;- Boston[,c("medv","rm","age","black","lstat","crim","zn","indus","tax", "ptratio", "dis","rad","nox")]

# Creating a copy of table 5
rbind(sapply(data, mean),sapply(data, sd))

# Creating a copy of table 6
cov(data)

# Attempt to reverse engineer black variable
mean(-sqrt(Boston$black/1000)+0.63)

# Setting out the structural form
form &lt;- formula(I(log(medv*1000)) ~ I(rm^2) + age + log(dis) + log(rad) + tax + ptratio + I(black/1000) + I((lstat/100)) + crim + zn + indus + chas + I((nox*10)^2))

# Regressing using rlm
rlm(form, data = Boston)

# Regressing using lm
lm(form, data = Boston)

# Comparing to referenced data set to check that 
alternate &lt;- read.table("https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data")
as.matrix(Boston) - as.matrix(alternate)
</code></pre>

CC BY-SA 3.0
2016-09-29T16:12:36.370Z
Interesting analysis but what's the question?
BKay
CC BY-SA 3.0
2016-09-29T16:52:12.933Z
Trying to see if anyone else can arrive at the results given in the paper using the given data set.
Glen Moutrie
CC BY-SA 3.0
2016-09-29T18:39:58.540Z
This should be integrated into the question, not just in a comment.
BKay
<macroeconomics><regression><environmental-economics>
Cannot reproduce paper result on Boston Housing
Glen Moutrie
# Cannot reproduce paper result on Boston Housing

(Asked by: username_0 on 2016-09-29)

I have been trying to reproduce the results for "Hedonic Housing Prices and the Demand for Clean Air" but to no avail thus far. In table 7 there are three regressions mentioned using the Boston data set, this is found here and in the MASS R package.
I have tested the means and stand deviations reported against those in the data, and have had accurate results (although some variables such as lstat, nox and medv needed some mapping). I could not accurately show that the mean and standard deviation of black, given his mapping of the variable as (x - 0.63)^2, in the data set this is multiplied by 1000.
What is more, I could not reproduce the results of the regression. Using both rlm and lm in R, the coefficients were consistently off.
This is a pretty major paper, and a data set which has been used pretty widely, so would be surprised if the error wasn't my own. But would be nice to see if anyone else has managed to reproduce this in R or elsewhere.
Please find my R code below:
# Load MASS for rlm and Boston
library(MASS)

# Sort into the correct order
data <- Boston[,c("medv","rm","age","black","lstat","crim","zn","indus","tax", "ptratio", "dis","rad","nox")]

# Creating a copy of table 5
rbind(sapply(data, mean),sapply(data, sd))

# Creating a copy of table 6
cov(data)

# Attempt to reverse engineer black variable
mean(-sqrt(Boston$black/1000)+0.63)

# Setting out the structural form
form <- formula(I(log(medv*1000)) ~ I(rm^2) + age + log(dis) + log(rad) + tax + ptratio + I(black/1000) + I((lstat/100)) + crim + zn + indus + chas + I((nox*10)^2))

# Regressing using rlm
rlm(form, data = Boston)

# Regressing using lm
lm(form, data = Boston)

# Comparing to referenced data set to check that 
alternate <- read.table("https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data")
as.matrix(Boston) - as.matrix(alternate)

**Tags:** macroeconomics, regression, environmental-economics
> **Comments:**
> **username_1**: Interesting analysis but what's the question?  
> **username_0**: Trying to see if anyone else can arrive at the results given in the paper using the given data set.  
> **username_1**: This should be integrated into the question, not just in a comment.  

---

## 0 answers

