tessl install tessl/pypi-spreg@1.8.0Spatial econometric regression models for analyzing geographically-related data interactions.
Agent Success
Agent success rate when using this tile
87%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.95x
Baseline
Agent success rate without this tile
92%
Build a system to analyze the simultaneous effects of employment and income across regions using spatial econometric models.
You are tasked with analyzing two interrelated economic outcomes across multiple regions: employment growth and income growth. These outcomes are correlated with each other (cross-equation correlation) and each may exhibit different patterns of spatial spillovers. Your analysis should account for the fact that spatial effects may differ between the two equations.
Build a spatial econometric analysis system that:
Accepts three datasets as input:
Estimates a simultaneous equations model that:
Input data structure:
@generates
def estimate_regional_model(
employment_y, employment_X,
income_y, income_X,
spatial_weights
):
"""
Estimate a spatial SUR model for regional economic analysis.
Parameters
----------
employment_y : array-like
Dependent variable for employment equation
employment_X : array-like
Independent variables for employment equation
income_y : array-like
Dependent variable for income equation
income_X : array-like
Independent variables for income equation
spatial_weights : W object
Spatial weights matrix
Returns
-------
dict
Dictionary containing:
- 'coefficients_eq1': Coefficient estimates for equation 1
- 'coefficients_eq2': Coefficient estimates for equation 2
- 'spatial_param_eq1': Spatial error parameter for equation 1
- 'spatial_param_eq2': Spatial error parameter for equation 2
- 'std_errors_eq1': Standard errors for equation 1
- 'std_errors_eq2': Standard errors for equation 2
"""
passProvides spatial econometric regression models with support for SUR systems.
Provides array operations for numerical computing.
Provides spatial weights matrix functionality.