[R-sig-Geo] GGWR (family = Poission): Prediction of unknown location

Roger Bivand Roger.Bivand at nhh.no
Wed Feb 22 11:39:37 CET 2012


On Mon, 20 Feb 2012, Zia Ahmed wrote:

> Hello,
> I am trying to predict expected count for a geographical location  (file 
> name:  data_181 - test data)  from a another data set (data_65 - work_data) 
> using GGWR poission model.  Following R code I used.  But No predicted counts 
> were  found  in output SDF  file.  I am new in GGWR.   Help will be 
> appreciated. I attach my data sets here. Thanks

Why would you expect any predicted counts? The help page is admittedly 
misleading, but does not say anywhere that predictions are returned. The 
predictions available for gwr() are speculative at best. Note that GWR is 
a notoriously unreliable technique, and simulation studies indicate that 
it finds pattern in coefficients even when there is none. So any tests are 
doubtful anyway - it should only be used for exploring the data for 
possible missing variables or inappropriate functional forms.

Roger

> Zia
>
> library(spgwr)
> data(data_65)   # work data set
> data(data_181) #  test data set
>
> bw <- ggwr.sel(PopRisk_100TH ~ log10(WAS)*log10(GAS)+ 
> offset(log(population_1000)), coords=cbind(data_65$x, data_65$y),
>      data=data_65, family=poisson())
> coordinates(data.181)<-~x+y
> ggwr.181 <- ggwr(PopRisk_100TH ~ log10(WAS)*log10(GAS) + 
> offset(log(population_1000)), coords=cbind(data.65$x, data.65$y),
>      data=data.65,family=poisson(),bandwidth=bw,type = 
> c("response"),fit.points = data.181)
>
>> ggwr.181$SDF
>
>
> 	sum.w 	X.Intercept. 	log10.wasMean. 	log10.gasMean. 
> log10.wasMean..log10.gasMean. 	dispersion 	response_resids 	x 
> y
> 1 	62.50764 	-2.36702 	1.45678 	-2.42768 
> 5.031622 	1 	NA 	2779558 531287.3
> 2 	63.20595 	-2.36062 	1.451657 	-2.39074 
> 4.995947 	1 	NA 	2767150 575319.5
> 3 	62.87379 	-2.36683 	1.456869 	-2.42598 
> 5.026145 	1 	NA 	2798559 563289.6
> 4 	63.13653 	-2.36322 	1.453891 	-2.4054 
> 5.007724 	1 	NA 	2784218 576455.7
> 5 	62.55473 	-2.36991 	1.459364 	-2.44354 
> 5.042596 	1 	NA 	2807095 	546223
> 6 	62.85015 	-2.36264 	1.453169 	-2.40282 
> 5.009307 	1 	NA 	2762510 547772.6
> 7 	62.67004 	-2.36523 	1.455308 	-2.4175 
> 5.022374 	1 	NA 	2773146 538941.8
> 8 	62.40817 	-2.36266 	1.452969 	-2.40357 
> 5.013347 	1 	NA 	2745574 520650.3
> 9 	62.02654 	-2.36357 	1.453601 	-2.40908 
> 5.020167 	1 	NA 	2739576 502023.7
> 10 	63.01464 	-2.35797 	1.449239 	-2.37628 
> 4.9865 	1 	NA 	2739005 557044.6
> 11 	62.8022 	-2.35943 	1.450378 	-2.38489 
> 4.995307 	1 	NA 	2739341 542981.4
> 12 	62.95506 	-2.36003 	1.45098 	-2.38804 
> 4.996592 	1 	NA 	2749492 553074.4
>
>
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list