pyblp.Products

class pyblp.Products

Product data structured as a record array.

Attributes in addition to the ones below are the variables underlying \(X_1\), \(X_2\), and \(X_3\).

market_ids

IDs that associate products with markets.

Type

ndarray

firm_ids

IDs that associate products with firms.

Type

ndarray

demand_ids

IDs used to create demand-side fixed effects.

Type

ndarray

supply_ids

IDs used to create supply-side fixed effects.

Type

ndarray

nesting_ids

IDs that associate products with nesting groups.

Type

ndarray

product_ids

IDs that identify products within markets.

Type

ndarray

clustering_ids

IDs used to compute clustered standard errors.

Type

ndarray

ownership

Stacked \(J_t \times J_t\) ownership or product holding matrices, \(\mathscr{H}\), for each market \(t\).

Type

ndarray

shares

Market shares, \(s\).

Type

ndarray

prices

Product prices, \(p\).

Type

ndarray

ZD

Full set of demand-side instruments, \(Z_D\), which typically consists of excluded demand-side instruments and \(X_1^\text{ex}\). If there are any demand-side fixed effects, these instruments will be residualized with respect to these fixed effects.

Type

ndarray

ZS

Full set of supply-side instruments, \(Z_S\), which typically consists of excluded supply-side instruments and \(X_3^\text{ex}\). If there are any supply-side fixed effects, these instruments will be residualized with respect to these fixed effects.

Type

ndarray

ZC

Covariance instruments, \(Z_C\), as in MacKay and Miller (2023).

Type

ndarray

X1

Demand-side linear product characteristics, \(X_1\). If there are any demand-side fixed effects, these characteristics will be residualized with respect to these fixed effects.

Type

ndarray

X2

Demand-side nonlinear product characteristics, \(X_2\).

Type

ndarray

X3

Supply-side product characteristics, \(X_3\). If there are any supply-side fixed effects, these characteristics will be residualized with respect to these fixed effects.

Type

ndarray