The function fit geographically weighted elliptical regression model to explore the non-stationarity relationshps across differente spatial scales.
gwer.multiscale(
formula,
data,
kernel = "bisquare",
approach = "CV",
adaptive = FALSE,
criterion = "dCVR",
family = Normal,
threshold = 1e-05,
dMats,
p.vals,
theta.vals,
longlat = NULL,
bws0,
bw.seled = rep(F, length(bws0)),
bws.thresholds = rep(0.1, length(dMats)),
bws.reOpts = 5,
spdisp = "local",
verbose = F,
weights,
dispersion = NULL,
na.action = "na.fail",
hatmatrix = T,
control = glm.control(epsilon = 1e-04, maxit = 100, trace = F),
model = FALSE,
x = FALSE,
y = TRUE,
contrasts = NULL,
parplot = FALSE,
max.iterations = 2000,
subset,
offset,
predictor.centered = rep(T, length(bws0) - 1),
nlower = 10,
...
)
regression model formula as in glm
.
model data frame, or may be a SpatialPointsDataFrame or SpatialPolygonsDataFrame as defined in package sp.
function chosen as follows: gaussian: wgt = exp(-.5*(vdist/bw)^2); exponential: wgt = exp(-vdist/bw); bisquare: wgt = (1-(vdist/bw)^2)^2 if vdist < bw, wgt=0 otherwise; tricube: wgt = (1-(vdist/bw)^3)^3 if vdist < bw, wgt=0 otherwise; boxcar: wgt=1 if dist < bw, wgt=0 otherwise
specified by CV for cross-validation approach or by AIC corrected (AICc) approach
defines the type of bandwidth used. either NULL (default) or a proportion between 0 and 1 of observations to include in weighting scheme (k-nearest neighbours).
criterion for determining the convergence of the back-fitting procedure, could be "CVR" or "dCVR", which corespond to the changing value of RSS (CVR) and the differential version (dCVR), respectively; and "dCVR" is used as default.
a description of the error distribution to be used in the model (see family.elliptical
for details of family functions).
threshold value to terminate the back-fitting iteration.
a list of distance matrices used for estimating each specific parameter
a collection of positive numbers used as the power of the Minkowski distance
a collection of values used as angles in radians to rotate the coordinate system
TRUE if point coordinates are longitude-latitude decimal degrees, in which case distances are measured in kilometers. If x is a SpatialPoints object, the value is taken from the object itself.
a vector of initializing bandwidths for the back-fitting procedure, of which the length should equal to the number of paramters if specified
a vector of boolean variables to determine whether the corresponding bandwidth should be re-selected or not: if TRUE, the corresponding bandwiths for the specific parameters are supposed to be given in bws0; otherwise, the bandwidths for the specific parameters will be selected within the back-fitting iterations.
threshold values to define whether the bandwidth for a specific parameter has converged or not
the number times of continually optimizing each parameter-specific bandwidth even though it meets the criterion of convergence, for avoiding sub-optimal choice due to illusion of convergence;
if TRUE dispersion parameter varies geographically.
if TRUE (default) reports the progress of search for bandwidth.
an optional numeric vector of weights to be used in the fitting process.
an optional fixed value for dispersion parameter.
a function which indicates what should happen when the data contain NAs (see glm
).
if TRUE, return the hatmatrix as a component of the result.
a list of parameters for controlling the fitting process. For elliptical
this is passed by glm.control
.
a logical value indicating whether model frame should be included as a component of the return.
a logical value indicating whether the response vector used in the fitting process should be returned as components of the return.
a logical value indicating whether model matrix used in the fitting process should be returned as components of the return.
an optional list. See the contrasts.arg
of model.matrix.default
.
if TRUE the parameters boxplots are plotted.
maximum number of iterations in the back-fitting procedure.
an optional numeric vector specifying a subset of observations to be used in the fitting process.
this can be used to specify an a priori known component to be included in the linear predictor during fitting as in glm
.
a logical vector of length equalling to the number of predictors, and note intercept is not included; if the element is TRUE, the corresponding predictor will be centered.
the minmum number of nearest neighbours if an adaptive kernel is used
arguments to be used to form the default control argument if it is not supplied directly.
returns an object of class “gwer”, a list with follow components:
a SpatialPointsDataFrame (may be gridded) or SpatialPolygonsDataFrame object (see package sp) with fit.points, weights, GWR coefficient estimates, dispersion and the residuals in its data
slot.
the matrices of coefficients, standard errors and significance values for parameters hypothesis test.
either the supplied argument or the estimated dispersion with standard error.
hat matrix of the geographically weighted elliptical model.
elliptical global regression on the same model formula.
a list of results values for fitted geographically weighted elliptical model.
the bandwidth used in geographical weighting function.
the fitted mean values of the geographically weighted elliptical model.
a logical value indicating if hatmatrix was considered
a matrix with the geographical weighting for all local elliptical models.
the family
object used.
a matrix with the fitted values for all local elliptical models.
the adapt
object used.
the gweights
object used.
the spdisp
object used.
the function call used.
the fp.given
object used.
the longlat
object used.
Brunsdon, C., Fotheringham, A. S. and Charlton, M. E. (1996). Geographically weighted regression: a method for exploring spatial nonstationarity. Geographical analysis, 28(4), 281-298. 10.1111/j.1538-4632.1996.tb00936.x
Fang, K. T., Kotz, S. and NG, K. W. (1990, ISBN:9781315897943). Symmetric Multivariate and Related Distributions. London: Chapman and Hall.
# NOT RUN {
data(georgia, package = "spgwr")
fit.formula <- PctBach ~ TotPop90 + PctRural + PctFB + PctPov
gwer.bw.t <- bw.gwer(fit.formula, data = gSRDF, family = Student(3), adapt = TRUE)
msgwr.fit.t <- gwer.multiscale(fit.formula, family = Student(3), data = gSRDF,
bws0 = rep(gwer.bw.t, 5), hatmatrix = TRUE,
adaptive = TRUE)
# }
Run the code above in your browser using DataLab