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

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

[复制链接]
发表于 2012-9-30 00:06:53 | 显示全部楼层 |阅读模式
trap.builder(secr)
trap.builder()所属R语言包:secr

                                         Complex Detector Layouts
                                         复合探测器布局

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

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

Construct detector layouts comprising small arrays (clusters) replicated across space, possibly at a probability sample of points.
构建探测器布局,包括的小阵列(聚类)复制到整个空间,可能是一个概率样本点。


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



trap.builder (n = 10, cluster, region = NULL, frame =
    NULL, method = "SRS", edgemethod = "clip", samplefactor = 2,
    ranks = NULL, rotation = NULL, detector, plt = FALSE,
    add = FALSE)

mash (object, origin = c(0,0), clustergroup = NULL, ...)

cluster.counts (object)

cluster.centres (object)




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

参数:n
integer number of clusters (ignored if method = "all")  
忽略整数聚类(如果method =“全部”)


参数:cluster
traps object  
陷阱反对


参数:region
bounding polygon
边界多边形


参数:frame
data frame of points used as a finite sampling frame  
点的数据框作为一个有限的抽样框


参数:method
character string (see Details)  
字符串(详细)


参数:edgemethod
character string (see Details)  
字符串(详细)


参数:samplefactor
oversampling to allow for rejection of edge clusters (multiple of n)  
过采样允许拒绝的边缘聚类(为n的倍数)


参数:ranks
vector of relative importance (see Details)
向量的相对重要性(见详情)


参数:rotation
angular rotation of each cluster about centre (degrees)  
角旋转,绕中心每个聚类(度)


参数:detector
character detector type (see detector)  
字符检测器类型(见detector)


参数:plt
logical: should array be plotted?  
逻辑阵列进行绘制?


参数:add
logical: add to existing plot  
逻辑:添加到现有的图


参数:object
single-session multi-cluster capthist object, or traps object for cluster.centres  
单日多的聚类capthist对象,或陷阱反对cluster.centres


参数:origin
new coordinate origin for detector array  
新的坐标原点探测器阵列


参数:clustergroup
list of vectors subscripting the clusters to be mashed  
向量下标被捣碎的聚类列表


参数:...
other arguments passed by mash to make.capthist (e.g., sortrows)
其他参数通过醪make.capthist(例如,sortrows)


Details

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

The detector array in cluster is replicated n times and translated to centres sampled from the area sampling frame in region or the finite sampling frame in frame. Each cluster may be rotated about its centre either by a fixed number of degrees (rotation positive), or by a random angle (rotation negative).
cluster的探测器阵列的复制n时间和转换为在region或有限的抽样框,在frame从该区域抽样框抽样的中心。每个聚类可绕其中心转动,通过一个固定数量的度(rotation为正数),或由一个随机角度(rotation负)。

If the cluster argument is not provided then single detectors of the given type are placed according to the design.
如果cluster的说法是不提供,那么一个给定类型的探测器被放置的设计。

The sampling frame is finite (the points in frame) whenever frame is not NULL. If region and frame are both specified, sampling uses the finite frame but sites may be clipped using the polygon.
抽样框是有限的(点frame)时,frame不为NULL。如果region和frame都被指定,采样使用有限的框架,但使用多边形的网站可能会被裁剪。

region may be a two-column matrix or dataframe of x-y coordinates for the boundary, or a SpatialPolygonsDataFrame object from sp.
region可能是一个两列矩阵或数据框的XY坐标的边界,或一个SpatialPolygonsDataFrame的对象sp。

method may be "SRS", "GRTS", "all" or "rank". "SRS" takes a simple random sample (without replacement in the case of a finite sampling frame). "GRTS" takes a spatially representative sample using the "generalized random tessellation stratified" (GRTS) method of Stevens and Olsen (2004). "all" replicates cluster across all points in the finite sampling frame. "rank" selects n sites from frame on the basis of their ranking on the vector "ranks", which should have length equal to the number of rows in frame; ties are resolved by drawing a site at random.
method可能是“SRS”,的“GRTS”,“所有”或“排名”。 “SRS”简单随机样本(不更换的情况下,有限的抽样框)。 “GRTS”的空间代表性的样本,采用“广义随机镶嵌分层”法(GRTS)的史蒂文斯和奥尔森(2004年)。 “所有”复制cluster的所有点,在有限的抽样框。 “等级”选择nframe的基础上,他们的排名矢量队伍,它应该有长度相等的行数在frame;关系网站解决在随机绘制的网站。

