# Modified Ordered Random Forest

R package to implement modified ordered random forests (MORF), a nonparametric estimator of the ordered choice model. Additionally, the package implements a nonparametric estimator of the marginal effects.

MORF modifies a standard random forest splitting criterion to build a collection of forests, each estimating the conditional probabilities of a single class. The estimator inherits the asymptotic properties of random forests. Thus, under an honesty condition (i.e., that different observations are used to place the splits and compute leaf predictions) the predicted conditional probabilities are asymptotically normal and consistent. The particular honesty implementation used by MORF allows for a weight-based estimation of the variance of both predicted probabilities and marginal effects.

To get started, please check the online vignette for a short tutorial.

## Installation

The current development version of the package can be installed using the `devtools`

package:

```
devtools::install_github("riccardo-df/morf")
library(morf)
```

## References

- Athey, S., Tibshirani, J., & Wager, S. (2019).

Generalized Random Forests. Annals of Statistics, 47(2). [paper]

- Lechner, M., & Mareckova, J. (2022).

Modified Causal Forest. arXiv preprint arXiv:2209.03744. [paper]

- Lechner, M., & Okasa, G. (2019).

Random Forest Estimation of the Ordered Choice Model. arXiv preprint arXiv:1907.02436. [paper]

- Wager, S., & Athey, S. (2018).

Estimation and Inference of Heterogeneous Treatment Effects using Random Forests. Journal of the American Statistical Association, 113(523). [paper]

- Wright, M. N. & Ziegler, A. (2017).

ranger: A fast implementation of random forests for high dimensional data in C++ and R. Journal of Statistical Software, 77(1). [paper]