pyblp.ProblemResults.compute_long_run_diversion_ratios

ProblemResults.compute_long_run_diversion_ratios(market_id=None)

Estimate matrices of long-run diversion ratios, \(\bar{\mathscr{D}}\).

In market \(t\), the value in row \(j\) and column \(k \neq j\) is

(1)\[\bar{\mathscr{D}}_{jk} = \frac{s_{k(-j)t} - s_{kt}}{s_{jt}},\]

in which \(s_{k(-j)t}\) is the share of product \(k\) computed with \(j\) removed from the choice set. Long-run diversion ratios for the outside good are reported on diagonals:

(2)\[\bar{\mathscr{D}}_{jj} = \frac{s_{0(-j)t} - s_0}{s_{jt}}.\]

Unlike ProblemResults.compute_diversion_ratios(), this gives the average treatment effect (ATE) version of the diversion ratio. For more information, see Conlon and Mortimer (2018).

Parameters

market_id (object, optional) – ID of the market in which to compute long-run diversion ratios. By default, long-run diversion ratios are computed in all markets and stacked.

Returns

Estimated \(J_t \times J_t\) matrices of long-run diversion ratios, \(\bar{\mathscr{D}}\). If market_id was not specified, matrices are estimated in each market \(t\) and stacked. Columns for a market are in the same order as products for the market. If a market has fewer products than others, extra columns will contain numpy.nan.

Return type

ndarray

Examples