mgwr.gwr.MGWRResults¶
-
class
mgwr.gwr.MGWRResults(model, params, predy, CCT, ENP_j, w, R)[source]¶ Class including common properties for a MGWR model.
- Parameters
- modelMGWR object
pointer to MGWR object with estimation parameters
- paramsarray
n*k, estimated coefficients
- predyarray
n*1, predicted y values
- Sarray
n*n, model hat matrix (if MGWR(hat_matrix=True))
- Rarray
n*n*k, covariate-specific hat matrices (if MGWR(hat_matrix=True))
- CCTarray
n*k, scaled variance-covariance matrix
- warray
n*1, final weight used for iteratively re-weighted least sqaures; default is None
- Attributes
- modelGWR Object
points to GWR object for which parameters have been estimated
- paramsarray
n*k, parameter estimates
- predyarray
n*1, predicted value of y
- yarray
n*1, dependent variable
- Xarray
n*k, independent variable, including constant
- familyfamily object
underlying probability model; provides distribution-specific calculations
- ninteger
number of observations
- kinteger
number of independent variables
- df_modelinteger
model degrees of freedom
- df_residinteger
residual degrees of freedom
- scalefloat
sigma squared used for subsequent computations
- warray
n*1, final weights from iteratively re-weighted least sqaures routine
- resid_responsearray
n*1, residuals of the repsonse
- resid_ssscalar
residual sum of sqaures
- Warray-like
list of n*n arrays, spatial weights matrices for weighting all observations from each calibration point: one for each covariate (k)
- Sarray
n*n, model hat matrix (if MGWR(hat_matrix=True))
- Rarray
n*n*k, covariate-specific hat matrices (if MGWR(hat_matrix=True))
- CCTarray
n*k, scaled variance-covariance matrix
ENPscalareffective number of parameters
- ENP_jarray-like
effective number of paramters, which depends on sigma2, for each covariate in the model
adj_alphaarrayCorrected alpha (critical) values to account for multiple testing during hypothesis testing.
adj_alpha_jarrayCorrected alpha (critical) values to account for multiple testing during hypothesis testing.
tr_Sfloattrace of S (hat) matrix
- tr_STSfloat
trace of STS matrix
R2floatGlobal r-squared value for a Gaussian model.
adj_R2floatAdjusted global r-squared for a Gaussian model.
- aicfloat
Akaike information criterion
- aiccfloat
corrected Akaike information criterion to account to account for model complexity (smaller bandwidths)
- bicfloat
Bayesian information criterio
sigma2floatresidual variance
std_resarraystandardized residuals
bsearraystandard errors of Betas
- influarray
n*1, leading diagonal of S matrix
- CooksDarray
n*1, Cook’s D
tvaluesarrayReturn the t-statistic for a given parameter estimate.
- llfscalar
log-likelihood of the full model; see pysal.contrib.glm.family for damily-sepcific log-likelihoods
- muarray
n*, flat one dimensional array of predicted mean response value from estimator
Methods
D2(self)Percentage of deviance explanied.
ENP(self)effective number of parameters
R2(self)Global r-squared value for a Gaussian model.
RSS(self)geographically weighted residual sum of squares
TSS(self)geographically weighted total sum of squares
adj_D2(self)Adjusted percentage of deviance explanied.
adj_R2(self)Adjusted global r-squared for a Gaussian model.
adj_alpha(self)Corrected alpha (critical) values to account for multiple testing during hypothesis testing.
adj_alpha_j(self)Corrected alpha (critical) values to account for multiple testing during hypothesis testing.
bse(self)standard errors of Betas
conf_int(self)Returns the confidence interval of the fitted parameters.
cooksD(self)Influence: leading diagonal of S Matrix
cov_params(self, cov[, exog_scale])Returns scaled covariance parameters
critical_tval(self[, alpha])Utility function to derive the critial t-value based on given alpha that are needed for hypothesis testing
filter_tvals(self[, critical_t, alpha])Utility function to set tvalues with an absolute value smaller than the absolute value of the alpha (critical) value to 0.
get_bws_intervals(self, selector[, level])Computes bandwidths confidence intervals (CIs) for MGWR.
localR2(self)local R square
local_collinearity(self)Computes several indicators of multicollinearity within a geographically weighted design matrix, including:
pDev(self)Local percentage of deviance accounted for.
sigma2(self)residual variance
spatial_variability(self, selector[, …])Method to compute a Monte Carlo test of spatial variability for each estimated coefficient surface.
std_res(self)standardized residuals
summary(self)Print out MGWR summary
tr_S(self)trace of S (hat) matrix
tvalues(self)Return the t-statistic for a given parameter estimate.
use_t(self)bool(x) -> bool
y_bar(self)weighted mean of y
W
adj_pseudoR2
aic
aicc
bic
deviance
df_model
df_resid
global_deviance
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