# mgwr.gwr.GWRResults¶

class mgwr.gwr.GWRResults(model, params, predy, S, CCT, w=None)[source]

Basic class including common properties for all GWR regression models

Parameters: model : GWR object pointer to GWR object with estimation parameters params : array n*k, estimated coefficients predy : array n*1, predicted y values S : array n*n, hat matrix CCT : array n*k, scaled variance-covariance matrix w : array n*1, final weight used for iteratively re-weighted least sqaures; default is None model : GWR Object points to GWR object for which parameters have been estimated params : array n*k, parameter estimates predy : array n*1, predicted value of y y : array n*1, dependent variable X : array n*k, independent variable, including constant family : family object underlying probability model; provides distribution-specific calculations n : integer number of observations k : integer number of independent variables df_model : integer model degrees of freedom df_resid : integer residual degrees of freedom offset : array n*1, the offset variable at the ith location. For Poisson model this term is often the size of the population at risk or the expected size of the outcome in spatial epidemiology; Default is None where Ni becomes 1.0 for all locations scale : float sigma squared used for subsequent computations w : array n*1, final weights from iteratively re-weighted least sqaures routine resid_response : array n*1, residuals of the repsonse resid_ss : scalar residual sum of sqaures W : array n*n; spatial weights for each observation from each calibration point S : array n*n, hat matrix CCT : array n*k, scaled variance-covariance matrix ENP : scalar effective number of parameters tr_S : float trace of S (hat) matrix tr_STS : float trace of STS matrix y_bar : array weighted mean of y TSS : array geographically weighted total sum of squares RSS : array geographically weighted residual sum of squares R2 : float R-squared for the entire model (1- RSS/TSS) aic : float Akaike information criterion aicc : float corrected Akaike information criterion to account to account for model complexity (smaller bandwidths) bic : float Bayesian information criterio localR2 : array local R square sigma2 : float residual variance std_res : array standardized residuals bse : array standard errors of Betas influ : array Influence: leading diagonal of S Matrix CooksD : array n*1, Cook’s D tvalues : array Return the t-statistic for a given parameter estimate. adj_alpha : array Corrected alpha (critical) values to account for multiple testing during hypothesis testing. deviance : array n*1, local model deviance for each calibration point resid_deviance : array n*1, local sum of residual deviance for each calibration point llf : scalar log-likelihood of the full model; see pysal.contrib.glm.family for damily-sepcific log-likelihoods pDev : float Local percentage of deviance accounted for. mu : array n*, flat one dimensional array of predicted mean response value from estimator fit_params : dict parameters passed into fit method to define estimation routine predictions : array p*1, predicted values generated by calling the GWR predict method to predict dependent variable at unsampled points ()

Methods

 ENP() effective number of parameters RSS() geographically weighted residual sum of squares TSS() geographically weighted total sum of squares adj_alpha() Corrected alpha (critical) values to account for multiple testing during hypothesis testing. bse() standard errors of Betas conf_int() Returns the confidence interval of the fitted parameters. cooksD() Influence: leading diagonal of S Matrix cov_params(cov[, exog_scale]) Returns scaled covariance parameters critical_tval([alpha]) Utility function to derive the critial t-value based on given alpha that are needed for hypothesis testing filter_tvals([critical_t, alpha]) Utility function to set tvalues with an absolute value smaller than the absolute value of the alpha (critical) value to 0. influ() Influence: leading diagonal of S Matrix localR2() local R square local_collinearity() Computes several indicators of multicollinearity within a geographically weighted design matrix, including: pDev() Local percentage of deviance accounted for. sigma2() residual variance spatial_variability(selector[, n_iters, seed]) Method to compute a Monte Carlo test of spatial variability for each estimated coefficient surface. std_res() standardized residuals summary() Print out GWR summary tr_S() trace of S (hat) matrix tr_STS() trace of STS matrix tvalues() Return the t-statistic for a given parameter estimate. use_t() bool(x) -> bool y_bar() weighted mean of y
 D2 R2 adj_D2 adj_pseudoR2 aic aicc bic deviance df_model df_resid initialize llf llnull normalized_cov_params null null_deviance pearson_chi2 predictions pseudoR2 pvalues resid_anscombe resid_deviance resid_pearson resid_response resid_ss resid_working scale
__init__(model, params, predy, S, CCT, w=None)[source]

Initialize self. See help(type(self)) for accurate signature.