Structural Estimation of Behavioral Heterogeneity
We provide code of XMM and ELXM that replicates the empirical results.
- A static copy is hosted at Journal of Applied Econometrics Data Archive.
- A dynamic copy is hosted at Github with Version 1.0 exactly the same as the copy in JAE Data Archive. The authors will maintain it for future update.
raw_data.csv: the raw dataset, downloaded from Robert Shiller's webpage. This paper only uses three columns of the dataset.
date: in the format
p: S&P 500 index
master1_data_cleaning.R: generate the detrended time series for each period. After running this script, three Rdata files will be saved in the folder.
master2_estimation.R: estimation by XMM and ELXM using the Rdata files generated by
The following Rscripts contain the user-defined functions used in
func5.R: a collection of useful functions for the estimation procedures.
- No extra software is needed to run
- The numerical optimization in
MOSEKvia the R packages
RMOSEK. The software must be installed to run the code.
R --vanilla <master1_data_generation.R> data.out &
R --vanilla <master2_estimation.R> est.out &