Geyerモデルをポイントパターンに合わせようとしていますが、問題なく処理できます。しかし、診断プロットを確認したいときに問題が発生します。Geyerモデルのdiagnose.ppmでSmoothed残差をプロットするエラー
Error in as.vector(rasterx.mask(W)) : error in evaluating the argument 'x' in selecting a method for function 'as.vector': Error in validate.mask(w) : w is not a binary mask
再現コードは、次のとおりです。?
library(spatstat)
#generate a pattern
pattern <- rpoispp(300)
#generate a covariate
cov <- rnoise(rgen = rnorm, dimyx=32, mean=2, sd=1, w = pattern$window)
#fit the model
fit <- ppm(pattern ~ cov, Geyer(r = 0.01, s = 0.02))
#plot diagnostics
diag <- diagnose.ppm(fit, type = "pearson", which = "all") #this works
diag <- diagnose.ppm(fit, type = "pearson", which = "smooth") #this doesn't
私は同じ運とtype=
で許可されたすべてのオプションを試してみました
任意のアイデア私が間違っている可能性があります(私はそれが私ですasumeます)またはどのように私はスムーズにそれを得ることができます残りの方法は残っていますか?
素晴らしい!もう一度、ありがとう! –