orf

orf: R package

https://github.com/okasag/orf

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

orf: R package

Basic Info
  • Host: GitHub
  • Owner: okasag
  • Language: R
  • Default Branch: master
  • Size: 452 KB
Statistics
  • Stars: 12
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created over 7 years ago · Last pushed almost 4 years ago
Metadata Files
Readme

README.md

CRAN checks

orf: ordered random forests

Welcome to the repository of the R package orf for random forest estimation of the ordered choice models.

Introduction

The R package orf is an implementation of the Ordered Forest estimator as developed in Lechner & Okasa (2019). The Ordered Forest flexibly estimates the conditional probabilities of models with ordered categorical outcomes (so-called ordered choice models). Additionally to common machine learning algorithms the orf package provides functions for estimating marginal effects as well as statistical inference thereof and thus provides similar output as in standard econometric models for ordered choice. The core forest algorithm relies on the fast C++ forest implementation from the ranger package (Wright & Ziegler, 2017).

Installation

In order to install the latest CRAN released version use:

r install.packages("orf", dependencies = c("Imports", "Suggests"))

to make sure all the needed packages are installed as well. Note that if you install the package directly from the source a C++ compiler is required. For Windows users Rtools collection is required too.

Examples

The examples below demonstrate the basic functionality of the orf package.

```r

Ordered Forest

require(orf)

load example data

data(odata)

specify response and covariates

Y <- as.numeric(odata[, 1]) X <- as.matrix(odata[, -1])

estimate Ordered Forest with default settings

orf_fit <- orf(X, Y, num.trees = 1000, mtry = 2, min.node.size = 5, replace = FALSE, sample.fraction = 0.5, honesty = TRUE, honesty.fraction = 0.5, inference = FALSE, importance = FALSE)

print output of the Ordered Forest estimation

print(orf_fit)

show summary of the Ordered Forest estimation

summary(orf_fit, latex = FALSE)

plot the estimated probability distributions

plot(orf_fit)

predict with the estimated Ordered Forest

predict(orf_fit, newdata = NULL, type = "probs", inference = FALSE)

estimate marginal effects of the Ordered Forest

margins(orf_fit, newdata = NULL, eval = "mean", window = 0.1, inference = FALSE) ```

For a more detailed examples see the package vignette.

References

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 117
  • Total Committers: 2
  • Avg Commits per committer: 58.5
  • Development Distribution Score (DDS): 0.111
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
okasag g****a@u****h 104
okasag o****g@g****m 13
Committer Domains (Top 20 + Academic)

Packages

  • Total packages: 1
  • Total downloads:
    • cran 349 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: orf

Ordered Random Forests

  • Versions: 3
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 349 Last month
Rankings
Stargazers count: 15.1%
Dependent packages count: 18.1%
Forks count: 21.0%
Dependent repos count: 24.0%
Average: 27.3%
Downloads: 58.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

orf/DESCRIPTION cran
  • R >= 2.10 depends
  • Rcpp * imports
  • ggplot2 * imports
  • ranger * imports
  • stats * imports
  • utils * imports
  • xtable * imports
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests