# repsaleqreg: Quantile Repeat Sales Estimation In McSpatial: Nonparametric spatial data analysis

## Description

Median-Based Repeat Sales Estimation

## Usage

 ```1 2``` ```repsaleqreg(price0,time0,price1,time1,mergefirst=1, graph=TRUE,graph.conf=TRUE,conf=.95,print=TRUE) ```

## Arguments

 `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.

## Details

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

## Value

 `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.

## References

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

## Examples

 ``` 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

McSpatial documentation built on May 30, 2017, 12:34 a.m.