找回密码
 注册
查看: 576|回复: 0

R语言 secr包 empirical.varD()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 23:57:18 | 显示全部楼层 |阅读模式
empirical.varD(secr)
empirical.varD()所属R语言包:secr

                                         Empirical Variance of H-T Density Estimate
                                         H-T密度估计的实证方差

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Compute Horvitz-Thompson-like estimate of population density from a previously fitted spatial detection model, and estimate its sampling variance using the empirical spatial variance of the number observed in replicate sampling units. Wrapper functions are provided for several different scenarios, but all ultimately call derived.nj. The function derived also computes Horvitz-Thompson-like estimates, but it assumes a Poisson or binomial distribution of total number when computing the sampling variance.
计算霍维茨 - 汤普森像估计的人口密度从以前安装的空间检测模型,并估计其使用经验的空间变异观察到的数量在重复抽样单位的抽样误差。包装的功能是提供了几种不同的方案,但最终都调用“derived.nj。的功能derived也可以计算霍维茨 - 汤普森估计,但它假定一个泊松或二项分布总数的计算时的抽样误差。


用法----------Usage----------



derived.nj ( nj, esa, se.esa,  method = "SRS", xy = NULL,
    alpha = 0.05, loginterval = TRUE, area = NULL )

derived.mash ( object, sessnum = NULL,  method = "SRS",
    alpha = 0.05, loginterval = TRUE)

derived.cluster ( object, sessnum = NULL,  method = "SRS",
    alpha = 0.05, loginterval = TRUE)

derived.session ( object,  method = "SRS", xy = NULL,
    alpha = 0.05, loginterval = TRUE )

derived.external ( object, sessnum = NULL, nj, cluster, buffer = 100,
    mask = NULL, noccasions = NULL,  method = "SRS", xy = NULL,
    alpha = 0.05, loginterval = TRUE)




参数----------Arguments----------

参数:object
fitted secr model  
装秘书服务模式


参数:nj
vector of number observed in each sampling unit (cluster)
观察到向量的数目在每个采样单元(聚类)


参数:esa
scalar estimate of effective sampling area (a-hat)
有效取样面积(a-hat)的标量估计


参数:se.esa
estimated standard error of effective sampling area (SE-hat(a-hat))
估计标准误差的有效取样面积(SE-hat(a-hat))


参数:method
character string "SRS" or "local"  
字符串“SRS”或“局部”


参数:xy
dataframe of x- and y- coordinates (method = "local" only)
的x坐标和y坐标的数据框(method = "local"只)


参数:alpha
alpha level for confidence intervals  
α水平置信区间


参数:loginterval
logical for whether to base interval on log(N)
符合逻辑的,是否基于log的时间间隔(N)


参数:area
area of region for method = "binomial" (hectares)  
区域面积的方法=“二项式”(公顷)


参数:sessnum
index of session in object$capthist for which output required  
指数的会话对象capthist的输出需要


参数:cluster
"traps" object for a single cluster
单个聚类的“陷阱”对象


参数:buffer
width of buffer in metres (ignored if mask provided)   
缓冲区的宽度,以米为单位(忽略,如果mask提供)


参数:mask
mask object for a single cluster of detectors  
屏蔽对象的单簇探测器


参数:noccasions
number of occasions (for nj)  
多个场合(为nj)


Details

详细信息----------Details----------

derived.nj accepts a vector of counts (nj), along with a-hat and SE(a-hat).  The argument esa may include both a-hat and SE(a-hat)) - any form will do if it can be coerced to a vector of length 2. In the special case that nj is of length 1, or method takes the values "poisson" or "binomial", the variance is computed using a theoretical variance rather than an empirical estimate. The value of method corresponds to "distribution" in derived, and defaults to "poisson". For method = 'binomial' you must specify area (see Examples).
derived.nj接受矢量计数(nj),随着a-hat和SE(a-hat)。参数esa可能包括两个a-hat和SE(a-hat)) - 任何形式的做,如果它可以强制转换为一个向量长度为2。在特殊情况下,nj是长度为1,或method需要的值的泊松“或”二项式“的理论,而不是一个经验估计方差,方差计算。 method对应于“分配”在derived,默认为“泊松。对于method = 'binomial',“你必须指定area(见例)。

derived.cluster accepts a model fitted to data from clustered detectors; each cluster is interpreted as a replicate sample. It is assumed that the sets of individuals sampled by different clusters do not intersect, and that all clusters have the same geometry (spacing, detector number etc.).
derived.cluster接受从聚类探测器的数据模型拟合被解释为每个聚类复制样本。据推测,套由不同聚类取样的个人不相交,并且所有聚类具有相同的几何形状(间距,检测器数目等)。

derived.mash accepts a model fitted to clustered data that have been "mashed" for fast processing (see mash); each cluster is a replicate sample: the function uses the vector of cluster frequencies (n_j) stored as an attribute of the mashed capthist by mash.
derived.mash接受模型安装到聚类的数据已经“泥”的快速处理(见mash),每个聚类是一个复制的示例:功能采用矢量聚类频率(<X >)存储作为属性的泥n_j的capthist。