edgemethod may be "clip" (reject individual detectors), "allowoverlap" (no action) or "allinside" (reject whole cluster if any component is outside region). Sufficient additional samples ((samplefactor--1) * n) must be drawn to allow for replacement of any rejected clusters; otherwise, an error is reported ('not enough clusters within polygon').
edgemethod可能是“剪辑”(拒绝个别探测器),“的allowoverlap”(无动作)或的“allinside”(拒绝如果任何组件是整个聚类外region)。吸引到足够的额外样品((samplefactor--1) * n)必须允许更换任何被拒绝的聚类,否则,将报告一个错误(没有足够的簇内多边形“)。

The package sp is required. GRTS samples require function grts in package spsurvey of Olsen and Kincaid. Much more sophisticated sampling designs may be specified by using grts directly.
包sp是必需的。 GRTS样品需要函数grts在包spsurvey奥尔森和金凯。使用grts直接可以指定更复杂的抽样设计。

mash collapses a multi-cluster capthist object as if all detections were made on a single cluster. The new detector coordinates in the "traps" attribute are for a single cluster with (min(x), min(y)) given by origin. clustergroup optionally selects one or more groups of clusters to mash; if length(clustergroup)   > 1 then a multisession capthist object will be generated, one "session" per clustergroup. By default, all clusters are mashed.
mash崩溃一个多聚类capthist的对象,如果在单个聚类的所有检测。新的探测器中的“陷阱”属性的坐标为单个聚类(分(X),MIN(Y))给出的origin。 clustergroup选择一个或多个组群,以土豆,如果length(clustergroup)   > 1然后多区段capthist对象将生成的,一个“会话”每clustergroup。默认情况下,所有的聚类泥状。

mash discards detector-level covariates and occasion-specific "usage", with a warning.
mash丢弃检测水平的协变量和场合特定的“使用”,一个警告。

cluster.counts returns the number of distinct individuals detected per cluster in a single-session multi-cluster capthist object.
cluster.counts返回不同的个体中,检测每个聚类在一个单一的会议多的聚类capthist对象的数量。


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

trap.builder produces an object of class "traps".
trap.builder生成一个对象类“陷阱”。

method = "GRTS" causes messages to be displayed regarding the stratum (always "None"), and the initial, current and final number of levels from the GRTS algorithm.
method = "GRTS"使要显示的信息有关的地层(始终为“没有”),和从GRTS算法的初始电流和最终数目的级别。

plt = TRUE causes a plot to be displayed, including the polygon or finite sampling frame as appropriate.
plt = TRUE导致的图显示,包括适当的多边形或有限的抽样框。

mash produces a capthist object with the same number of rows as the input but different detector numbering and "traps". An attribute "n.mash" is a vector of the numbers recorded at each cluster; its length is the number of clusters. An attribute "centres" is a dataframe containing the x-y coordinates of the cluster centres. The predict method for secr objects and the function derived both recognise and adjust for mashing.
mash产生的capthist的对象具有相同的行数作为输入,但不同的检测器的编号,“陷阱”。一个属性n.mash是一个向量,在每个聚类中记录的数目,它的长度是聚类数。的属性,“中心”是一个数据框含有的xy坐标的聚类中心。 predict方法秘书服务对象和功能derived“都承认,调整糖化。

cluster.counts returns a vector with the number of individuals detected at each cluster.
cluster.counts返回一个向量的数量在每个聚类的个体中,检测。

cluster.centres returns a dataframe of x- and y-coordinates.
cluster.centres返回一个数据框的x坐标和y坐标。


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

The function make.systematic should be used to generate systematic random layouts.
应使用的功能make.systematic,以产生系统的随机的布局。

The sequence number of the cluster to which each detector belongs, and its within-cluster sequence number, may be retrieved with the functions clusterID and clustertrap.
每个检测器所属的聚类,并且其聚类内的序列号的序列号,可以检索的功能clusterID和clustertrap。


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

