I'm a beginner in R and I do not understand much of the solutions in English. I believe, therefore, that a forum in Portuguese can help me.
I have the following database (date):
I'mtryingtorunthecommand:
##inputsandoutputsforanalysisY=data[c('V7','V8')]X=data[c('V3','V4','V5','V6')]W=data[('V2')]##Naiveinput-orientedDEAscoreforthefirst20firmsundervariablereturns-to-scalefirms=1:19di_naive=dea(XREF=X,YREF=Y,X=X[firms,],Y=Y[firms,],model="input", RTS="variable")
di_naive$thetaOpt
## Naive DEA score in cost-minimization model for the first 20 firms under variable returns-to-scale
ci_naive = dea(XREF=X, YREF=Y, X=X[firms,], Y=Y[firms,], W=W[firms,],
model="costmin", RTS="variable")
ci_naive$XOpt
ci_naive$gammaOpt
I am, however, receiving the following error message:
> library("rDEA", lib.loc="~/R/win-library/3.3")
Using the GLPK callable library version 4.47
> data <- read.delim("~/R/win-library/3.3/data.txt", header=FALSE)
> View(data)
> ## inputs and outputs for analysis
> Y = data[c('V7', 'V8')]
> X = data[c('V3', 'V4','V5','V6')]
> W = data[('V2')]
> ## Naive input-oriented DEA score for the first 20 firms under variable returns-to-scale
> firms=1:19
> di_naive = dea(XREF=X, YREF=Y, X=X[firms,], Y=Y[firms,], model="input", RTS="variable")
Error in dea.input(XREF = XREF, YREF = YREF, X = X, Y = Y, RTS = RTS) :
YREF has to be numeric matrix or data.frame.
> di_naive$thetaOpt
Error: object 'di_naive' not found
> ## Naive DEA score in cost-minimization model for the first 20 firms under variable returns-to-scale
> ci_naive = dea(XREF=X, YREF=Y, X=X[firms,], Y=Y[firms,], W=W[firms,],
+ model="costmin", RTS="variable")
Error in dea.costmin(XREF = XREF, YREF = YREF, X = X, Y = Y, W = W, RTS = RTS) :
YREF has to be numeric matrix or data.frame.
> ci_naive$XOpt
Error: object 'ci_naive' not found
> ci_naive$gammaOpt
Error: object 'ci_naive' not found