Dear All,
Please consider the code at the end of the email.
Everything is fine in this little example, just I do not know how to
extract the DEA frontier (solid line in the plot).
The reason is that I want to reproduce a more complicated DEA frontier
plot using ggplot2 and I need to understand how I can extract the
frontier data. Alternatively: can anyone reproduce the same plot with ggplot2?
Many thanks

Lorenzo

###########################################à



library(Benchmarking) # load the Benchmarking library

x <- matrix(c(20, 40, 40, 60, 70, 50),ncol=1) #define inputs
y <- matrix(c(20, 30, 50, 40, 60, 20),ncol=1) #define outputs

e_vrs <- dea(x,y, RTS="vrs", ORIENTATION="in")#solve LP problem
eff_dea <- eff(e_vrs) #select efficiency scores from the results in e




dd <- as.data.frame(cbind(x,y))

names(dd) <- c("Input", "Output")
dd$Firm <- LETTERS[1:length(x)]

dd$Input <- as.integer(dd$Input)
dd$Output <- as.integer(dd$Output)

pdf("dea-frontier-vrs.pdf")
par( mar = c(4.5,5, 1, 1) + 0.1)
dea.plot(x,y,RTS="vrs",ORIENTATION="in",txt=LETTERS[1:length(x)],lty="dashed",
        xlab="Input", ylab="Output", fex=2,
         cex=2,cex.lab=2,cex.axis=2)
         dea.plot.frontier(x,y, RTS="vrs", add=T)
         text(10,60, "VRS", cex=2)
         dev.off()

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to