Sou iniciante no R e não entendo boa parte das soluções em inglês. Creio, portanto, que um fórum em português possa me ajudar.
Tenho a seguinte base de dados (data):
Estou tentando rodar o comando:
## 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")
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
Estou recebendo, contudo, a seguinte mensagem de erro:
> 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