bayespecon.dgp.generate_flow_data_separable

bayespecon.dgp.generate_flow_data_separable(n=None, G=None, rho_d=0.3, rho_o=0.2, beta_d=None, beta_o=None, **kwargs)[source]

Simulate flow data from a separable SAR flow model.

Identical to generate_flow_data() except the network parameter is derived from the separability constraint \(\rho_w = -\rho_d \rho_o\), so it is not a free argument. Use this function to generate training data for SARFlowSeparable.

Parameters:
n : int

Number of spatial units.

G : libpysal.graph.Graph

Row-standardised spatial graph on n units.

rho_d : float

Destination spatial autoregressive parameter.

rho_o : float

Origin spatial autoregressive parameter.

beta_d : array-like, shape (k,)

Destination-side regression coefficients.

beta_o : array-like, shape (k,)

Origin-side regression coefficients.

**kwargs

Forwarded to generate_flow_data() (e.g. sigma, seed, X, col_names).

Returns:

Same as generate_flow_data(). The "rho_w" entry will equal -rho_d * rho_o.

Return type:

dict