[R-sig-Geo] A surface of GWR predicted values

Fred Ramos |red@r@r@mo@ @end|ng |rom gm@||@com
Tue Nov 12 13:33:18 CET 2019


Dear all,

I`m trying to build a surface with predicted values using gwr.predict. 

When I run the gwr.predict without giving the fitting point it runs without problems. But when I enter with SpatialPointsDataFrame (a point grid) as fitting points the prediction values returns NA. Is there anything that I could do to get these results in the fitting points?


> gwr_test <- gwr.predict(job_density_log~distances+pop_density_log,data=zonas_OD_P_sp,kernel="gaussian",bw=21720)

> gwr_test$SDF
class       : SpatialPointsDataFrame 
features    : 423 
extent      : 292782, 414055.3, 7349266, 7424404  (xmin, xmax, ymin, ymax)
crs         : +proj=utm +zone=23 +south +ellps=intl +units=m +no_defs 
variables   : 5
names       :     Intercept_coef,        distances_coef, pop_density_log_coef,        prediction,    prediction_var 
min values  : -0.958964210431336, -0.000128871984509238,    0.287006700717343, -3.26862056578432,  0.48618073025782 
max values  :   4.17712723602899,  -1.8499577687439e-06,    0.979959974621219,  5.64311734285255, 0.693583031013022 

> gwr_out_grid_test <- gwr.predict(job_density_log~distances+pop_density_log,data=zonas_OD_P_sp,predictdata=grade_g_DF,kernel="gaussian",bw=21720)


> gwr_out_grid_test$SDF
class       : SpatialPointsDataFrame 
features    : 9075 
extent      : 293282, 413282, 7349904, 7423904  (xmin, xmax, ymin, ymax)
crs         : +proj=utm +zone=23 +south +ellps=intl +units=m +no_defs 
variables   : 5
names       :    Intercept_coef,        distances_coef, pop_density_log_coef, prediction, prediction_var 
min values  : -1.18701861474003, -0.000127242449368378,    0.310710138723114,         NA,             NA 
max values  :  4.04479455484814,  2.02812418949068e-06,    0.995539141570355,         NA,             NA 

Many thanks,
Fred. 




Sent from Mail for Windows 10


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list