This is a public repository accompanying the paper
- Wei Lin, Zhentao Shi, Yishu Wang and Ting Hin Yan: “Unfolding Beijing in a Hedonic Way”.
for access of the data and R scripts. Please contact Yishu Wang ([email protected]) if you have any questions about the code.
lianjia.RData
: Transaction-level dataset of housing prices in Beijing from Lianjia.
prediction.R
: Main file for performing spatial prediction in Section 3.pred_seq.R
: Main file for performing sequential forecast in Section 4.
KNN/plm.knn.R
: Functions of partial linear k-Nearest Neighbor (KNN)KNN/SKNN.Tune.R
: Tuning spatial KNNKNN/STKNN.Tune.R
: Tuning spatial-temporal KNNKNN/SKNN_seq.Tune.R
: Tuning sequential spatial KNN
NW/plm.NW.R
: Functions of partial linear Nadaraya-Watson (NW)NW/SNW.Tune.R
: Tuning spatial NWNW/STNW.Tune.R
: Tuning spatial-temporal NWNW/SNW_seq.Tune.R
: Tuning sequential spatial NW
LPN/plm.localpoly.pred
: Functions of partial linear Local Polynomial (LPN)LPN/SLPN.Tune.R
: Tuning spatial LPNLPN/STLPN.Tune.R
: Tuning spatial-temporal LPNLPN/SLPN_seq.Tune.R
: Tuning sequential spatial LPN
RF/RF.Tune.R
: Tuning Random Forests (RF, spatial version)RF/RF_seq.Tune.R
: Tuning Random Forests (RF, sequential version)
GBM/GBM.Tune.R
: Tuning Gradient Boosting Machine (GBM, spatial version)GBM/GBM_seq.Tune.R
: Tuning Gradient Boosting Machine (GBM, sequential version)
GBMplot.R
: Plotting Figure 3 "GBM prediction on coordinate raster"
Remark: If you want to save time from tuning parameters and trust our tuning results, you can directly run prediction.R
and pred_seq.R
to replicate our main results.