[R-sig-Geo] Error with gwr.mixed in GWmodel package

Metastate Metastate metastate at gmail.com
Fri Sep 4 01:24:08 CEST 2015


Thank you very much, Dr. Lu.

Regards,

Meta

On Thu, Sep 3, 2015 at 5:24 AM, binbinlu at whu.edu.cn <binbinlu at whu.edu.cn>
wrote:

> Hi Metastate,
>
> Yes, I found there is a problem in the function gwr.mixed, as the Line 119
> code should be :
> SpatialPolygonsDataFrame(Sr=polygons, data=mgwr.df, match.ID=F)
> but the parameter "match.ID=F" is missed.
> I've revised it in the attached code. Currently you can re-source this
> function after loading the package. It will be fine to run you command. I
> will update the code in the next submission of package. Cheers.
>
> Best regards,
>
> Binbin
>
>
>
> *From:* Metastate Metastate <metastate at gmail.com>
> *Date:* 2015-09-03 06:11
> *To:* r-sig-geo <r-sig-geo at r-project.org>
> *Subject:* [R-sig-Geo] Error with gwr.mixed in GWmodel package
> Hi,
>
> 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
> check?
>
> Thank you very much for your help.
>
> Meta
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list