On Mon, 30 Mar 2009, Adalberto Pineda wrote:

Thank you for your replies but it's my understanding that (for an adaptive 
model) the percentage
should be entered at the "adapt" argument (based on the spgwr package manual 
and Roger's reply
to this posting: 
https://stat.ethz.ch/pipermail/r-sig-geo/2005-August/000535.html).

Also, the gwr function won't run on my data if I try bandwith = percentage.
This is the error I get:
"Error in print.gwr(list(SDF = <S4 object of class "SpatialPointsDataFrame">,  :
 subscript out of bounds"

Could you confirm me on this?

Until you can make gwr.sel() work, this is irrelevant. Please rescale your model until such time that gwr.sel() does converge, then read the gwr() help page properly - that (and the code) is the confirmation. First get rid of the 1e14 CVS scores!

Roger


-- Adalberto.


Adalberto Pineda
Data Analytics Specialist
MDA Dataquick
9620 Towne Centre Dr.
San Diego, CA. 92121.



-----Original Message-----
From: Roger Bivand [mailto:roger.biv...@nhh.no]
Sent: Saturday, March 28, 2009 8:49 AM
To: Corey Sparks
Cc: Adalberto Pineda; r-sig-geo@stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Converge problems with spgwr


On Sat, 28 Mar 2009, Corey Sparks wrote:


The problems is that you are sending the bandwidth (percentage) to the wrong
argument of gwr

try:
coords<-cbind(data$X_COORD, data$Y_COORD)
percentage<-gwr.sel(Y ~ X1 + X2, data = data, coords = coords, adapt=TRUE,
longlat=TRUE)
adaptive.model<-gwr(Y ~ X1 + X2, data = data, coords = coords, adapt=TRUE,
bandwidth=percentage, longlat=TRUE)

that should do the trick

In addition, the model does have a major scaling problem, as can be seen
by the CVS scores. Consider re-scaling the variables in the model, and you
may find that gwr.sel() has an easier time.

Roger

Corey

I'm trying to fit an adaptive GWR model using the spgwr package but ran into
some problems.
Specifically, what I'm trying to do is to plug the optimal percentage
generated by the gwr.sel function into the gwr function.
This is my model's layout:

coords<-cbind(data$X_COORD, data$Y_COORD)
percentage<-gwr.sel(Y ~ X1 + X2, data = data, coords = coords, adapt=TRUE,
longlat=TRUE)
adaptive.model<-gwr(Y ~ X1 + X2, data = data, coords = coords,
adapt=percentage, longlat=TRUE)

But the gwr.sel function won't pass a value to the gwr function.  It seems
that gwr.sel fails to converge.  It just stops without giving any error
messages.
This is the output I've got:

Adaptive q: 0.381966 CV score: 4.635847e+14
Adaptive q: 0.618034 CV score: 4.969922e+14
Adaptive q: 0.236068 CV score: 4.256574e+14
Adaptive q: 0.1458980 CV score: 3.818798e+14
Adaptive q: 0.09016994 CV score: 3.386485e+14
Adaptive q: 0.05572809 CV score: 2.959508e+14
Adaptive q: 0.03444185 CV score: 2.516265e+14

Are there any known issues with the gwr.sel function?

Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
College of Public Policy
One UTSA Circle
San Antonio, TX 78239
corey.spa...@utsa.edu

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: roger.biv...@nhh.no

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to