DEA records do work with R

In simple terms, dea count TFP is what it means.

 

 

Because there are not many data count dea python is found, do not know how to start, a person with an online code written result is wrong, there are other ways too complicated. Pydea found in a bag, did not see anyone used.

Finally, check a bit and found a mature R package, the function looks very simple, with a little.

Get a long time, but do not count this indicator boyfriend, and he does not know what is the meaning of this indicator, let me count. Well tried to kill him.

Always feel a little class when the teacher said DEA, he said always felt, but could not remember what.

 

###

library (foreign) # can be read directly following format stata12
df  <- read.dta("auto.dta")
library (readstata13) # format can be read stata13.stata14
df  <- read.dta13("auto.dta")



X = firmlevel [, C ( . 6 , 3 )] and # 6 Extraction Column 3

library(readstata13) 
library(Benchmarking)
firmlevel = read.dta13 ( " E: / document / zcy data / 200107 level.dta Firm " , convert.factors = F.)
x=firmlevel[,c(6,3)]
and = firmlevel [, 7 ]
str(firmlevel)
x<- data.frame(a,b)

a<- c(1,2,3)
b<- c(1,2,3)
x<- data.frame(a,b)
y<-c(1,1,1)
E <- DEA (X, Y) # overall result is a list of the parameters necessary to provide any orientation, not provided for, the default on the line
F <-eff (E) # efficiency, the vector is a string, the result is    1 , 0.5 , 0.3333333

 

#####

R first packet, then several indicators, to calculate a multi-parameter function:

https://bbs.pinggu.org/thread-6870668-1-1.html

by(data[c("dbh", "tht", "bolt", "dob")], list(data$no), 
   function(df) {
     f(dfdbh,dfdbh, dftht, dfbolt,dfbolt, dfdob)
   })  


# Besides not tested, first down, do not know what it means that df, after a time of need. The specific situation that the link above.

Guess you like

Origin www.cnblogs.com/wanghaolu/p/12174263.html