Learn R Programming

deaR (version 1.2.1)

read_malmquist: read_malmquist

Description

This function creates, from a data frame, a list deadata.

Usage

read_malmquist(datadea,
               nper = NULL,
               percol = NULL,
               arrangement  = c("horizontal", "vertical"),
               ...)

Arguments

datadea

Dataframe with DEA data.

nper

Number of time periods (with dataset in wide format).

percol

Column of time period (with dataset in long format).

arrangement

Horizontal with data in wide format. Vertical with data in long format.

...

Other options to be passed to the read_data function

Value

An object of class deadata

Examples

Run this code
# NOT RUN {
# Example 1. If you have a dataset in wide format.
data("Economy")
data_example <- read_malmquist(datadea = Economy, 
                               nper = 5, 
                               arrangement = "horizontal",
                               ni = 2, 
                               no = 1)
# This is the same as:
data_example <- read_malmquist(datadea = Economy,
                               nper = 5, 
                               arrangement = "horizontal",
                               inputs = 2:3, 
                               outputs = 4)
# Example 2. If you have a dataset in long format.
data("EconomyLong")
data_example2 <- read_malmquist(EconomyLong,
                                percol = 2, 
                                arrangement = "vertical",
                                inputs = 3:4, 
                                outputs = 5)

# }

Run the code above in your browser using DataLab