% tutorial.tex - a short descriptive example of a LaTeX document
%
% For additional information see Tim Love's ``Text Processing using LaTeX''
% http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/
%
% You may also post questions to the newsgroup comp.text.tex
\documentclass[12pt]{article} % For LaTeX 2e
% other documentclass options:
% draft, flee, opening, 12pt
\usepackage{chicago}
\usepackage{graphicx} % insert PostScript figures
\usepackage{setspace} % controllabel line spacing
\usepackage{amsmath,amsthm,amssymb,amstext}
\usepackage{rotating}
%\usepackage[nofiglist,notablist]{endfloat}
%\usepackage{endfloat}
\usepackage{soul}
\usepackage{epsfig}
\usepackage{lscape}
%\usepackage{natbib}
%\usepackage{epstopdf}
%\renewcommand{\efloatseparator}{\mbox{}}
% the following produces 1 inch margins all around with no header or footer
\topmargin =15.mm % beyond 25.mm
\oddsidemargin =0.mm % beyond 25.mm
\evensidemargin =0.mm % beyond 25.mm
\headheight =0.mm %
\headsep =0.mm %
\textheight =220.mm %
\textwidth =165.mm %
%\bibpunct{(}{)}{;}{a}{,}{,}
% SOME USEFUL OPTIONS:
\parindent 10.mm % indent paragraph by this much
\parskip 0.mm % space between paragraphs
% \mathindent 20.mm % indent math equations by this much
\newcommand{\MyTabs}{ \hspace*{25.mm} \= \hspace*{25.mm} \= \hspace*{25.mm} \= \hspace*{25.mm} \= \hspace*{25.mm} \= \hspace*{25.mm} \kill }
\graphicspath{{../Figures/}{../data/:}} % post-script figures here or in /.
% Helps LaTeX put figures where YOU want
\renewcommand{\topfraction}{0.9} % 90% of page top can be a float
\renewcommand{\bottomfraction}{0.9} % 90% of page bottom can be a float
\renewcommand{\textfraction}{0.1} % only 10% of page must to be text
\alph{footnote} % make title footnotes alpha-numeric
%An Empirical Model of Spatial Competition with an Application to
%Cement
%\date{}
% --------------------- end of the preamble ---------------------------
\begin{document} % REQUIRED
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\thispagestyle{empty}
\begin{center}
ECONOMIC ANALYSIS GROUP
DISCUSSION PAPER
\vspace{3.8cm}
Using Cost Pass-Through to Calibrate Demand
\vspace{0.25cm} By \vspace{0.25cm}
\newcommand*\samethanks[1][\value{footnote}]{\footnotemark[#1]}
Nathan H. Miller, Marc Remer and Gloria Sheu* \\
EAG 12-9 $\quad$ October 2012
\end{center}
\vspace{0.45cm}
\small
\noindent EAG Discussion Papers are the primary vehicle used to disseminate research from economists in the Economic Analysis Group (EAG) of the Antitrust Division. These papers are intended to inform interested individuals and institutions of EAG's research program and to stimulate comment and criticism on economic issues related to antitrust policy and regulation. The analysis and conclusions expressed herein are solely those of the authors and do not represent the views of the United States Department of Justice.
\vspace{0.25cm}
\noindent Information on the EAG research program and discussion paper series may be obtained from Russell Pittman, Director of Economic Research, Economic Analysis Group, Antitrust Division, U.S. Department of Justice, BICN 10-000, Washington DC 20530, or by e-mail at russell.pittman@usdoj.gov. Comments on specific papers may be addressed directly to the authors at the same mailing address or at their email address.
\vspace{0.25cm}
\noindent Recent EAG Discussion Paper titles are listed at the end of this paper. To obtain a complete list of titles or to request single copies of individual papers, please write to Janet Ficco at the above mailing address or at janet.ficco@usdoj.gov. In addition, recent papers are now available on the Department of Justice website at http://www.usdoj.gov/atr/public/eag/discussion\_papers.htm. Beginning with papers issued in 1999, copies of individual papers are also available from the Social Science Research Network at www.ssrn.com.
\vspace{0.25cm}
\noindent\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\noindent *Economic Analysis Group, Antitrust Division, U.S. Department of Justice. Email contacts: nathan.miller@usdoj.gov, marc.remer@usdoj.gov, gloria.sheu@usdoj.gov. The views expressed herein are entirely those of the authors and should not be purported to reflect those of the U.S. Department of Justice.
\normalsize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5555555
\newpage
\thispagestyle{empty}
\begin{abstract} % beginning of the abstract
We demonstrate that cost pass-through can be used to inform demand calibration, potentially eliminating the need for data on margins, diversion, or both. We derive the relationship between cost pass-through and consumer demand using a general oligopoly model of Nash-Bertrand competition and develop specific results for four demand systems: linear demand, logit demand, the Almost Ideal Demand System (AIDS), and log-linear demand. The methods we propose may be useful to researchers and antitrust authorities when reliable measures of margins or diversion are unavailable.
\end{abstract} % end of the abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\thispagestyle{empty} \setcounter{page}{1} \onehalfspacing
\section{Introduction}
Researchers in industrial economics frequently conduct counter-factual experiments based on parameterized systems of consumer demand. The functional form of demand is assumed, and the structural parameters are either estimated from data or calibrated. Our focus in this paper is on demand calibration. Heretofore, calibration for differentiated product industries has been thought to require information price-cost margins and consumer diversion, which together are sufficient to recover the structural parameters of many demand systems.\footnote{Consumer diversion from one product to another can be defined as the proportion of consumers leaving the first product, in response to a small price increase, that switch to the second product. Knowledge of quantities and prices is also necessary for calibration. Relative to demand estimation, calibration is more common among antitrust practitioners because it can utilize confidential information that becomes available to the U.S. Department of Justice and the Federal Trade Commission under the Hart-Scott-Rodino Act.}
We develop that cost pass-through can be used to inform demand calibration, potentially obviating the need for margins, diversion, or both. As a motivating example, suppose an economist seeks to calibrate a linear demand system to facilitate merger simulation. Price-cost margins are available so the own-price elasticities of demand are obtainable through first order conditions. Unfortunately, the available data are insufficient to estimate diversion and the documentary evidence is unhelpful. We demonstrate that cross-price elasticities nonetheless can be selected to rationalize cost pass-through, perhaps obtained from documents or estimated with reduced-form regressions of prices on cost factors. In this example, cost pass-through replaces information on diversion in the calibration process.
The connection between cost pass-through and the properties of demand has been emphasized in the recent theoretical literature. \citeN{jaffeweyl2011} propose using cost pass-through to inform the second order properties of demand (i.e., demand curvature) given knowledge of the first order properties (i.e., demand elasticities).\footnote{See also the discussion in \citeN{MRRS2012}.} Our findings flip the intuition: cost pass-through can inform the first order properties of demand provided the economist is willing to assume the functional form of demand and thereby fix the second order properties. In the motivating example of linear demand, cost pass-through is informative because the cross-elasticities of demand for any two products relate to the degree to which the products' prices are strategic compliments, in the sense of \citeN{Bulow1985}, which in turn relates to cost pass-through.
The paper proceeds in three parts. We first derive the relationship between cost pass-through and the properties of demand in a general oligopoly model of Nash-Bertrand competition, following \citeN{jaffeweyl2011}. We then develop how cost pass-through can inform the calibration of four specific demand systems: linear demand, logit demand, the Almost Ideal Demand System (AIDS) of \citeN{deaton1980}, and log-linear demand. These systems are commonly employed in antitrust analysis of mergers involving differentiated products (e.g., \citeN{WFS2004}; \citeN{werdenfroeb2006}). The results provide methods of calibration that may be useful when reliable measures of margins or diversion are unavailable but when cost pass-through can be estimated from data or discerned from other sources. Finally, we provide a numerical example.
%\textbf{from conclusion:} In this paper, we show that information on cost pass-through can substitute for diversion data when calibrating the structural parameters of many common demand systems. As reliable estimates of diversion or, more generally, consumer substitution patterns are often difficult to obtain, our insight offers a viable alternative path towards demand calibration; the pass-through matrix can be estimated via reduced form regression of prices on cost-shifters, and then calibration can proceed with prices, quantities, and margins.
\section{Cost Pass-Through and Demand \label{sec:general}}
Consider a model of Bertrand-Nash competition in which firms face well-behaved and twice-differentiable demand functions. Each firm $i$ produces some subset of the products available to consumers and sets prices to maximize short-run profits, taking as given the prices of its competitors. The first order conditions that characterize firm $i$'s profit-maximizing prices can be expressed
\begin{equation}
f_i (P) \equiv - \left[ \frac{\partial Q_i(P)}{\partial P_i}^T \right]^{-1}Q_i(P) - (P_i - MC_i) =0,
\label{eq:foc1}
\end{equation}
where $Q_i$ is a vector of firm $i$'s sales, $P_i$ is a vector of firm $i$'s prices, $P$ is a vector of all prices, and $MC_i$ is a vector of firm $i$'s marginal cost.
Now suppose that a per-unit tax is levied on each product in the model -- the tax perturbs marginal costs and allows for the derivation of cost pass-through. The post-tax first order conditions are
\begin{equation*}
f(P)+t=0,
\end{equation*}
where $t$ is the vector of taxes and $f(P)= [ f_1(P)^\prime \; f_2(P)^\prime \; \dots ]^\prime $. Differentiating with respect to $t$ obtains
\begin{equation*}
\frac{\partial P}{\partial t} \frac{ \partial f(P)}{\partial P} + I = 0,
\end{equation*}
and algebraic manipulations then yield
\begin{equation}
\frac{ \partial f(P)}{\partial P} = -\left(\frac{\partial P}{\partial t}\right)^{-1} .
\label{eq:ptr}
\end{equation}
Thus, the Jacobian of $f(P)$ equals the opposite inverse of the cost pass-through matrix. This Jacobian depends on both the first and second derivatives of demand, as can be ascertained from equation \ref{eq:foc1}, and it follows that cost pass-through similarly relates to both the first-order and second-order properties of demand.\footnote{See \citeN{MRRS2012} for an explicit derivation of $\partial f(P) / \partial P$. We find it useful to keep in mind that the matrix has dimensionality $N\times N$, where $N$ is the number of products, and takes the form
\[
\frac{\partial f(P)}{\partial P} = \left[ \begin{array}{c c c c} \frac{\partial f_1(P)}{\partial P_1} & \dots & \frac{\partial f_1(P)}{\partial P_{J}} \\
\vdots & \ddots & \vdots \\
\frac{\partial f_J(P)}{\partial P_1} & \dots & \frac{\partial f_J(P)}{\partial P_{J}} \end{array} \right].
\]
where $J$ is the number of firms.}
%Thus, as specified in equation (\ref{eq:ptr}), the Jacobian of $f(P)$ equals the negative inverse of the cost pass-through matrix. That this Jacobian depends on both the first and the second derivatives of demand can be ascertained from equation \ref{eq:foc1}; see \citeN{MRRS2012} for an explicit expression.
\section{General Procedure and Specific Demand Systems \label{sec:examples}}
The premise of this paper is that, provided one is willing to specify the functional form of demand, equation 2 can be used to calibrate the structural demand parameters, i.e., to select demand parameters that rationalize observed cost pass-through.\footnote{Precise calibration requires knowledge of all cost pass-through rates because each element of $\partial f(P) / \partial P$ depends on all the elements of $\partial P / \partial t$.} The procedure identifies at most $N^2$ parameters, where $N$ is the number of products, due to the dimensionality of the matrices in equation \ref{eq:ptr}. Thus, it is conceptually possible for cost pass-through to identify all of the demand elasticities even for demand systems that are fully first-order flexible.
Below we develop how cost pass-through can inform the calibration of four specific demand systems: linear demand, logit demand, the Almost Ideal Demand System (AIDS) of \citeN{deaton1980}, and log-linear demand. A key result is that, in practice, properties of demand that can be identified from cost pass-through depend on the assumed functional form of demand. In what follows, we restrict attention to single-product firms to simplify the exposition; the results can be extended to the multiproduct case though in some cases Slutsky symmetry or other additional assumptions are required.
%The standard method of demand calibration uses data on price, quantity, margins, and diversion and the restrictions imposed by the firms' first-order conditions, equation (\ref{eq:foc1}), to solve for the structural parameters.\footnote{For more detail on traditional demand calibration, see \citeN{MRRS2012}.} Equation (\ref{eq:ptr}) defines $J^2$ additional restrictions, where $J$ is the number of products in the market. By stacking the restrictions defined by the first-order conditions and equation (\ref{eq:ptr}) it is possible, except in special cases, to fully parameterize a demand system with data on prices, quantities, and margins -- thus pass-through can serve as a substitute for diversion.
%Demand systems are typically calibrated using information prices, quantity, margins, and diversion, which can be estimated from data or, in the case of antitrust enforcement, uncovered from firms' internal documentation. With these primitives and the restrictions imposed by firms' profit-maximizing first-order conditions, demand parameters can be calibrated\footnote{For more detail on demand calibration, see \citeN{MRRS2012}.} and counter-factual experiments can be performed. Oftentimes, however, data and documentation are insufficient to produce reliable estimates of diversion or margins.
\subsection{Linear Demand}
The linear demand system has the form
\begin{equation}
Q_i = \alpha_i + \sum_j \beta_{ij} P_j.
\label{lin}
\end{equation}
The parameters to be calibrated include $J$ product-specific intercepts and $J^2$ price coefficients. It can be derived that the elements of the Jacobian of $f(P)$ are
\begin{equation}
\frac{\partial f_i(P)}{\partial P_j } = \left\{ \begin{array}{l l} - 2 & \text{if $i=j$} \\ -\beta_{ij} / \beta_{ii} & \text{otherwise} \\ \end{array} \right.
\label{jlin}
\end{equation}
Cost pass-through identifies at most $J\times (J-1)$ price coefficients in this case because the Jacobian of $f(P)$ has constants along the diagonal.
To calibrate the demand system, the own-price coefficients can be inferred from margins and the firms' first order conditions.\footnote{The first oder conditions provide that $\beta_{ii} = -\frac{Q_i}{P_i} \frac{1}{m_i}$ where $m_i$ is the margin.} The cross-price coefficients then can be identified using cost pass-through and equation \ref{eq:ptr}, and the intercepts can be recovered from price and quantity data. The linear demand system can be calibrated given (1) cost pass-through and (2) margins, prices, and quantity; cost pass-through relieves the need for diversion. Section \ref{sec:ex} provides a numerical example.
%\footnote{In the case of linear demand, once the own-price coefficients have been identified,$\frac{ \partial f(P)}{\partial P}$ is linearly independent, which ensures all of the cross-price terms can be obtained from the pass-through matrix.}
%The standard method calibrates the own-price coefficients based on margins and the Lerner index (i.e., $\beta_{ii} = -\frac{Q_i}{P_i}\frac{1}{m_i}$) and then calibrates the cross-price coefficients based on the own-price coefficients and data on diversion (e.g., $\beta_{ji} = -\beta_{ii} d_{ij} $). The intercepts are selected to return quantities given prices and the price coefficients.
%\footnote{It is sometimes stated that own-cost pass-through is 50 percent for linear demand. That is only the case holding the prices of other products constant -- the true own-cost pass-through rate exceeds 50
%percent with linear demand because prices are strategic complements.}
\subsection{Logit Demand}
The logit demand system has the form
\begin{equation}
Q_i = \frac{e^{(\eta_i - P_i)/\tau}} {\sum_{k} e^{(\eta_k- P_k )/\tau} } M,
\label{logfp}
\end{equation}
where $M$ is the size of the market and the parameters include $J$ product-specific terms ($\eta_i$) and a single scaling/price coefficient ($\tau$). It is standard to normalize the market size to one, so that quantities have the interpretation of being market shares. It can be derived that the elements of the Jacobian of $f(P)$ are
\begin{equation}
\frac{\partial f_i(P)}{\partial P_j } = \left\{ \begin{array}{l l}- \frac{M}{M-Q_i} & \text{if $i=j$} \\ \frac{Q_i Q_j}{(M-Q_i)^2} & \text{otherwise} \\ \end{array} \right.
\end{equation}
The relationship between the quantities and cost pass-through is over-identified; a minimum distance estimator could be invoked to recover the quantities given cost pass-through. The quantities paired with the margin of a single product are sufficient to obtain the demand parameters. Thus, the logit demand system can be calibrated given (1) cost pass-through and (2) prices and a single margin; cost pass-through relieves the need for shares (since logit assumes diversion proportional to share, this is equivalent to relieving the need for diversion).
%Thus, equation (\ref{eq:ptr}) specifies an over-identified relationship between cost pass-through and shares. Therefore, with a fully specified cost pass-through matrix, a minimum distance estimator can be invoked to recover the shares. Then, with data on the margin of a single product and the first-order conditions, $\tau$ and the remaining margins can be recovered. Finally, $\eta_i$ can be calibrated from price data and the logit demand equation. Thus, the logit demand system can be calibrated given (1) cost pass-through and (2) prices and a single margin. Calibration does not requires data on shares; as logit assumes diversion proportional to share, this is analogous to not having estimates of diversion.
\subsection{AIDS Demand}
The AIDS of \citeN{deaton1980} takes the form
\begin{equation}
W_i = \psi_i + \sum_{j} \phi_{ij} \log P_j + \beta_i \log(x/P^*),
\label{eq:aids}
\end{equation}
where $W_i$ is an expenditure share (i.e., $W_i = P_i Q_i / \sum_k P_k Q_k$), $x$ is the total expenditure and $P^*$ is a price index given by
\begin{equation*}
\log(P^*) = \psi_0 + \sum_k \psi_k \log(P_k) + \frac{1}{2} \sum_k \sum_l \phi_{kl} \log(P_k) \log(P_l).
\end{equation*}
We focus on the special case of $\beta_i=0$, consistent with common practice in antitrust applications (e.g, \citeN{epstein1999}). The restriction is equivalent to imposing an income elasticity of one. It can be derived that the elements of the Jacobian of $f(P)$ are
\begin{equation}
\frac{\partial f_i(P)}{\partial P_j } = \left\{ \begin{array}{l l} \frac{\phi_{ii} (W_i-2 \phi_{ii})}{(\phi_{ii}-W_i)^2} & \text{if $i=j$} \\ - \frac{P_i \phi_{ii} \phi_{ij}}{P_j (\phi_{ii}-W_i)^2} & \text{otherwise} \\ \end{array} \right. .
\label{jaids}
\end{equation}
Cost pass-through is sufficient to identify all $J\times J$ price coefficients provided that expenditure shares and prices are available. To illustrate, the own-price coefficients are obtainable from the diagonal elements of $\partial f(P) / \partial P$ and expenditure shares. The cross-price coefficients then are obtainable from the off-diagonal elements and prices, and the demand intercepts are obtainable from equation \ref{eq:aids}.\footnote{This result requires that total expenditure be constant with respect to price changes, an assumption that could be reasonable for applications dealing with small price movements. An alternative approach would be to add an elasticity of total expenditure parameter to the model as an extra unknown to calibrate. This elasticity would appear in both the own-price and cross-price terms in equation \ref{jaids}. Then cost pass-through would identify the price coefficients as a function of the added elasticity. Information on one firm's margin could then be used to recover the added elasticity, making use of the firm's first order condition. This derivation is available on request.} Thus, the AIDS can be calibrated fully given (1) cost pass-through and (2) expenditure shares and prices; cost pass-through relieves the need for both margins and diversion.
%In this instance the first order conditions are not necessary to identify the demand parameters, although they could be used as additional over-identifying restrictions.
\subsection{Log-linear Demand}
The log-linear demand system takes the form
\begin{equation}
\ln (Q_i) = \gamma_i + \sum_j \epsilon_{ij} \ln P_j.
\end{equation}
The parameters to be calibrated include $J$ product-specific intercepts and $J^2$ price coefficients; the price coefficients are the own-price and cross-price elasticities of demand. It can be derived that the elements of the Jacobian of $f(P)$ are
\begin{equation}
\frac{\partial f_i(P)}{\partial P_j } = \left\{ \begin{array}{l l} - \frac{1+\epsilon_{ii}}{\epsilon_{ii}} & \text{if $i=j$} \\ 0 & \text{otherwise} \\ \end{array} \right.
\end{equation}
That the Jacobian of $f(P)$ is diagonal reflects the unique property of log-linear demand that prices are neither strategic substitutes nor strategic complements.\footnote{The implied own-cost pass-through rate of firm $i$ is given by $\epsilon_{ii} / (1+\epsilon_{ii})$ and exceeds one for any elasticity consistent with profit maximization. This can be obtained by re-arranging the first order conditions as follows: \[ P_i = \left(\frac{\epsilon_{ii}}{1+\epsilon_{ii}}\right) MC_i, \] and noting that demand elasticities are constant with log-linear demand.} This prevents identification of the cross-price elasticities without information on diversion. Still, the own-price elasticities can be identified with cost pass-through through equation \ref{eq:ptr}. The log-linear demand system can be calibrated fully given (1) cost pass-through and (2) diversion, prices and quantities; cost pass-through relieves the need for margins.
\section{An Example \label{sec:ex}}
Suppose there are three single-product firms, demand is linear, and the following cost pass-through matrix is estimated from data:
\begin{equation*}
\frac{\partial P}{\partial t} = \left[ \begin{array}{c c c c} .58 & .15 & .17 \\
.23 & .61 & .20 \\
.21 & .25 & .61 \end{array} \right].
\end{equation*}
Further suppose that the unit sales of the three firms are 200, 175, and 150, respectively, that prices are \$10, \$9, and \$8, respectively, and that each firm has a 50\% margin. The first order conditions imply that the firms' own-price coefficients are -40, -39, and -38. Placing these own-price coefficients into the Jacobian of $f(P)$, cross-price terms can be selected to equate the Jacobian with the opposite inverse of the pass-through rate matrix. This produces the following price coefficient matrix:
\begin{equation*}
\beta = \left[ \begin{array}{c c c c} -40 & 12 & 18\\
24 & -39 & 19 \\
17 & 27 & -38 \end{array} \right].
\end{equation*}
Combining this matrix with prices and unit sales, following equation \ref{lin}, yields demand intercepts of 342, 137, and 45.
\newpage
\bibliographystyle{chicago}
\bibliography{antitrust-library2}
\clearpage
\appendix
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
In this appendix, we provide an expression for the Jacobian of h(P), which can be used to construct merger pass-through as defined by Jaffe and Weyl (2011). Using the definition $h(P)\equiv f(P)+g(P)$, we have
\begin{equation}
\frac{\partial h(P)}{\partial P} = \frac{\partial f(P)}{\partial P} + \frac{\partial g(P)}{\partial P}.
\end{equation}
The Jacobian of $f(P)$, can be written as:
\begin{equation}
\frac{\partial f(P)}{\partial P} = \left[ \begin{array}{c c c c} \frac{\partial f_1(P)}{\partial p_1} & \dots & \frac{\partial f_1(P)}{\partial p_{N}} \\
\vdots & \ddots & \vdots \\
\frac{\partial f_J(P)}{\partial p_1} & \dots & \frac{\partial f_J(P)}{\partial p_{N}} \end{array} \right],
\end{equation}
where $N$ is the total number of products and $J$ is the number of firms. The vector $P$ includes all prices; we use lower case to refer to the prices of individual products, so that $p_n$ represents the price of product $n$.
In the case that product $n$ is sold by firm $i$,
\begin{equation}
\frac{\partial f_i(P)}{\partial p_n} = - \left[\begin{array}{c} 0 \\ \vdots \\ 1 \\0 \\ \vdots \end{array} \right] + \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial^2 Q_i}{\partial P_i \partial p_n}^T \right] \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} Q_i - \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial Q_i}{\partial p_n} \right],
\end{equation}
where $Q_i$ and $P_i$ are vectors representing the quantities and prices respectively of the products owned by firm $i$, and the initial vector of constants has a 1 in the firm-specific index of the product $n$. For example, if product 5 is the third product of firm 2, then the $1$ will be in the 3$^{rd}$ index position when calculating $\partial f_2(P) / \partial p_5$.
If product $n$ is not sold by firm $i$, the vector of constants is $\vec{0}$, and thus
\begin{equation}
\frac{\partial f_i(P)}{\partial p_n} = \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial^2 Q_i}{\partial P_i \partial p_n}^T \right] \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} Q_i - \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial Q_i}{\partial p_n} \right] .
\end{equation}
The matrix $\partial g(P) / \partial P$ can be decomposed in a similar manner:
\begin{equation}
\frac{\partial g(P)}{\partial P} = \left[ \begin{array}{c c c c} \frac{\partial g_1(P)}{\partial p_1} & \dots & \frac{\partial g_1(P)}{\partial p_{N}} \\
\vdots & \ddots & \vdots \\
\frac{\partial g_K(P)}{\partial p_1} & \dots & \frac{\partial g_K(P)}{\partial p_{N}} \\
& & \\0 & \dots & 0 \\ \downarrow & & \downarrow \end{array} \right],
\end{equation}
where $N$ is the number of products and $K$ is the number of merging firms. Notice that $\partial g(P) / \partial P$ includes zeros for non-merging firms, because the merger does not create opportunity costs for these firms.
In the case that product $n$ is sold by a firm merging with firm $i$ (this does not include firm $i$ itself),
\begin{eqnarray}
\frac{\partial g_i(P)}{\partial p_n} &=& -\left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial Q_j}{\partial P_i }^T \right] \left[\begin{array}{c} 0 \\ \vdots \\ 1 \\0 \\ \vdots \end{array} \right] \\ &&\quad \nonumber \\ &+& \left( \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial^2 Q_i}{\partial P_i \partial p_n}^T \right] \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[\frac{\partial Q_j}{\partial P_i}^T \right] - \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1}\left[ \frac{\partial^2 Q_j}{\partial P_i \partial p_n}^T \right] \right) (P_j-C_j)\nonumber,
\end{eqnarray}
where $Q_j$, $P_j$, and $C_j$ are vectors of the quantities, prices, and marginal costs respectively of products sold by firms merging with firm $i$, and the vector of 1s and 0s has a 1 in the merging firm's firm-specific index of the product $n$. For example, if product 5 is the third product of firm 2, and firm 2 is merging with firm 1, then the $1$ will be in the 3$^{rd}$ index position when calculating $\partial g_1(P) / \partial p_5$. It is an important distinction that -- supposing there are more than two merging parties -- the index $j$ refers to all of the merging parties' products, excluding firm $i$'s products.
If product $n$ is not sold by any firm merging with firm $i$ (including a product sold by firm $i$),
\begin{equation}
\frac{\partial g_i(P)}{\partial p_n} =\left( \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[ \frac{\partial^2 Q_i}{\partial P_i \partial p_n}^T \right] \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1} \left[\frac{\partial Q_j}{\partial P_i}^T \right] - \left[ \frac{\partial Q_i}{\partial P_i}^T \right]^{-1}\left[ \frac{\partial^2 Q_j}{\partial P_i \partial p_n}^T \right] \right) (P_j-C_j).
\end{equation}