ggwr                  package:spgwr                  R Documentation

_G_e_n_e_r_a_l_i_s_e_d _g_e_o_g_r_a_p_h_i_c_a_l_l_y _w_e_i_g_h_t_e_d _r_e_g_r_e_s_s_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     The function implements generalised geographically weighted
     regression approach to exploring spatial non-stationarity for
     given global bandwidth and chosen weighting scheme.

_U_s_a_g_e:

     ggwr(formula, data = list(), coords, bandwidth, gweight = gwr.Gauss,
      adapt = NULL, fit.points, family = gaussian, longlat = FALSE, type = 
     c("working", "deviance", "pearson", "response"))

_A_r_g_u_m_e_n_t_s:

 formula: regression model formula as in 'glm'

    data: model data frame as in 'glm', or may be a
          SpatialPointsDataFrame or SpatialPolygonsDataFrame object as
          defined in package 'sp'

  coords: matrix of coordinates of points representing the spatial
          positions of the observations

bandwidth: bandwidth used in the weighting function, possibly
          calculated by 'ggwr.sel'

 gweight: geographical weighting function, at present  'gwr.Gauss()'
          default, or 'gwr.gauss()', the previous default or
          'gwr.bisquare()'

   adapt: either NULL (default) or a proportion between 0 and 1 of
          observations to include in weighting scheme (k-nearest
          neighbours)

fit.points: an object containing the coordinates of fit points; often
          an object from package 'sp'; if missing, the coordinates
          given through the data argument object, or the coords
          argument are used

  family: a description of the error distribution and link function to
          be used in the model, see 'glm'

 longlat: if TRUE, use distances on an ellipse with WGS84 parameters

    type: the type of residuals which should be returned. The
          alternatives are: "working" (default), "pearson", "deviance"
          and "response"

_V_a_l_u_e:

     A list of class gwr: 

     SDF: a SpatialPointsDataFrame (may be gridded) or
          SpatialPolygonsDataFrame object (see package "sp") with
          fit.points, weights, GWR coefficient estimates, R-squared,
          and coefficient standard errors in its "data" slot.

    lhat: Leung et al. L matrix

      lm: Ordinary least squares global regression on the same model
          formula.

bandwidth: the bandwidth used.

this.call: the function call used.

_N_o_t_e:

     The use of GWR on GLM is only at the initial proof of concept
     stage, nothing should be treated as an accepted method at this
     stage.

_A_u_t_h_o_r(_s):

     Roger Bivand Roger.Bivand@nhh.no

_R_e_f_e_r_e_n_c_e_s:

     Fotheringham, A.S., Brunsdon, C., and Charlton, M.E., 2002,
     Geographically Weighted Regression, Chichester: Wiley; <URL:
     http://www.nuim.ie/ncg/GWR/index.htm>

_S_e_e _A_l_s_o:

     'ggwr.sel', 'gwr'

_E_x_a_m_p_l_e_s:

     library(maptools)
     xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1], 
       IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
     bw <- 144.4813
     ## Not run: 
     bw <- ggwr.sel(SID74 ~ I(NWBIR74/BIR74) + offset(log(BIR74)), data=xx,
       family=poisson(), longlat=TRUE)
     ## End(Not run)
     nc <- ggwr(SID74 ~ I(NWBIR74/BIR74) + offset(log(BIR74)), data=xx,
       family=poisson(), longlat=TRUE, bandwidth=bw)
     nc
     ## Not run: 
     nc <- ggwr(SID74 ~ I(NWBIR74/10000) + offset(log(BIR74)), data=xx,
       family=poisson(), longlat=TRUE, bandwidth=bw)
     nc
     nc <- ggwr(SID74 ~ I(NWBIR74/10000) + offset(log(BIR74)), data=xx,
       family=quasipoisson(), longlat=TRUE, bandwidth=bw)
     nc
     ## End(Not run)

