RationalExp: Rationalizing Rational Expectations? Tests and Deviations.
IMPORTANT: Please download this package directly from CRAN https://CRAN.R-project.org/package=RationalExp and installed using the command line in R: install.packages("RationalExp").
The R package RationalExp is associated to D'Haultfoeuille, Gaillac, and Maurel (2018) https://www.nber.org/papers/w25274. This package implements a test of the rational expectations hypothesis based on the marginal distributions of realizations and subjective beliefs. This test can be used in cases where realizations and subjective beliefs are observed in two different datasets that cannot be matched, or when they are observed in the same dataset. The test can be implemented with covariates and survey weights. The package also computes the estimator of the minimal deviations from rational expectations than can be rationalized by the data.
See the RationalExp's vignette https://github.com/cgaillac/RationalExp/blob/master/RationalExp%20vignette.pdf for theoretical details and code examples
See the RationalExp's reference manual https://github.com/cgaillac/RationalExp/blob/master/RationalExp%20reference%20manual.pdf for the detailed syntax of all functions.
For a complete description, see D’Haultfoeuille X, Gaillac C, Maurel A (2018). “Rationalizing Rational Expectations? Tests and Deviations.” CREST Working paper.