I have a dataframe with identifier (IDENT), year (time), with their categories (OTEXE) and their department (CDEPT). I want to compute the efficiency score for each observation by year, categories and department. As, efficiency score are benchmarking techniques, it is better to compute it that way and then compare observations with the one more similar.
I've tried this so far:
my_dea <- function(x) Benchmarking::dea(X=as.matrix(x[,c("A", "B", "C", "D")]),
Y=s.matrix(x[["E"]], RTS ="VRS",
ORIENTATION ="out"))
score <- test[, .(eff = my_dea(.SD)), list(IDENT, time, OTEXE, CDEPT)]
c("A", "B", "C", "D")
are input and "E"
is the output. They should be in matrix form.
When i Run this code, I have this :
"ERROR in `[data.frame`test, ,.(eff = my_dea(.SD)), list(IDENT, time, :
object 'IDENT' not found.