derived.external combines detection parameter estimates from a fitted model with a vector of frequencies nj from replicate sampling units configured as in cluster. Detectors in cluster are assumed to match those in the fitted model with respect to type and efficiency, but sampling duration (noccasions), spacing etc. may differ. The mask should match cluster; if mask is missing, one will be constructed using the buffer argument and defaults from make.mask.
derived.external结合检测从拟合模型的参数估计值与频率的向量nj配置为在cluster重复抽样单位。探测器cluster假设相匹配的拟合模型的类型和效率方面,但采样时间(noccasions),间距等可能会有所不同。应符合mask cluster;如果mask缺少,一个将使用从buffermake.mask参数和默认值。

derived.session accepts a single fitted model that must span multiple sessions; each session is interpreted as a replicate sample.
derived.session接受一个单一的拟合模型,必须跨越多个会话,每个会话被解释为复制样本。

Spatial variance may be calculated assuming simple random sampling (method = "SRS") or using the neighbourhood variance estimator recommended by Stevens and Olsen (2003) for generalized random tessellation stratified (GRTS) samples and implemented in package spsurvey (method = "local"). For "local" variance estimates, the centre of each replicate must be provided in xy, except where centres may be inferred from the data.
空间变异可以计算假定简单随机抽样(method = "SRS"),或使用附近史蒂文斯和奥尔森(2003年)为广义随机镶嵌的分层(GRTS)样本方差估计建议和实施包spsurvey( method = "local"“)。对于“本地”的方差估计,该中心必须提供每个重复xy,除了地方可以推断,从数据中心。


值----------Value----------

A dataframe with one row and the columns &ndash;
一个数据框行和列 -


参数:estimate
Horvitz-Thompson-like estimate of population density
霍维茨 - 汤普森估计,人口密度


参数:SE.estimate
SE of density estimate
SE的密度估计


参数:lcl
lower 100(1&ndash;alpha)% confidence limit
降低100(1-α)%置信区间


参数:ucl
upper 100(1&ndash;alpha)% confidence limit
上100(1-α)%置信区间


参数:CVn
relative SE of number observed (across sampling units)  
观察到的数量相对SE(跨抽样单位)


参数:CVa
relative SE of effective sampling area  
有效取样面积的相对SE


参数:CVD
relative SE of density estimate
相对密度估计SE


注意----------Note----------

In versions before 2.1, the functionality of derived.nj and derived.session was provided by empirical.VarD, which has been removed.
在2.1之前的版本,在功能derived.nj和derived.session提供了empirical.VarD,已被删除。

The variance of a Horvitz-Thompson-like estimate of density may be estimated as the sum of two components, one due to uncertainty in the estimate of effective sampling area (a-hat) and the other due to spatial variance in the total number of animals n observed on J replicate sampling units (sum(n_j)). We use a delta-method approximation that assumes independence of the components:
由于有效取样面积的估计的不确定性(a-hat)和其他由于空间方差的总的总和的两个组件,一个可被估计为一个霍维茨 - 汤普森状密度估计的方差动物数量n观察J重复抽样单位(sum(n_j))。我们使用的增量方法近似,假定独立的组件:

where var(n) = J/(J-1).sum((n_j - n/J)^2). The estimate of var(a-hat) is model-based while that of var(n) is design-based. This formulation follows that of Buckland et al. (2001, p. 78) for conventional distance sampling. Given sufficient independent replicates, it is a robust way to allow for unmodelled spatial overdispersion.
var(n) = J/(J-1).sum((n_j - n/J)^2)。的估计var(a-hat)的模型为基础的,而var(n)设计为基础的。这一提法,巴克兰等。 (2001年,第78页),传统的距离取样。足够的独立复制,它是一个可靠的方法来允许非标准的空间偏大。

There is a complication in SECR owing to the fact that a-hat is a derived quantity (actually an integral) rather than a model parameter. Its sampling variance var(a-hat) is estimated indirectly in secr by combining the asymptotic estimate of the covariance matrix of the fitted detection parameters theta with a numerical estimate of the gradient of a(theta) with respect to theta. This calculation is performed in derived.
有一个SECR由于并发症的事实,a-hat是一个派生的数量(实际上是一个不可分割的),而不是一个模型参数。估计的抽样误差var(a-hat)间接secr相结合的渐近估计的协方差矩阵的拟合检测参数theta与一个数字估计的梯度a(theta)尊重theta。这种计算是在derived。


参考文献----------References----------

D. L. and Thomas, L. (2001) Introduction to Distance Sampling: Estimating Abundance of Biological Populations. Oxford University Press, Oxford.
spatially balanced samples of environmental resources. Environmetrics 14, 593&ndash;610.

参见----------See Also----------

derived, esa
derived,esa


实例----------Examples----------



