[R-sig-Geo] Error with gwr.mixed in GWmodel package
Roger.Bivand at nhh.no
Thu Sep 3 07:57:53 CEST 2015
On Thu, 3 Sep 2015, Metastate Metastate wrote:
> I applied the gwr.basic and gwr.mixed on the same SPDF file using the codes
> below. I got an error message on gwr.mixed:
> Error in SpatialPolygonsDataFrame(Sr = polygons, data = mgwr.df) :
> row.names of data and Polygons IDs do not match
> I had no problem with gwr.basic.
> The code I used was:
> gwr.res2 <- gwr.basic(Yield_Detrend~Tsfc_4_10+PCP_IN_7_8+PCP_IN_4_6,
> data = Yield.spdf.sub,kernel = "bisquare", adaptive = TRUE, bw=50,
> F123.test = TRUE)
> mgwr.res2 <-gwr.mixed(Yield_Detrend~Tsfc_4_10+Pcp_30D_LT_2IN_4+PCP_IN_7_8
> +Elevation, fixed.vars=c("Pcp_30D_LT_2IN_4",
> "Elevation"),data = Yield.spdf.sub,kernel = "bisquare", adaptive =
> TRUE, bw=50, diagnostic=T)
> Also, Is it any easy way I can provide the spdf file if you need it to
Please try to create a complete example with built-in data first. Also
look carefully at your input data - is there anything specific about your
data that the built-in data set doesn't match (eg. a factor covariate?).
Finally, pasting the output of traceback() run immediately after
gwr.mixed() fails may show where in the function the problem arises.
> Thank you very much for your help.
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo