Closed overxp closed 2 months ago
W_cont_el <- spdep::poly2nb(data, queen=T)#queen为T,单个顶点也算相邻 W_cont_el_mat <- spdep::nb2listw(W_cont_el, style="W", zero.policy=TRUE)#zero.policy允不允许无邻居的出现 depression_spade = spade(y1 ~ x1+x4 + x8 + x10, data = data, wt = W_cont_el_mat, cores = 12) 换为基本的mat的报错是 Error in checkForRemoteErrors(val) : 12 nodes produced errors; first error: 量度数目不正确
Three suggestions:
wt
in spade
and idsa
needs to be of the matrix
type in R. I recommend using the sdsfun
package I developed to generate spatial weight matrices for sf
objects.Best regards!
Thanks!But here is a new qustion.I have fix my code as you said, but it still does't work. wt3 = sdsfun::inverse_distance_swm(final_data) depression_spade = spade(y1 ~. , discvar = names(select(final_data,-c(y1))), data = final_data, wt = wt3, cores = 1)
There seems to be something wrong with my data. Maybe there shouldn't be any gaps in my data
You can send the data to my email address, lyu.geosocial@gmail.com
, and I will help you check the issue.
Error in checkForRemoteErrors(val) : 7 nodes produced errors; first error: 非整合陈列
我的数据是西安市的一部分市区数据