Spatial econometric regression models for analyzing geographically-related data interactions.
Overall
score
87%
A tool for analyzing housing price data to detect spatial patterns and dependencies using diagnostic tests.
You are building a data analysis tool that helps urban planners and economists determine whether housing prices in a region exhibit spatial patterns. Specifically, the tool should run an initial regression analysis and then perform diagnostic tests to determine if:
The tool should provide clear recommendations based on the test results about which spatial model specifications might be appropriate for the data.
The tool should accept:
The tool should report:
@generates
def analyze_spatial_patterns(y, X, w):
"""
Analyzes housing price data for spatial patterns using diagnostic tests.
Parameters
----------
y : numpy.ndarray
Dependent variable (housing prices), shape (n, 1)
X : numpy.ndarray
Independent variables (property characteristics), shape (n, k)
w : object
Spatial weights matrix defining neighborhood relationships
Returns
-------
dict
Dictionary containing:
- 'error_test': dict with 'statistic' and 'p_value' for spatial error test
- 'lag_test': dict with 'statistic' and 'p_value' for spatial lag test
- 'recommendation': string describing which spatial model (if any) is appropriate
"""
passProvides spatial econometric regression and diagnostic testing capabilities.
Provides array data structures and numerical operations.
Install with Tessl CLI
npx tessl i tessl/pypi-spregdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10