InstrumentalVariableRegression.fit#
- InstrumentalVariableRegression.fit(X, Z, y, t, coords, priors, ppc_sampler=None)[source]#
Draw samples from posterior distribution and potentially from the prior and posterior predictive distributions.
- Parameters:
X (np.ndarray) – Array used to predict our outcome y.
Z (np.ndarray) – Array used to predict our treatment variable t.
y (np.ndarray) – Array of values representing our focal outcome y.
t (np.ndarray) – Array representing the treatment variable.
coords (dict) – Dictionary with coordinate names for named dimensions.
priors (dict) – Dictionary of priors for the model.
ppc_sampler (str, optional) – Sampler for posterior predictive distribution. Can be ‘jax’, ‘pymc’, or None. Defaults to None, so the user can determine if they wish to spend time sampling the posterior predictive distribution independently.
- Returns:
InferenceData object containing the samples.
- Return type:
az.InferenceData