【问题标题】:Specification of distances for calculation of marked variogram计算标记变异函数的距离规范
【发布时间】:2019-08-13 19:12:52
【问题描述】:

在spatstat包中,为什么markvario函数不允许距离大于窗口长度的1/4进行变异函数计算?

markvario(X, correction = c("isotropic", "Ripley", "translate"), r = NULL, method = "密度", ..., normalise=FALSE)

参数 r 是一个数值向量。应评估标记变异函数 gamma(r) 的参数 r 的值。

云杉数据集的窗口长度为 200m,但变异函数图仅显示 50m 之前的距离,甚至将 r 指定为 [0, 200]。

plot(markvario(longleaf,r=seq(0,200, by=0.5))) marked variogram for spruces

【问题讨论】:

    标签: spatstat


    【解决方案1】:

    函数markvario 返回一个类fv 的对象(函数值)。 它实际上是带有附加属性的data.frame。一个属性 告诉plot 命令(发送到plot.fv)推荐的绘图 范围。如果您查看打印输出的底部,您将看到 r 从 0 到 200 运行,但建议的范围是 0 到 50。您覆盖 默认使用 xlim 参数:

    library(spatstat)
    rslt <- markvario(longleaf,r=seq(0,200, by=0.5))
    rslt
    #> Function value object (class 'fv')
    #> for the function r -> gamma(r)
    #> ...........................................................................
    #>       Math.label               
    #> r     r                        
    #> theo  {gamma[]^{iid}}(r)       
    #> trans {hat(gamma)[]^{trans}}(r)
    #> iso   {hat(gamma)[]^{iso}}(r)  
    #>       Description                                       
    #> r     distance argument r                               
    #> theo  theoretical value (independent marks) for gamma(r)
    #> trans translation-corrected estimate of gamma(r)        
    #> iso   Ripley isotropic correction estimate of gamma(r)  
    #> ...........................................................................
    #> Default plot formula:  .~r
    #> where "." stands for 'iso', 'trans', 'theo'
    #> Recommended range of argument r: [0, 50]
    #> Available range of argument r: [0, 200]
    #> Unit of length: 1 metre
    plot(rslt, xlim = c(0, 200))
    

    【讨论】:

    • 很高兴听到。如果您愿意,您可以继续接受答案,这样以后的读者就不会觉得它没有解决。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-03
    • 1970-01-01
    • 1970-01-01
    • 2012-02-18
    • 2016-03-25
    相关资源
    最近更新 更多