pyblp.build_matrix

pyblp.build_matrix(formulation, data)

Construct a matrix according to a formulation.

Parameters
  • formulation (Formulation) – Formulation configuration for the matrix. Variable names should correspond to fields in data. The absorb argument of Formulation can be used to absorb fixed effects after the matrix has been constructed.

  • data (structured array-like) – Fields can be used as variables in formulation.

Returns

The built matrix.

Return type

ndarray

Examples