Description Usage Arguments Details Value References See Also Examples
Median-Based Repeat Sales Estimation
1 2 | repsaleqreg(price0,time0,price1,time1,mergefirst=1,
graph=TRUE,graph.conf=TRUE,conf=.95,print=TRUE)
|
price0 |
Earlier price in repeat sales pair |
time0 |
Earlier time in repeat sales pair |
price1 |
Later price in repeat sales pair |
time1 |
Later time in repeat sales pair |
mergefirst |
Number of initial periods with coefficients constrained to zero. Default: mergefirst=1 |
graph |
If TRUE, graph results. Default: graph=T |
graph.conf |
If TRUE, add confidence intervals to graph. Default: graph.conf=T |
conf |
Confidence level for intervals. Default: .95 |
print |
If print=T, prints the regression results. Default: print=T. |
The repeat sales model is
y(t) - y(s) = δ(t) - δ(s) + u(t) - u(s)
where y is the log of sales price, s denotes the earlier sale in a repeat sales pair, and t denotes the later sale. Each entry of the data set should represent a repeat sales pair, with price0 = y(s), price1 = y(t), time0 = s, and time1 = t. The function repsaledata can help transfer a standard hedonic data set to a set of repeat sales pairs.
Repeat sales estimates are sometimes very sensitive to sales from the first few time periods, particularly when the sample size is small. The option mergefirst indicates the number of time periods for which the price index is constrained to equal zero. The default is mergefirst = 1, meaning that the price index equals zero for just the first time period.
The repsaleqreg function uses the quantreg package to estimate a quantile regression for the .50 quantile, i.e., the median. A median-based estimator is less sensitive to outliers than linear regression. McMillen and Thorsnes (2006) show that the quantile approach is less sensitive to the inclusion of properties that have undergone renovations between sales. repsaleqreg first fits a standard quantile model, including the interecpt. The coefficient vector is then rotated to have a zero intercept using the formula for transforming unrestricted linear regression estimates to the restricted (zero intercept) values:
fit <- rq(dy~x)
b <- fit$coef
fit1 <- summary(fit,covariance=TRUE)
vmat <- fit1$cov
k = length(b1)
rmat <- diag(k)
rmat[,1] <- rmat[,1] - vmat[1,]/vmat[1,1]
bmat <- rmat
fit |
Full quantile regression model. |
pindex |
The estimated price index. |
lo |
The lower bounds for the price index confidence intervals. |
hi |
The upper bounds for the price index confidence intervals. |
Case, Karl and Robert Shiller, "Prices of Single-Family Homes since 1970: New Indexes for Four Cities," New England Economic Review (1987), 45-56.
McMillen, Daniel P. and Paul Thorsnes, "Housing Renovations and the Quantile Repeat Sales Price Index," Real Estate Economics 34 (2006), 567-587.
repsale
repsaledata
repsalefourier
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | set.seed(189)
n = 2000
# sale dates range from 0-10
# drawn uniformly from all possible time0, time1 combinations with time0<time1
tmat <- expand.grid(seq(0,10), seq(0,10))
tmat <- tmat[tmat[,1]<tmat[,2], ]
tobs <- sample(seq(1:nrow(tmat)),n,replace=TRUE)
time0 <- tmat[tobs,1]
time1 <- tmat[tobs,2]
timesale <- time1-time0
table(timesale)
# constant variance; index ranges from 0 at time 0 to 1 at time 10
y0 <- time0/10 + rnorm(n,0,.2)
y1 <- time1/10 + rnorm(n,0,.2)
fit <- repsaleqreg(price0=y0, price1=y1, time0=time0, time1=time1)
# variance rises with timesale
# var(u0) = .2^2; var(u1) = (.2 + timesale/10)^2
# var(u1-u0) = var(u0) + var(u1) = 2*(.2^2) + .4*timesale/10 + (timesale^2)/100
y0 <- time0/10 + rnorm(n,0,.2)
y1 <- time1/10 + rnorm(n,0,.2+timesale/10)
par(ask=TRUE)
fit <- repsaleqreg(price0=y0, price1=y1, time0=time0, time1=time1)
summary(fit$pindex)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.