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
SEMProbitfits.DGP¶
y* = X beta + (I - lam W)^{-1} eps,epsiid standard normal,y = 1(y* > 0): the latent SEM. Withunit_effects="random"each unit is observedobs_per_unittimes (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 effectsWis over the units and no GeoDataFrame is returned.- param gdf:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param n_side:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param contiguity:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param lam:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param beta:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param rng:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param seed:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param create_gdf:
As for
simulate_sem_logit(); with unit effectsWis over the units and no GeoDataFrame is returned.- param geometry_type:
As for
simulate_sem_logit(); with unit effectsWis 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 addsunits, each observation’s unit, asSEMProbittakes it.- rtype:
dict or geopandas.GeoDataFrame