You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Most repeat-sales price indexes used in practice are based on thematrices in Shiller (1991, sections I-II), e.g., S&P’s Case-Shillerindex, Teranet-National Bank’s HPI, and formerly Statistics Canada’sRPPI. Let’s consider the simplest non-trivial example to see how to makeand use these matrices.
library(rsmatrix)# Make some data for two products selling over three periodssales<-data.frame(id= c(1,1,1,2,2),date= c(1,2,3,1,3),price= c(1,3,2,1,1))sales
Standard repeat-sales indexes are just simple matrix operations usingthese matrices.
# Calculate the GRS index in Bailey, Muth, and Nourse (1963)b<- with(matrices, solve(crossprod(Z), crossprod(Z,y))[,1])(grs<- exp(b)*100)
## 2 3 ## 238.1102 125.9921
# Calculate the ARS index in Shiller (1991)b<- with(matrices, solve(crossprod(Z,X), crossprod(Z,Y))[,1])(ars<-100/b)
## 2 3 ## 240.0000 133.3333
Prior work
ThehpiR package has some functionality for making repeat-salesindexes, as does theMcSpatial package (formerly on CRAN). Althougheasier to use, these packages lack the flexibility to compute a numberof indexes found literature (e.g., any of the arithmetic repeat-salesindexes). The functions in this package build off of those in thersi package in Kirby-McGregor and Martin (2019), which also gives agood background on the theory of repeat-sales indexes.
Contributing
All contributions are welcome. Please start by opening an issue onGitHub to report any bugs or suggest improvements and new features. Seethe contribution guidelines for this project for more information.
References
ILO, IMF, OECD, UN, World Bank, Eurostat. (2013).Handbook onResidential Property Prices Indices (RPPIs). Eurostat.
Kirby-McGregor, M., and Martin, S. (2019). An R package for calculatingrepeat-sale price indices.Romanian Statistical Review, 3:17-33.
Shiller, R. J. (1991). Arithmetic repeat sales price estimators.Journal of Housing Economics, 1(1):110-126.