## The `ovensong' data are pooled from 75 replicate positions of a[#ovensong的数据汇集来自75个复制的位置]
## 4-microphone array. The array positions are coded as the first 4[#4-麦克风阵列。被编码为第4的阵列位置]
## digits of each sound identifier. The sound data are initially in the[#数字的每个声音标识符。的声音数据是最初在]
## object `signalCH'. We first impose a 52.5 dB signal threshold as in[#对象signalCH。我们首先施加一个阈值在52.5分贝的信号]
## Dawson &amp; Efford (2009, J. Appl. Ecol. 46:1201--1209). The vector nj[#道森和Efford的(2009年,应用生态学报46:1201  -  1209)。矢量新泽西州]
## includes 33 positions at which no ovenbird was heard. The first and[#包括33个职位在没有ovenbird被听到。在第一和]
## second columns of `temp' hold the estimated effective sampling area[#第二列的温度持有有效取样面积估计]
## and its standard error.[#及其标准误。]

signalCH.525 <- subset(signalCH, cutval = 52.5)
nonzero.counts <- table(substring(rownames(signalCH.525),1,4))
nj <- c(nonzero.counts, rep(0, 75 - length(nonzero.counts)))
temp <- derived(ovensong.model.1, se.esa = TRUE)
derived.nj(nj, temp["esa",1:2])

## The result is very close to that reported by Dawson &amp; Efford[#结果是非常接近该由Dawson Efford的]
## from a 2-D Poisson model fitted by maximizing the full likelihood.[#2-D泊松模型拟合,进一步充分发挥的可能性。]

## If nj vector has length 1, a theoretical variance is used...[#如果新泽西州向量的长度为1,理论方差...]
msk <- ovensong.model.1$mask
A <- nrow(msk) * attr(msk, 'area')
derived.nj (sum(nj), temp["esa",1:2], method = 'poisson')
derived.nj (sum(nj), temp["esa",1:2], method = 'binomial', area = A)

## Not run: [#不运行:]

## Set up an array of small (4 x 4) grids,[#建立一个数组的小网格(4×4),]
## simulate a Poisson-distributed population,[#模拟泊松分布的人口,]
## sample from it, plot, and fit a model.[#样品,它的图,并拟合模型。]
## mash() condenses clusters to a single cluster[#混搭()凝聚到一个单一聚类的聚类]

testregion <- data.frame(x = c(0,2000,2000,0),
    y = c(0,0,2000,2000))
t4 <- make.grid(nx = 4, ny = 4, spacing = 40)
t4.16 <- make.systematic (n = 16, cluster = t4,
    region = testregion)
popn1 <- sim.popn (D = 5, core = testregion,
    buffer = 0)
capt1 <- sim.capthist(t4.16, popn = popn1)
fit1 <- secr.fit(mash(capt1), CL = TRUE)

## Visualize sampling[#可视化采样]
tempmask <- make.mask(t4.16, spacing = 10, type =
    "clusterbuffer")
plot(tempmask)
plot(t4.16, add = TRUE)
plot(capt1, add = TRUE)

## Compare model-based and empirical variances.[#比较基于模型和经验的差异。]
## Here the answers are similar because the data[这里的答案是相似的,因为数据]
## were simulated from a Poisson distribution,[#模拟的泊松分布,]
## as assumed by \code{derived}[#所承担的\代码{衍生}]

derived(fit1)
derived.mash(fit1)

## Now simulate a patchy distribution; note the[#现在模拟呈斑片状分布;注意]
## larger (and more credible) SE from derived.mash().[#更大(或更可信)SE derived.mash()。]

popn2 <- sim.popn (D = 5, core = testregion, buffer = 0,
    model2D = "hills", details = list(hills = c(-2,3)))
capt2 <- sim.capthist(t4.16, popn = popn2)
fit2 <- secr.fit(mash(capt2), CL = TRUE)
derived(fit2)
derived.mash(fit2)

## The detection model we have fitted may be extrapolated to[#已安装的检测模型,我们可以推断出]
## a more fine-grained systematic sample of points, with[#更细粒度的系统样本点,与]
## detectors operated on a single occasion at each...[#探测器操作在每一个场合...]
## Total effort 400 x 1 = 400 detector-occasions, compared[#总的努力400×1 = 400检测的场合,]
## to 256 x 5 = 1280 detector-occasions for initial survey.[#256×5 = 1280检测的场合进行初步调查。]

t1 <- make.grid(nx = 1, ny = 1)
t1.100 <- make.systematic (cluster = t1, spacing = 100,
    region = testregion)
capt2a <- sim.capthist(t1.100, popn = popn2, noccasions = 1)
## one way to get number of animals per point[第一个办法让每点的动物数]
nj <- attr(mash(capt2a), "n.mash")
derived.external (fit2, nj = nj, cluster = t1, buffer = 100,
    noccasions = 1)

## Review plots[#查看图]
base.plot <- function() {
    eqscplot( testregion, axes = FALSE, xlab = "",
        ylab = "", type = "n")
    polygon(testregion)
}
par(mfrow = c(1,3), xpd = T, xaxs = "i", yaxs = "i")
base.plot()
plot(popn2, add = TRUE, col = "blue")
mtext(side=3, line=0.5, "Population", cex=0.8, col="black")
base.plot()
plot (capt2a, add = TRUE,title = "Extensive survey")
base.plot()
plot(capt2, add = TRUE, title = "Intensive survey")


## End(Not run)[#(不执行)]


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-30 10:50 , Processed in 0.023110 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表