我试图进行地理加权回归。我的第一步是校准内核的带宽
我有一张spatialPointDataFrame
地图。我的命令是:
bw = gwr.sel(T_cub ~ diss + V_code + PestContro+ elevation + Shape_Area + gadash + mataim + plot_p_a+total_spra, data=map, adapt=T,gweight = gwr.Gauss, verbose = TRUE)
此命令不运行...意味着 2 秒后我看到 > 提示,就好像命令已完成但未创建对象一样。有人能告诉我为什么会这样吗?
我已经用过这段代码了几次,突然它不起作用了。
编辑:
map
:
map <- new("SpatialPointsDataFrame", data = structure(list(PlotID = c(13L, 14L, 15L, 37L, 39L, 51L, 61L,91509L, 91510L, 91516L), PestContro = structure(c(2L, 2L, 2L,2L, 2L, 2L, 6L, 1L, 1L, 1L), .Label = c("0", "10", "100", "200","300", "900"), class = "factor"), plot_age = c(8L, 22L, 23L,19L, 19L, 12L, 5L, 7L, 7L, 7L), plot_p_a = c(0.054627144, 0.021972545,0.018041877, 0.037933726, 0.035978017, 0.031114804, 0.023907704,0.031204535, 0.029525752, 0.045545199), Shape_Area = c(20906.16982,72728.91088, 107324.7819, 84843.24252, 84843.24252, 60026.46188,46673.72325, 123981.8226, 123981.8226, 47435.59794), elevation = c(-61.27246094,-61.4387207, -41.54345703, 50, 50, -52.12451172, -86.54638672,26.99243164, 27.40991211, 25.75976563), V_code = structure(c(2L,3L, 3L, 4L, 4L, 3L, 2L, 2L, 2L, 4L), .Label = c("0", "1", "2","3", "7", "8", "9"), class = "factor"), zone = c(2L, 2L, 2L,6L, 6L, 2L, 2L, 4L, 4L, 4L), area_set = c(392484.6976, 392484.6976,392484.6976, 666489.5192, 666489.5192, 726428.781, 617414.3621,1032989.344, 1032989.344, 507222.1632), total_spra = c(4, 6,4, 4, 4, 0, 3, 4, 7, 5), FTD = c(0.6675, 0.0625, 0.2925, 0.235,0.1525, 0.1975, 0.8625, 0.385, 1.38, 4.155), diss = structure(c(3L,4L, 4L, 4L, 4L, 4L, 1L, 3L, 3L, 3L), .Label = c("0", "250", "500","501"), class = "factor"), gadash = c(55610.79697, 202433.9518,91724.32567, 55579.94934, 145509.2588, 37765.23882, 148043.8871,23702.66071, 15801.91494, 97534.54097), mataim = c(7353.668716,2646.823049, 0, 0, 0, 90386.1795, 19270.81368, 250.4597134, 0,15907.30167), other = c(560.3829297, 0, 67645.70787, 0, 0, 64320.80311,185.1030325, 26795.98373, 25001.32536, 0), T_cub = c(0.873944305038565,0.39685026299205, 0.663807197130886, 0.617100579277672, 0.534264865074438,0.582356642255877, 0.951889130981652, 0.727478634879146, 1.11333628152095,1.60764569803454), POINT_X = c(239429.4929, 239093.9939, 238520.4525,146989.141, 146760.1678, 242168.3921, 241103.4751, 200981.8654,200922.1453, 201245.0912), POINT_Y = c(714255.6017, 714481.3177,714802.6609, 588533.366, 588541.2384, 711320.0978, 713158.7321,694496.7121, 694323.5995, 694627.5222)), .Names = c("PlotID","PestContro", "plot_age", "plot_p_a", "Shape_Area", "elevation","V_code", "zone", "area_set", "total_spra", "FTD", "diss", "gadash","mataim", "other", "T_cub", "POINT_X", "POINT_Y"), row.names = c(1L,2L, 3L, 4L, 5L, 6L, 7L, 2169L, 2170L, 2171L), class = "data.frame"), coords.nrs = numeric(0), coords = structure(c(239429.4929, 239093.9939, 238520.4525, 146989.141,146760.1678, 242168.3921, 241103.4751, 200981.8654, 200922.1453,201245.0912, 714255.6017, 714481.3177, 714802.6609, 588533.366,588541.2384, 711320.0978, 713158.7321, 694496.7121, 694323.5995,694627.5222), .Dim = c(10L, 2L), .Dimnames = list(NULL, c("coords.x1","coords.x2"))), bbox = structure(c(146760.1678, 588533.366, 242168.3921, 714802.6609), .Dim = c(2L, 2L), .Dimnames = list(c("coords.x1", "coords.x2"), c("min", "max"))), proj4string = new("CRS", projargs = "+proj=tmerc +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"))