GithubHelp home page GithubHelp logo

zhaowill / rdea Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jaak-s/rdea

0.0 0.0 0.0 1.34 MB

Data Envelopment Analysis (DEA) package for R with robust unbiased methods.

R 91.34% Shell 0.21% Makefile 0.16% C 8.22% C++ 0.07%

rdea's Introduction

rDEA

Data Envelopment Analysis (DEA) package for R, estimating robust DEA scores without and with environmental variables and doing returns-to-scale tests.

Installation from CRAN

The package can be installed from the official R CRAN by

install.packages("rDEA")

Under Linux make sure you have GLPK installed before, e.g., in Ubuntu you need

sudo apt-get install libglpk-dev

Or if you need to compile GLPK set following environmental variables before installing rDEA

export CPATH=/path/to/include/glpk
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/lib/glpk

Installation from git

Using devtools our package can be installed by (make sure you have libglpk-dev installed)

library(devtools)
install_github("jaak-s/rDEA")

In Linux and Mac another option is to use command line (make sure you have slam, truncreg and truncnorm R packages installed)

git clone https://github.com/jaak-s/rDEA.git
R CMD build rDEA/
R CMD INSTALL rDEA_*.tar.gz

DEA Example

Robust DEA (Simar and Wilson, 1998) with input model with included Japan hospital data

library(rDEA)
## loading Japan hospital data
data("hospitals", package="rDEA")

## choosing inputs and outputs for analysis
firms = 1:50
Y = hospitals[firms, c('inpatients', 'outpatients')]
X = hospitals[firms, c('labor', 'capital')]

## Robust DEA with 1000 bootstrap iterations and variable returns-to-scale
di = dea.robust(X=X, Y=Y, model="input", RTS="variable", B=1000)

## robust estimates of technical efficiency for each hospital
di$theta_hat_hat

Testing installed rDEA package

After installing rDEA package you can run included tests by

library(testthat)
test_package("rDEA")

rdea's People

Contributors

jaak-s avatar gbesstre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.