找到给定原点范围的伽马分布的形状和比例

时间:2016-04-12 15:16:27

标签: bayesian gamma-distribution

下面粘贴的是文章的补充材料。作者说,在找到家庭范围值后," gamma(13,10)很好地涵盖了这个"。作者如何找到13和10?

# Moldenhauer and Regelski (1996) state that home range size typically
# ranges from 0.08-0.65 ha, which equates to a radius of
sqrt(0.08/pi*10000) # 15.96 m or
sqrt(0.65/pi*10000) # 45.49 m

# Since parulas were detected by song, let's be safe
# and add a minimum and maximum
# distance at which they could be heard, 50 and 250 m, based upon
# Simons et al. (2009).
# So now we have an area between
(15.96+50)^2*pi / 10000  # 1.37 ha, and
(45.49+250)^2*pi / 10000 # 27.4 ha

# We note that this is a very large range.

# Following Royle et. al (2011), and assuming a
# chi-squared distribution with 2 degrees of freedom,
# the range of sigma is given by
sqrt(1.37*10000/pi)/sqrt(5.99)   # 27 m
sqrt(27.4*10000/pi)/sqrt(5.99)   # 120 m

# In our grid spacing, 1 unit = 50m, so our we want a prior with most
# of the density between:
27/50  # 0.54
121/50 # 2.42

# Gamma(13, 10) covers this nicely
qgamma(c(0.001, 0.5, 0.999), 13, 10)

plot(function(x) dgamma(x, 13, 10), 0, 5, xlim=c(0, 3), ylim=c(0, 1.5))**

1 个答案:

答案 0 :(得分:1)

老实说,我认为这个问题的答案可能只是一堆挥手。如果我之前选择一个伽玛并对该范围有一些直觉,我会找到中值并使其成为伽马分布的平均值。所以对于这个例子,我会做类似的事情:

# Find median of range (which is 1.48)
gamma_med <- median(seq(0.54, 2.42, length.out = 1e6))

伽玛分布有两个参数,γ(a,b)。第一个时刻或平均值可以很容易地计算出来,因为它只是a/b。因此,如果我们希望我们的均值为1.48,我们只需要选择比率等于1.48的形状(a)和比例(b)。最简单的一个是gamma(14.8, 10),但我们可以通过更改这些参数来增加或减少我们的方差(gamma = a/(b^2)的方差)。

以下是两个先验的不同之处,你可以看到伽玛(13,10)更精确。在一天结束的时候,虽然它真的归结为你认为你希望你的先辈是什么样的防御(或者最好你应该使用多个先验来看看它们如何影响你的后部)。

enter image description here