Title: | Diewert and Fox's Method of Value Added Growth Decomposition |
---|---|
Description: | Decomposing value added growth into explanatory factors. A cost constrained value added function is defined to specify the production frontier. Industry estimates can also be aggregated using a weighted average approach. Details about the methodology and data can be found in Diewert and Fox (2018) <doi:10.1093/oxfordhb/9780190226718.013.19> and Zeng, Parsons, Diewert and Fox (2018) <https://www.business.unsw.edu.au/research-site/centreforappliedeconomicresearch-site/Documents/emg2018-6_SZeng_EMG-Slides.pdf>. |
Authors: | Shipei Zeng |
Maintainer: | Shipei Zeng <[email protected]> |
License: | GPL-2 |
Version: | 0.3.6 |
Built: | 2025-01-22 04:26:14 UTC |
Source: | https://github.com/shipei-zeng/dfvad |
Productivity dynamics reflect firm contributions to
productivity growth over periods when firms enter or
exit an industry. dynamics
summarises a series
of decomposition methods that are centred on the contributions
from incumbents, entrants and exits. It applies to other
weighted aggregation measures analogous to aggregate productivity
as well.
dynamics(df, x, s, id, tm, typ = "df")
dynamics(df, x, s, id, tm, typ = "df")
df |
A data frame sorted by the time period column. |
x |
A string indicating the productivity (or analogous measures) column. |
s |
A string indicating the market share column. |
id |
A string indicating the identity column. |
tm |
A string indicating the time period column. |
typ |
Relevant types of productivity dynamics. Options include "df" for Diewert-Fox decomposition (by default), "bhc" for Baily-Hulten-Campbell, "gr" for Griliches-Regev, "fhk" for Foster-Haltiwanger-Krizan, "bg" for Baldwin-Gu, and "mp" for Melitz-Polanec. |
A data frame consisting of the time period and firm contributions.
# Use the built-in data set "firms" # DF decomposition of firm dynamics dym_df <- dynamics(firms, "tfp", "s", "id", "t") # BG decomposition of firm dynamics dym_bg <- dynamics(firms, "tfp", "s", "id", "t", "bg")
# Use the built-in data set "firms" # DF decomposition of firm dynamics dym_df <- dynamics(firms, "tfp", "s", "id", "t") # BG decomposition of firm dynamics dym_bg <- dynamics(firms, "tfp", "s", "id", "t", "bg")
Firm productivity and market shares adopted to demonstrate the decomposition of firm dynamics
firms
firms
A data frame with the following columns:
Firm productivity (or firm performance indicators)
Market shares occupied the firm.
A firm identity column.
A time period column
Zeng, S. (2019). Frontier firms, inefficiency and productivity dynamics. Presented in EMG Workshop 2019, Sydney.
Mining inputs and outputs adopted to demonstrate the decomposition of value added growth.
mining
mining
A data frame with the following columns:
A time period column.
Output prices.
Wages of labour inputs.
Prices of capital services.
Output quantities.
Labour input quantities.
Capital services quantities.
Zeng, S., Parsons, S., Diewert, W. E. and Fox, K. J. (2018). Industry and state level value added and productivity decompositions. Presented in EMG Worshop 2018, Sydney.
Bilateral indexes refer to the case when only two periods are
compared each time. pb_index()
computes price indexes in a
bilateral approach.
pb_index(df, p, qty, id, tm, typ = "f", seq = "ch", bsk = "flx")
pb_index(df, p, qty, id, tm, typ = "f", seq = "ch", bsk = "flx")
df |
A data frame sorted by the time period column. |
p |
A string indicating the price column. |
qty |
A string indicating the quantity column. |
id |
A string indicating the identity column. |
tm |
A string indicating the time period column. Each period must contain two observations at least. |
typ |
Relevant types of price indexes. Options include "f" for Fisher price indexes (by default), "t" for Tornqvist price indexes, "l" for Laspeyres price indexes, and "p" for Paasche price indexes. |
seq |
Index construction sequences when the number of periods is larger than 2. Options include "ch" for chained indexes (by default), and "fb" for fixed base indexes. |
bsk |
The choice of baskets when items are not matched over multiple periods. Options include "flx" (by default) for a flexible basket that varies depending on the maximal number of matched items in two periods each time, and "cst" for a constant basket that takes the maximal number of matched items across all periods. |
A data frame consisting of the time period and price indexes.
# Use the built-in data set "prices" # Laspeyres fixed base indexes with a constant basket df <- prices[[1]] df <- df[order(df[,"t"]),] index1 <- pb_index(df, "p", "q", "id", "t", typ = "l", seq = "fb", bsk = "cst") # Fisher chained indexes with a flexible basket df <- prices[[2]] df <- df[order(df[,"t"]),] index2 <- pb_index(df, "p", "q", "id", "t")
# Use the built-in data set "prices" # Laspeyres fixed base indexes with a constant basket df <- prices[[1]] df <- df[order(df[,"t"]),] index1 <- pb_index(df, "p", "q", "id", "t", typ = "l", seq = "fb", bsk = "cst") # Fisher chained indexes with a flexible basket df <- prices[[2]] df <- df[order(df[,"t"]),] index2 <- pb_index(df, "p", "q", "id", "t")
Multilateral indexes refer to the case when more than two periods
are compared each time. pm_index()
computes price indexes in a
multilateral approach.
pm_index(df, p, qty, id, tm, typ = "geks", len = NULL, lnk = NULL, bsk = "flx", wd = "flx")
pm_index(df, p, qty, id, tm, typ = "geks", len = NULL, lnk = NULL, bsk = "flx", wd = "flx")
df |
A data frame sorted by the time period column. |
p |
A string indicating the price column. |
qty |
A string indicating the quantity column. |
id |
A string indicating the identity column. |
tm |
A string indicating the time period column. Each period must contain two observations at least. |
typ |
Relevant types of price indexes. Options include "geks" for GEKS price indexes (by default), "ccdi" for CCDI price indexes, "wtpd" for the weighted time product dummy method, and "gk" for the Geary-Khamis method. |
len |
Window length for linked indexes using rolling windows. A single window is set as NULL (by default). |
lnk |
Linking position in rolling windows, effective when 'len' is not NULL. If no linking position is provided, it should be set as NULL (by default). Other options include "mean" for mean splices and numbers for specific cases. |
bsk |
The choice of baskets when items are not matched over multiple periods. Options include "flx" (by default) for a flexible basket that varies depending on the maximal number of matched items in two periods each time, and "cst" for a constant basket that takes the maximal number of matched items across all periods. |
wd |
The choice of windows when items are not matched over multiple windows. Options include "flx" (by default) for a flexible window that allows for different items in two windows each time, and "cst" for a constant window that takes the maximal number of matched items across all windows. |
A data frame consisting of the time period and price indexes.
# Use the built-in data set "prices" # matched items df <- prices[[1]] df <- df[order(df[,"t"]),] # GEKS price indexes with a constant basket over periods index1 <- pm_index(df, "p", "q", "id", "t", typ = "geks", bsk = "cst") # unmatched items df_add <- matrix(c(1, 6, 12, 5, 6, 7, 0.5, 0.5, 0.5, 9, 9, 9), nrow=3) df_add <- as.data.frame(df_add) colnames(df_add) <- colnames(df) df <- rbind(df, df_add) df <- df[order(df[,"t"]),] # CCDI price indexes with a flexible basket over periods index2 <- pm_index(df, "p", "q", "id", "t", typ = "ccdi", bsk = "flx") # CCDI price indexes with rolling windows (window length at 11, linking at the first observation) index3 <- pm_index(df, "p", "q", "id", "t", typ = "ccdi", len = 11, lnk = 1) # CCDI price indexes with rolling windows (window length at 11, linking with mean splices) index4 <- pm_index(df, "p", "q", "id", "t", typ = "ccdi", len = 11, lnk = "mean")
# Use the built-in data set "prices" # matched items df <- prices[[1]] df <- df[order(df[,"t"]),] # GEKS price indexes with a constant basket over periods index1 <- pm_index(df, "p", "q", "id", "t", typ = "geks", bsk = "cst") # unmatched items df_add <- matrix(c(1, 6, 12, 5, 6, 7, 0.5, 0.5, 0.5, 9, 9, 9), nrow=3) df_add <- as.data.frame(df_add) colnames(df_add) <- colnames(df) df <- rbind(df, df_add) df <- df[order(df[,"t"]),] # CCDI price indexes with a flexible basket over periods index2 <- pm_index(df, "p", "q", "id", "t", typ = "ccdi", bsk = "flx") # CCDI price indexes with rolling windows (window length at 11, linking at the first observation) index3 <- pm_index(df, "p", "q", "id", "t", typ = "ccdi", len = 11, lnk = 1) # CCDI price indexes with rolling windows (window length at 11, linking with mean splices) index4 <- pm_index(df, "p", "q", "id", "t", typ = "ccdi", len = 11, lnk = "mean")
Prices, quantities, identities and time periods adopted to demonstrate the computation of price indexes.
prices
prices
A list of data frames with the following columns:
A time period column.
An identity column.
A price column.
A quantity column.
These data frames are produced with different elasticities that can be specified by the sub-list names.
Diewert, W.E., and Fox, K. J. 2018. Substitution bias in multilateral methods for CPI construction using scanner data. Discussion Papers 2018-13, School of Economics, the University of New South Wales.
roll_div()
converts level values to growth values for a vector.
roll_div(x)
roll_div(x)
x |
A vector with level values. |
A vector of growth values.
table2 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[2]] roll_div(table2[, "TFP"])
table2 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[2]] roll_div(table2[, "TFP"])
roll_prod()
converts growth values to level values for a vector.
roll_prod(x)
roll_prod(x)
x |
A vector with growth values. |
A vector of level values.
table1 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[1]] roll_prod(table1[, "TFPG"])
table1 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[1]] roll_prod(table1[, "TFPG"])
Explanatory factors of value added decomposition adopted to demonstrate the aggregation over industries.
sector
sector
A data frame with the following columns:
A time period column.
Output prices.
Output quantities.
Net output price indexes.
Input quantity indexes
Input mix indexes.
Value added efficiency indexes.
Technical progress indexes.
Industry codes.
Zeng, S., Parsons, S., Diewert, W. E. and Fox, K. J. (2018). Industry and state level value added and productivity decompositions. Presented in EMG Worshop 2018, Sydney.
This "bottom up" approach uses weighted averages of the sectoral decompositions to provide an approximate decomposition into explanatory components at the aggregate level. Specifically, the Tornqvist index is adopted in the aggregation.
t_weight(y, p, id, t, alpha, beta, gamma, epsilon, tau, data)
t_weight(y, p, id, t, alpha, beta, gamma, epsilon, tau, data)
y |
A string (or a vector of strings) indicating the output quantity columns. |
p |
A string (or a vector of strings) indicating the output price columns. |
id |
A string indicating the industry column. |
t |
A string indicating the time period column. |
alpha |
A string indicating net output price indexes. |
beta |
A string indicating input quantity indexes. |
gamma |
A string indicating input mixe indexes. |
epsilon |
A string indicating value added efficiency indexes. |
tau |
A string indicating technical progress indexes. |
data |
A data frame containing input prices, input quantities, industry identities, the time period, and explanatory factors of value added growth. |
A list containing a growth-value table and a level-value table of explanatory factors for value added growth decomposition. It is sorted by the time period.
Diewert, W. E. and Fox, K. J. (2018). Decomposing value added growth into explanatory factors. In The Oxford Handbook of Productivity Analysis, chapter 19, page 625–662. Oxford University Press: New York.
# Use the built-in dataset "sector" table1 <- t_weight("y", "p", "industry", "year", "alpha", "beta", "gamma", "epsilon", "tau", sector)[[1]] table2 <- t_weight("y", "p", "industry", "year", "alpha", "beta", "gamma", "epsilon", "tau", sector)[[2]]
# Use the built-in dataset "sector" table1 <- t_weight("y", "p", "industry", "year", "alpha", "beta", "gamma", "epsilon", "tau", sector)[[1]] table2 <- t_weight("y", "p", "industry", "year", "alpha", "beta", "gamma", "epsilon", "tau", sector)[[2]]
This method for decomposing nominal value added growth is proposed by Diewert and Fox (2018), which identifies the contributions from efficiency change, growth of primary inputs, changes in output and input prices, technical progress and returns to scale.
value_decom(x, w, y, p, t, data)
value_decom(x, w, y, p, t, data)
x |
A string (or a vector of strings) indicating the quantity columns. |
w |
A string (or a vector of strings) indicating the input price columns. |
y |
A string (or a vector of strings) indicating the the output quantity columns. |
p |
A string (or a vector of strings) indicating the the output price columns. |
t |
A string indicating the time period column. |
data |
A data frame containing input prices, input quantities, output prices, output quantities, and the time period. |
A list containing a growth-value table and a level-value table of explanatory factors for value added growth decomposition. It is sorted by the time period.
Diewert, W. E. and Fox, K. J. (2018). Decomposing value added growth into explanatory factors. In The Oxford Handbook of Productivity Analysis, chapter 19, page 625–662. Oxford University Press: New York.
# Use the built-in dataset "mining" table1 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[1]] table2 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[2]]
# Use the built-in dataset "mining" table1 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[1]] table2 <- value_decom(c("h2","x2"), c("w2","u2"), "y2", "p2", "year", mining)[[2]]