sampling of natural resources. Journal of the American Statistical Association 99, 262–278.

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

make.grid, traps, make.systematic, clusterID, clustertrap
make.grid,traps,make.systematic,clusterID,clustertrap


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



## solitary detectors placed randomly within a rectangle[#孤随机放置在一个矩形的探测器]
tempgrid <- trap.builder (n = 10, method = "SRS",
    region = cbind(x = c(0,1000,1000,0),
    y = c(0,0,1000,1000)), plt = TRUE)

## GRTS sample of mini-grids within a rectangle[#GRTS小型电网的样本内的矩形]
## edgemethod = "allinside" avoids truncation at edge[#edgemethod =“allinside”避免截断的边缘]
minigrid <- make.grid(nx = 3, ny = 3, spacing = 50,
    detector = "proximity")
tempgrid <- trap.builder (n = 20, cluster = minigrid,
    method = "GRTS", edgemethod = "allinside", region =
    cbind(x = c(0,6000,6000,0), y = c(0,0,6000,6000)),
    plt = TRUE)

## one detector in each 100-m grid cell -[第一个探测器在每100米的网格单元 - ]
## a form of stratified simple random sample[#分层简单随机抽样的一种形式]
origins <- expand.grid(x = seq(0, 900, 100),
    y = seq(0, 1100, 100))
XY <- origins + runif(10 * 12 * 2) * 100
temp <- trap.builder (frame = XY, method = "all",
    detector = "multi")
## same as temp &lt;- read.traps(data = XY)[#相同温度< -  read.traps(数据= XY)]
plot(temp, border = 0)  ## default grid is 100 m[#默认为100米网格]


## simulate some data[#模拟的一些数据]
## regular lattice of mini-arrays[#规则晶格迷你阵列]
minigrid <- make.grid(nx = 3, ny = 3, spacing = 50,
    detector = "proximity")
tempgrid <- trap.builder (cluster = minigrid , method =
    "all", frame = expand.grid(x = seq(1000, 5000, 2000),
    y = seq(1000, 5000, 2000)), plt = TRUE)
tempcapt <- sim.capthist(tempgrid, popn = list(D = 10))
cluster.counts(tempcapt)
cluster.centres(tempgrid)

## "mash" the CH[#“混搭”的CH]
summary(mash(tempcapt))

## compare timings (estimates are near identical)[#比较时序(估计是几乎相同的)]
## Not run: [#不运行:]
tempmask1 <- make.mask(tempgrid, type = "clusterrect",
    buffer = 200, spacing = 10)
fit1 &lt;- secr.fit(tempcapt, mask = tempmask1, trace = FALSE)         ## 680 s[#680小号]

tempmask2 <- make.mask(minigrid, spacing = 10)
fit2 &lt;- secr.fit(mash(tempcapt), mask = tempmask2, trace = FALSE)   ## 6.2 s[6.2小号]
## density estimate is adjusted automatically[#密度估计会自动调整]
## for the number of mashed clusters (9)[#捣碎的聚类的数目(9)]

predict(fit1)
predict(fit2)
fit1$proctime
fit2$proctime

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

## two-phase design: preliminary sample across region,[第2阶段:初步设计样品跨区域的,]
## followed by selection of sites for intensive grids[#,然后选择密集的网格网站]
## Not run: [#不运行:]
arena <- data.frame(x = c(0,2000,2000,0), y = c(0,0,2500,2500))
t1 <- make.grid(nx = 1, ny = 1)
t4 <- make.grid(nx = 4, ny = 4, spacing = 50)
singletraps <- make.systematic (n = c(8,10), cluster = t1,
    region = arena)
CH <- sim.capthist(singletraps, popn = list(D = 2))
plot(CH, type = "n.per.cluster", title = "Number per cluster")
temp <- trap.builder(10, frame = traps(CH), cluster = t4,
    ranks = cluster.counts(CH), method = "rank",
    edgemethod = "allowoverlap", plt = TRUE, add = TRUE)

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


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 12:36 , Processed in 0.021228 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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