Description Usage Arguments Value References See Also Examples
This function implements a Monte Carlo (randomisation) test to test for significant (spatial) variability of a geographically weighted elliptical regression model's parameters or coefficients.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | gwer.montecarlo(
formula,
family = Normal,
data = list(),
nsims = 99,
kernel = "bisquare",
adaptive = F,
bw,
p = 2,
theta = 0,
dispersion = NULL,
longlat = F,
dMat,
control = glm.control(epsilon = 1e-04, maxit = 100, trace = F)
)
|
formula |
regression model formula of a formula |
family |
a description of the error distribution to be used in the model (see |
data |
an optional data frame, list or environment containing the variables in the model. |
nsims |
the number of randomisations. |
kernel |
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. |
adaptive |
if TRUE calculate an adaptive kernel where the bandwidth (bw) corresponds to the number of nearest neighbours (i.e. adaptive distance); default is FALSE, where a fixed kernel is found (bandwidth is a fixed distance). |
bw |
value of the selected bandwidth used in the weighting function (see |
p |
the power of the Minkowski distance, default is 2 (Euclidean distance). |
theta |
an angle in radians to rotate the coordinate system, default is 0 |
dispersion |
an optional fixed value for dispersion parameter. |
longlat |
if TRUE, great circle distances will be calculated. |
dMat |
a pre-specified distance matrix, it can be calculated by the function |
control |
a list of parameters for controlling the fitting process. This is passed by |
A vector containing p-values for all parameters spatial variability tests
Brunsdon C, Fotheringham AS, Charlton ME (1998) Geographically weighted regression - modelling spatial non-stationarity. Journal of the Royal Statistical Society, Series D-The Statistician 47(3):431-443
bw.gwer
, elliptical
, family.elliptical
1 2 3 4 5 6 7 | data(georgia, package = "spgwr")
fit.formula <- PctBach ~ TotPop90 + PctRural + PctFB + PctPov
gwer.bw.t <- bw.gwer(fit.formula, data = gSRDF, family = Student(4), adapt = TRUE)
gwer.fit.t <- gwer(fit.formula, data = gSRDF, family = Student(4), bandwidth = gwer.bw.t,
adapt = TRUE, parplot = FALSE, hatmatrix = TRUE, spdisp = TRUE,
method = "gwer.fit")
gwer.montecarlo(fit.formula, data = gSRDF, family = Student(3), bw = gwer.bw.t, adaptive = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.