piFuns(unmarked)
piFuns()所属R语言包:unmarked
Compute multinomial cell probabilities
计算多项式单元的概率
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute the cell probabilities used in the multinomial-Poisson
计算单元的概率多项泊松
用法----------Usage----------
removalPiFun(p)
doublePiFun(p)
参数----------Arguments----------
参数:p
matrix of detection probabilities at each site for each observation
在每个站点的检测概率矩阵,对于每个观测
Details
详细信息----------Details----------
These two functions are provided as examples of possible functions to calculate multinomial cell probabilities. Users may write their own functions for specific sampling designs (see the example).
作为可能的功能的例子中所提供的这两个函数,来计算多项式的单元的概率。用户可以编写自己的功能,具体的抽样设计(参见示例)。
值----------Value----------
For removalPiFun, a matrix of cell probabilties for each site and sampling period.
对于removalPiFun为每个站点和取样周期,单元probabilties矩阵。
For doublePiFun, a matrix of cell probabilities for each site and observer combination. Column one is probability observer 1 but not observer 2 detects the object, column two is probability that observer 2 but not observer 1 detects the object, and column 3 is probability of both detecting.
对于doublePiFun,基质单元的概率为每个站点和观察员组合。 1栏是概率观测器1,但没有观测器2检测的对象,列2,观测器2,但没有观测器1检测到的对象的概率,和第3列是两个检测的概率。
实例----------Examples----------
(pRem <- matrix(0.5, nrow=3, ncol=3)) # Capture probabilities[捕获概率]
removalPiFun(pRem) # Cell probs[单元probs]
(pDouble <- matrix(0.5, 3, 2)) # Observer detection probs[观察检测probs]
doublePiFun(pDouble) # Cell probs[单元probs]
# A user-defined piFun calculating removal probs when time intervals differ.[用户定义的piFun计算拆除的probs时的时间间隔不同。]
# Here 10-minute counts were divided into 2, 3, and 5 minute intervals.[这里10分钟计数分为2,3,和5分钟的间隔。]
# This function could be supplied to unmarkedFrameMPois along with the obsToY[此功能可以沿与obsToY供给到unmarkedFrameMPois]
# argument shown below.[参数如下所示。]
instRemPiFun <- function(p) {
M <- nrow(p)
J <- ncol(p)
pi <- matrix(NA, M, J)
p[,1] <- pi[,1] <- 1 - (1 - p[,1])^2
p[,2] <- 1 - (1 - p[,2])^3
p[,3] <- 1 - (1 - p[,3])^5
for(i in 2:J) {
pi[,i] <- pi[, i - 1]/p[, i - 1] * (1 - p[, i - 1]) * p[, i]
}
return(pi)
}
instRemPiFun(pRem)
# Associated obsToY matrix required by unmarkedFrameMPois[美联社obsToY矩阵所要求的unmarkedFrameMPois]
o2y <- diag(3) # if y has 3 columns[如果y有3列]
o2y[upper.tri(o2y)] <- 1
o2y
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|