InstrumentalVariableRegression.build_model#

InstrumentalVariableRegression.build_model(X, Z, y, t, coords, priors, vs_prior_type=None, vs_hyperparams=None, binary_treatment=False)[source]#

Specify model with treatment regression and focal regression data and priors.

Parameters:
  • X (ndarray) – Array used to predict our outcome y.

  • Z (ndarray) – Array used to predict our treatment variable t.

  • y (ndarray) – Array of values representing our focal outcome y.

  • t (ndarray) – Array representing the treatment t of which we’re interested in estimating the causal impact.

  • coords (dict[str, Any]) – Dictionary with the coordinate names for our instruments and covariates.

  • priors (dict[str, Any]) – Dictionary of priors for the mus and sigmas of both regressions. Example: priors = {"mus": [0, 0], "sigmas": [1, 1], "eta": 2, "lkj_sd": 2}.

  • vs_prior_type (Optional[Literal['spike_and_slab', 'horseshoe', 'normal']]) – or “horseshoe” or “normal

  • vs_hyperparams (dict[str, Any] | None) – variable selection hyperparameters

  • binary_treatment (bool) – likelihood to be used.

Return type:

None