# Example 1. Replication of results in Coelli et al. (1998, p.166).
# Cost efficiency model.
data("Coelli_1998")
# Selection of prices: input_prices is the transpose where the prices for inputs are.
input_prices <- t(Coelli_1998[, 5:6])
data_example1 <- make_deadata(Coelli_1998,
ni = 2,
no = 1)
result1 <- model_profit(data_example1,
price_input = input_prices,
rts = "crs",
restricted_optimal = FALSE)
# notice that the option by default is restricted_optimal = TRUE
efficiencies(result1)
# Example 2. Revenue efficiency model.
data("Coelli_1998")
# Selection of prices for output: output_prices is the transpose where the prices for outputs are.
output_prices <- t(Coelli_1998[, 7])
data_example2 <- make_deadata(Coelli_1998,
ni = 2,
no = 1)
result2 <- model_profit(data_example2,
price_output = output_prices,
rts = "crs",
restricted_optimal = FALSE)
# notice that the option by default is restricted_optimal = TRUE
efficiencies(result2)
# Example 3. Profit efficiency model.
data("Coelli_1998")
# Selection of prices for inputs and outputs: input_prices and output_prices are
# the transpose where the prices (for inputs and outputs) are.
input_prices <- t(Coelli_1998[, 5:6])
output_prices <- t(Coelli_1998[, 7])
data_example3 <- make_deadata(Coelli_1998,
ni = 2,
no = 1)
result3 <- model_profit(data_example3,
price_input = input_prices,
price_output = output_prices,
rts = "crs",
restricted_optimal = FALSE)
# notice that the option by default is restricted_optimal = TRUE
efficiencies(result3)
Run the code above in your browser using DataLab