environmentaltools.spatiotemporal.bme.estimate_bme_regression

environmentaltools.spatiotemporal.bme.estimate_bme_regression(c, z, order, k)[source]

Compute parameter estimates for linear regression with covariance weighting.

Performs generalized least squares regression incorporating spatiotemporal covariance structure.

Parameters:
  • c (pd.DataFrame) – Spatiotemporal coordinates with columns [‘x’, ‘y’, ‘t’].

  • z (np.ndarray or pd.DataFrame) – Data values at coordinates.

  • order (list of int) – Polynomial orders [spatial_order, temporal_order].

  • k (np.ndarray) – Covariance matrix for the data.

Returns:

  • best (np.ndarray) – Estimated regression coefficients.

  • vbest (np.ndarray) – Covariance matrix of coefficient estimates.

  • zest (np.ndarray) – Regression-fitted values at input coordinates.

Notes

Uses the design matrix approach with polynomial terms up to specified orders. Accounts for spatiotemporal correlation through the covariance matrix.