[R-sig-Geo] writing shapefiles using write.pointShape

modern82376 at mypacks.net modern82376 at mypacks.net
Mon Mar 17 03:41:53 CET 2008


-----Original Message-----
>From: Roger Bivand <Roger.Bivand at nhh.no>
>Sent: Mar 16, 2008 4:42 AM
>To: modern82376 at mypacks.net
>Cc: r-sig-geo at stat.math.ethz.ch
>Subject: Re: [R-sig-Geo] writing shapefiles using write.pointShape
>
>On Thu, 13 Mar 2008, modern82376 at mypacks.net wrote:
>
>> I'm also having issues with getting the gw.cov function to work for fit 
>> points. Here's an example, using the same files...
>>
>>> pcavars <- names(surveypts[,4:8])
>>> pcavars
>> [1] "pca1" "PCA2" "PCA3" "PCA4" "PCA5"
>>> surv.cov <- gw.cov(data = surveypts, vars = pcavars, fit.points = fitpix, bw = survey.bw)
>> Error in gw.cov(surveypts, test, fit.points = fitpix, bw = survey.bw) :
>>  unused argument(s) (fit.points = <S4 object of class "SpatialPixels">)
>>
>> As far as I can tell, I'm using the same syntax as in the ggwr function. 
>> Thanks again. =)
>
>?gw.cov will help. The first argument is x= not data=, and fit.points= 
>should be fp=. So
>
>surv.cov <- gw.cov(x=surveypts, vars=pcavars, fp=fitpix, bw=survey.bw)
>
>ought to work. The functions are fairly different (no formula=), so 
>assuming that the arguments have the same names suggests that actually 
>reading the help pages might save time.


Yep, tunnel vision as I said before. I actually do read those help pages, believe it or not. Many times. Finding the difference between calling fp= and fit.points= for the same file is actually easy to overlook. 


>
>Please note that spgwr is only a proof of concept package and does not 
>imply any affirmation of approaches using geographical weights. The 
>approach may be helpful, but following Wheeler and Tiefelsdorf (2005), 
>caution is recommended. Your use of PCAs may help alleviate the induced 
>collinearity in GWR regression coefficients, but please always plot 
>pairs() of the local coefficients!


Thanks Roger, I'll do that. I'm actually evaluating several modelling approaches for large geographic prediction surfaces, and non-stationarity appears to be a very large issue (among others). I wanted to see how gwr compared to some of the other methodologies, and it appeared R was the only way I could evaluate it without having to buy a license. So, yes. You have a newbie in R on board.




More information about the R-sig-Geo mailing list