neighbayes.dgp.simulate_sdem_logit

neighbayes.dgp.simulate_sdem_logit(W=None, gdf=None, n_side=None, lam=0.35, beta=None, theta=None, err_hetero=False, rng=None, seed=None, contiguity='queen', create_gdf=False, geometry_type='polygon', *, unit_effects=None)[source]

Simulate the latent SDEM logit that SDEMLogit fits.

DGP

y* = X beta + WX theta + (I - lam W)^{-1} eps, eps iid standard logistic, y = 1(y* > 0); WX lags every covariate but the intercept.

param W:

As for simulate_sem_logit().

param gdf:

As for simulate_sem_logit().

param n_side:

As for simulate_sem_logit().

param contiguity:

As for simulate_sem_logit().

param lam:

As for simulate_sem_logit().

param err_hetero:

As for simulate_sem_logit().

param rng:

As for simulate_sem_logit().

param seed:

As for simulate_sem_logit().

param create_gdf:

As for simulate_sem_logit().

param geometry_type:

As for simulate_sem_logit().

param beta:

Coefficients including intercept. Defaults to [0.3, 1.0].

type beta:

np.ndarray, optional

param theta:

Coefficients of the lagged covariates. Defaults to 0.5 each.

type theta:

np.ndarray, optional

returns:

Dict with keys y, X, W_sparse, W_graph, eta_true (the latent utility y*) and params_true.

rtype:

dict or geopandas.GeoDataFrame