制定固定带宽地理加权回归

时间:2016-02-21 22:22:20

标签: r gwr

我是R的新手,我正在尝试使用由Roger Bivand为R开发的一些代码来计算地理加权回归。请参阅帮助(g​​wr)以讨论代码。在我的教授的帮助下,我能够使用自适应带宽:

库(GWmodel)

DM< -gw.dist(dp.locat = coords)使用

adaptive. adaptive1< - gwr.sel(OnTer_tory~CL + cinc + Allie_thUS + Island + Landlocked,     adapt = TRUE,method =" cv",gweight = gwr.bisquare,coords = coords)

gwr1< - gwr(OnTer_tory~CL + cinc + Allie_thUS + Island + Landlocked,     adapt = adaptive.bs1,gweight = gwr.bisquare,coords = coords,hatmatrix = TRUE)

然而,当我尝试使用固定带宽时: fixed.bs1< - gwr.sel(OnTer_tory~CL + cinc + Allie_thUS + Island + Landlocked,     adapt = FALSE,method =" cv",gweight = gwr.bisquare,coords = coords)

gwr2< - gwr(OnTer_tory~CL + cinc + Allie_thUS + Island + Landlocked,     adapt = fixed.bs1,gweight = gwr.bisquare,coords = coords,hatmatrix = FALSE)

我收到以下错误: gwr2< - gwr(OnTer_tory~CL + cinc + Allie_thUS + Island + Landlocked, + adapt = fixed.bs1,gweight = gwr.bisquare,coords = coords,hatmatrix = FALSE) 错误:(适应< = 1)不是TRUE

我做错了什么?

0 个答案:

没有答案