Learn R Programming

Benchmarking (version 0.27)

eff.dens: Estimate and plot density of efficiencies

Description

A method to estimate and plot kernel estimate of (Farrell) efficiencies taken into consideration that efficiencies are bounded either above (input direction) or below (output direction).

Usage

eff.dens(eff, bw = "nrd0")

eff.dens.plot(obj, bw = "nrd0", ..., xlim, ylim, xlab, ylab)

Arguments

eff

Either a list of (Farrell) efficiencies or a Farrell object returned from the method dea.

bw

Bandwith, look at the documentation of density for an explanation.

obj

Either an array of efficiencies or a list returned from eff.dens.

Further arguments to the plot method like line type and line width.

xlim

Range on the x-axis; usualy not needed, just use the defaults.

ylim

Range on the x-axis; usualy not needed, just use the defaults.

xlab

Label for the x-axis.

ylab

Label for the y-axis.

Value

The return from eff.dens is a list list(x,y) with efficiencies and the corresponding density values.

Details

The calculation is based on a reflection method (Silverman 1986, 30) using the default window kernel and defult bandwidth (window width) in the method density.

The method eff.dens.plot plot the density directly, and eff.dens just estimate the numerical density, and the result can then either be plotted by plot, corresponds to eff.dens.plot, or by lines as an overlay on an existing plot.

References

B.W. Silverman (1986), Density Estimation for Statistics and Data Analysis, Chapman and Hall, London.

Examples

Run this code
# NOT RUN {
e <- 1 - rnorm(100)
e[e>1] <- 1
e <- e[e>0]
eff.dens.plot(e)

hist(e, breaks=15, freq=FALSE, xlab="Efficiency", main="")
den <- eff.dens(e)
lines(den,lw=2)
# }

Run the code above in your browser using DataLab