【发布时间】:2021-09-11 09:49:00
【问题描述】:
我在 R 中使用 spatstat 包。我正在研究物种分布模型,主要是点过程模型。
我的目标是评估 Gibbs、Log-Gaussian Cox 以及更多点过程的点过程模型的预测性能。
我已将 Gibbs 模型拟合到我的数据和进行预测时
predict(f.ppm, window = W, covariates=present$bio4)
发生错误
协变量中的错误[covnames.needed]:object de type 'S4' non indicable
这意味着无法识别“S4”类型的对象。
present 产生:
class : RasterStack
dimensions : 694, 350, 242900, 5 (nrow, ncol, ncell, nlayers)
resolution : 1000, 1000 (x, y)
extent : 248674.5, 598674.5, 683042.6, 1377043 (xmin, xmax, ymin, ymax)
crs : +proj=utm +zone=31 +ellps=WGS84 +units=m +no_defs
names : bio4, llds, mimq, pet, SV
min values : 10.02888, 4.00000, 95.45561, 1293.52945, 0.00000
max values : 25.00000, 8.00000, 222.91389, 2062.00000, 7.80565
【问题讨论】:
-
您能提供数据吗?请参阅stackoverflow.com/help/minimal-reproducible-example 我认为您的问题来自
present$bio4。它的输出是什么?