neighbayes.dgp.simulate_sem_probit

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

Simulate the SEM probit that SEMProbit fits.

DGP

y* = X beta + (I - lam W)^{-1} eps, eps iid standard normal, y = 1(y* > 0): the latent SEM. With unit_effects="random" each unit is observed obs_per_unit times (default 25) and its effect follows the error process, c = (I - lam W)^{-1} unit_effect_sd v, y ~ Bernoulli(Phi(X beta + c[unit])).

param W:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param gdf:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param n_side:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param contiguity:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param lam:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param beta:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param rng:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param seed:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param create_gdf:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param geometry_type:

As for simulate_sem_logit(); with unit effects W is over the units and no GeoDataFrame is returned.

param err_hetero:

Scale each normal disturbance by sqrt(1 + ||x_i||^2), a heteroskedastic departure from the model; with unit effects, each unit’s effect by the same function of its mean regressors.

type err_hetero:

bool, default False

param obs_per_unit:

The observations of each unit (unit_effects="random" only).

type obs_per_unit:

int, optional

returns:

As for simulate_sem_logit(); with unit effects a dict that adds units, each observation’s unit, as SEMProbit takes it.

rtype:

dict or geopandas.GeoDataFrame