Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 1.91 KB

README.md

File metadata and controls

65 lines (41 loc) · 1.91 KB

prescience-r

R package of the Approximate Best Subset Maximum Binary Prediction Rule (PRESCIENCE) proposed by Chen and Lee (2018).

Description of this prediction method and its computation details can be found in the paper: Chen, Le-Yu and Lee, Sokbae (2018), "Best Subset Binary Prediction".

Requirements

The prescience package requires the following three R packages:

  • gurobi
  • slam
  • stats

Important: You must download the Gurobi Optimizer software before being able to install the gurobi package. The Gurobi Optimizer is free under academic liscence. See their official documentation for the software installation guide.

install.packages("slam")
install.packages("stats")
# For the installation of the gurobi package, see http://www.gurobi.com/documentation/.

Installation

The package can be installed from github:

devtools::install_github("cykbennie/prescience-r")

Reference Manual

Refer to the prescience.pdf file for details.

Example

# Load the package
library(prescience)

# Create the PRESCIENCE object
results <- select(auto ~ dcost + cars + dovtt + divtt, data = transportation, nfoc = 1, q = 1, bound = 10, beta0 = 1, tol = NULL, warmstart = TRUE, tau = 1.5, mio = 1, tlim = 86400)

# Summary of PRESCIENCE
summary(results)

# Estimated coefficients of PRESCIENCE
coef(results)

Author

License

This project is licensed under the GNU General Public License v3.0 License - see the LICENSE.md file for details.

Acknowledgments

The codes in this R package are developed based on the Matlab implementation by Le-Yu Chen (https://github.com/LeyuChen/Best-Subset-Binary-Prediction).