I need to do a stochastic frontier of a translogarithmic regression. So I used the translogEst function with the data (name "Data") beneath. At the bottom of the code you can see the sfa() I did.
X; BankName; Year; Labor; PhysicalCapital; Loans; Deposits; TotalCosts; TCPK; PLPK
1; "HSBC"  ; 2002; 0.123;            2.19;  1200;     3200;      10.9;   4.9; 0.00089   
estTranslog <- translogEst("TCPK", c("Loans","Deposits", "PLPK", "Loans", "Deposits"), data = Data, shifterNames = NULL, dataLogged = FALSE)
sfaData <- sfa( estTranslog$est
    , data = Data, ineffDecrease = TRUE, truncNorm = TRUE, timeEffect = FALSE, startVal = NULL
    , tol = 0.00001, maxit = 1000, muBound = 2, bignum = 1.0E+16, searchStep = 0.00001, searchTol = 0.001
    , searchScale = NA, gridSize = 0.1, gridDouble = TRUE, restartMax = 10, restartFactor = 0.999, printIter = 0)
  **Value of estTranslog$est**
  Call:
  lm(formula = as.formula(estFormula), data = estData)
  Coefficients:
  (Intercept)          a_1          a_2          a_3          a_4          a_5               b_1_1        b_1_2  
 2.683958     0.161657    -0.020009     0.499711           NA           NA      -0.024701     0.022882  
  b_1_3        b_1_4        b_1_5        b_2_2        b_2_3        b_2_4          b_2_5        b_3_3  
0.001178           NA           NA     0.064574    -0.019852           NA                        NA    -0.075377 
When I run the translogEst function, no problem occurs. But when I run the sfa() the following error appears:
Error in eval(expr, envir, enclos) : object 'y' not found.
This while estTranslog$est returns a lm function and the y variable of this regression can be found in the Data.
How can I fix this error?
