Learn R Programming

deaR (version 1.2.1)

is.friends: Friends check.

Description

Checks whether a subset of DMUs is friends or not, according to Tone (2010).

Usage

is.friends(datadea,
             dmu_eval = NULL,
             dmu_ref = NULL,
             rts = c("crs", "vrs", "nirs", "ndrs"),
             tol = 1e-6)

Arguments

datadea

The data, including n DMUs, m inputs and s outputs.

dmu_eval

A numeric vector containing the subset of DMUs to be checked. If NULL (default), all DMUs are considered.

dmu_ref

A numeric vector containing which DMUs are the evaluation reference set. If NULL (default), all DMUs are considered.

rts

A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing) or "ndrs" (non-decreasing).

tol

Numeric, a tolerance margin for checking efficiency.

Value

Returns TRUE if dmu_eval is friends of dmu_ref, and FALSE otherwise.

References

Tone, K. (2010). "Variations on the theme of slacks-based measure of efficiency in DEA", European Journal of Operational Research, 200, 901-907. https://doi.org/10.1016/j.ejor.2009.01.027

See Also

maximal_friends, model_sbmeff

Examples

Run this code
# NOT RUN {
data("PFT1981")
datadea <- read_data(PFT1981, ni = 5, no = 3)
subset1 <- c(15, 16, 17, 19) # Subset of DMUs to be checked
result1 <- is.friends(datadea = datadea,
                      dmu_eval = subset1,
                      dmu_ref = 1:20) # We only consider a cluster formed by the first 20 DMUs
subset2 <- c(15, 16, 17, 20) # Another subset of DMUs to be checked
result2 <- is.friends(datadea = datadea,
                      dmu_eval = subset2,
                      dmu_ref = 1:20) # We only consider a cluster formed by the first 20 DMUs
 
# }

Run the code above in your browser using DataLab