NestedLogit.make_model#

NestedLogit.make_model(X, W, y)[source]#

Build nested logit model.

Parameters:
Xnp.ndarray

Alternative-specific covariates, shape (n_obs, n_alts, n_covariates)

Wnp.ndarray or None

Fixed covariates, shape (n_obs, n_fixed_covariates)

ynp.ndarray

Observed choices, shape (n_obs,)

alphas_nestsbool, optional

Whether to include nest-specific intercepts (default is False)

Returns:
modelpm.Model

PyMC model