peers {Benchmarking}R Documentation

Find peer firms and units


The function peers finds for each firm its peers, get.number.peers finds for each peer the number of times this peer apears as a peer, and get.which.peers determines for one or more peers the firms they apear as peers for. Also include a function get.peers.lambda to calculate for fimrs the importances (lambdas) of peers.


  peers(object, NAMES = FALSE, N=1:dim(object$lambda)[1], LAMBDA=0)
  get.number.peers(object, NAMES = FALSE, N=1:dim(object$lambda)[2], LAMBDA=0)
  get.which.peers(object, N = 1:dim(object$lambda)[2], LAMBDA=0)
  get.peers.lambda(object,  N=1:dim(object$lambda)[1], LAMBDA=0)



An object of class Farrell as returned by the functions dea, et al.


If true then names for the peers are returned if names are available otherwise the unit index numbers are used. If NAMES is a list of names with length equal to the number of units then it is used as names for peers.


The firm(s) or peer(s) for which to get the results.


Minimum weight for extracted peers, i.e. the extracted peers have lambda values larger than LAMBDA.


The returned values are index of the firms and can be used by itself, but can also by used as an index for a variable with names of the firms.

The peers returns a matrix with numbers for the peers for each firm; for firms with efficiency 1 the peers are just the firm itself. If there is slack in the evaluation of a firm with efficiency 1, this can be found with a call to slack, either directly or by the argument SLACK when a function dea was called to generate the Farrell object.

The get.number.peers returns the number of firms that a peer serves as a peer for.

The get.peers.lambda returns a list of firms with the peers and corresponding value af lambda.


The return values are firm numbers. If the argument NAMES=TRUE is used in the function peers the return is a list of names of the peers if names for the firms are avilable as rownames.


Peers are defines as firms where the coresponding lambdas are positive.

Note that peers might change between a Farrell object return from dea with SLACK=FALSE and a call with SLACK=TRUE or a following call to the function slack because a peer on the frontier with slack might by the call to dea be seen as a peer for itself whereas this will not happen when slacks are calculated.


Peter Bogetoft and Lars Otto


Peter Bogetoft and Lars Otto; Benchmarking with DEA, SFA, and R; Springer 2011. Sect. 4.6 page 93

See Also



x <- matrix(c(100,200,300,500,100,200,600),ncol=1)
y <- matrix(c(75,100,300,400,25,50,400),ncol=1)

e <- dea(x,y)

# Who are the firms that firm 1 and 4 is peers for
get.which.peers(e, c(1,4))

[Package Benchmarking version 0.29 Index]