mgwr.gwr.MGWRResults

class mgwr.gwr.MGWRResults(model, params, predy, S, CCT, R, w)[source]

Class including common properties for a MGWR model.

Parameters:
model : MGWR object

pointer to MGWR object with estimation parameters

params : array

n*k, estimated coefficients

predy : array

n*1, predicted y values

S : array

n*n, hat matrix

R : array

n*n*k, partial hat matrices for each covariate

CCT : array

n*k, scaled variance-covariance matrix

w : array

n*1, final weight used for iteratively re-weighted least sqaures; default is None

Attributes:
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

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-like

list of n*n arrays, spatial weights matrices for weighting all observations from each calibration point: one for each covariate (k)

S : array

n*n, hat matrix

R : array

n*n*k, partial hat matrices for each covariate

CCT : array

n*k, scaled variance-covariance matrix

ENP : scalar

effective number of parameters

ENP_j : array-like

effective number of paramters, which depends on sigma2, for each covariate in the model

adj_alpha : array

Corrected alpha (critical) values to account for multiple testing during hypothesis testing.

adj_alpha_j : array

Corrected alpha (critical) values to account for multiple testing during hypothesis testing.

tr_S : float

trace of S (hat) matrix

tr_STS : float

trace of STS matrix

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

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.

llf : scalar

log-likelihood of the full model; see pysal.contrib.glm.family for damily-sepcific log-likelihoods

mu : array

n*, flat one dimensional array of predicted mean response value from estimator

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.
adj_alpha_j() 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 MGWR 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  
ENP_j  
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, R, w)[source]

Initialize class