# \donttest{
set.seed(2)
n <- 400
x1 <- rnorm(n); x2 <- rnorm(n)
y <- 6 + 0.5 * x1 + 0.5 * x2 + rnorm(n, 0, 0.3) - abs(rnorm(n, 0, 0.8))
d <- data.frame(y = y, x1 = x1, x2 = x2)
fit <- sfm(y ~ x1 + x2, model_name = "NHN", data = d)
summary(efficiency(fit)) # Battese-Coelli, log scale
summary(efficiency(fit, type = "jlms")) # never above the above
summary(efficiency(fit, type = "mode")) # reaches exactly 1
summary(efficiency(fit, logDepVar = FALSE, newdata = d))
# }
Run the code above in your browser using DataLab