# Example 1. With dataset in wide format.
# Replication of results in Wang and Lan (2011, p. 2768)
data("Economy")
data_example <- make_malmquist(datadea = Economy,
nper = 5,
arrangement = "horizontal",
ni = 2,
no = 1)
result <- malmquist_index(data_example, orientation = "io")
mi <- result$mi
effch <- result$ec
tech <- result$tc
# Example 2. With dataset in long format.
# Replication of results in Wang and Lan (2011, p. 2768)
data("EconomyLong")
data_example2 <- make_malmquist(EconomyLong,
percol = 2,
arrangement = "vertical",
inputs = 3:4,
outputs = 5)
result2 <- malmquist_index(data_example2, orientation = "io")
mi2 <- result2$mi
effch2 <- result2$ec
tech2 <- result2$tc
# Example 3. Replication of results in Grifell-Tatje and Lovell (1999, p. 100).
data("Grifell_Lovell_1999")
data_example <- make_malmquist(Grifell_Lovell_1999,
percol = 1,
dmus = 2,
inputs = 3,
outputs = 4,
arrangement = "vertical")
result_fgnz <- malmquist_index(data_example,
orientation = "oo",
rts = "vrs",
type1 = "cont",
type2 = "fgnz")
mi_fgnz <- result_fgnz$mi
result_rd <- malmquist_index(data_example,
orientation = "oo",
rts = "vrs",
type1 = "cont",
type2 = "rd")
mi_rd <- result_rd$mi
result_gl <- malmquist_index(data_example,
orientation = "oo",
rts = "vrs",
type1 = "cont",
type2 = "gl")
mi_gl <- result_gl$mi
Run the code above in your browser using DataLab