<html><head></head><body><div style="color:#000; background-color:#fff; font-family:標楷體, dfkai-sb;font-size:16px"><div>Hi,</div><div dir="ltr">I wanted to plot the spplot of my model residuals. The plot works fine, but the state map does not appear. Code is given below and the data are attached. I would greatly appreciate any help in this.</div><div dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3856">Marvin</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3856"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3856"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3841">library(spgwr)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3842">library(spdep)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3843">library(maps)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3844">library(maptools)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3845">data<-read.csv("try.csv",header=TRUE)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3846">coords=cbind(data$Longitude,data$Latitude)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3847">g.adapt.gauss <- gwr.sel(y~x, data,coords,adapt=TRUE)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3848">res.adpt <- gwr(y~x, data,coords, adapt=g.adapt.gauss)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3849">brks <- c(-0.25, 0, 0.01, 0.025, 0.075)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3850">cols <- grey(5:2/6)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3852">res.adpt$SDF$ols.e <- residuals(lm(y~x, data))</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3853">spplot(res.adpt$SDF, c("ols.e","gwr.e"),main="Residuals")</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508549001317_3854"><br id="yui_3_16_0_ym19_1_1508549001317_3855"></div></div></body></html>