BUGS(secr)
BUGS()所属R语言包:secr
Convert Data To Or From BUGS Format
数据或从BUGS格式转换
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Convert data between "capthist" and BUGS input format.
“capthist和错误的输入格式之间的数据转换。
用法----------Usage----------
read.DA(DAlist, detector = "polygonX", units = 1, session = 1,
Y = "Y", xcoord = "U1", ycoord = "U2", xmin = "Xl",
xmax = "Xu", ymin = "Yl", ymax = "Yu", buffer = "delta",
verify = TRUE)
write.DA(capthist, buffer, nzeros = 200, units = 1)
参数----------Arguments----------
参数:DAlist
list containing data in BUGS format
BUGS格式的数据列表,其中包含
参数:detector
character value for detector type: "polygon" or "polygonX"
字符值检测器的类型:“多边形”或“polygonX
参数:units
numeric for scaling output coordinates
数字缩放输出坐标
参数:session
numeric or character label used in output
用于输出的数字或字符的标签
参数:Y
character, name of binary detection history matrix (animals x occasions)
字符,名称的二进制检测史矩阵(动物所述的场合)
参数:xcoord
character, name of matrix of x-coordinates for each detection in Y
字符,名称矩阵x坐标为每个检测在Y
参数:ycoord
character, name of matrix of y-coordinates for each detection in Y
字符,y坐标的矩阵名为每个检测Y
参数:xmin
character, name of coordinate of state space boundary
字符,名称,坐标状态空间的边界
参数:xmax
character, name of coordinate of state space boundary
字符,名称,坐标状态空间的边界
参数:ymin
character, name of coordinate of state space boundary
字符,名称,坐标状态空间的边界
参数:ymax
character, name of coordinate of state space boundary
字符,名称,坐标状态空间的边界
参数:buffer
see Details
查看详细资料
参数:verify
logical if TRUE then the resulting capthist object is checked with verify
逻辑如果是TRUE,那么得到的capthist的对象是检查verify的
参数:capthist
capthist object
capthist对象
参数:nzeros
level of data augmentation (all-zero detection histories)
水平的数据增强(零检测历史)
Details
详细信息----------Details----------
Data for OpenBUGS or WinBUGS called from R using the package R2WinBUGS (Sturtz et al. 2005) take the form of an R list.
数据从R调用OpenBUGS或WinBUGS使用软件包R2WinBUGS(Sturtz等人,2005年)的R列表的形式。
These functions are limited at present to binary data from a square quadrat such as used by Royle and Young (2008). Marques et al. (2011) provide an R function create.data() for generating simulated datasets of this sort (see sim.capthist for equivalent functionality).
这些功能被限制在本样如罗伊尔和Young(2008)所使用的二进制数据从一个正方形。私人物品等。 (2011)提供了一个R函数create.data()这类模拟实验(见sim.capthist相同的功能)。
When reading BUGS data –
当读取BUGS数据 -
The character values Y, xcoord, ycoord, xmin etc. are used to locate the data within DAlist, allowing for variation in the input names.
的字符值Y,xcoord,ycoord,xmin等用于定位中的数据DAlist,允许在输入名称的变化。
The number of sampling occasions is taken from the number of columns in Y. Each value in Y should be 0 or 1. Coordinates may be missing
取自的数目的采样的场合中的列数Y。中的每个值Y应为0或1。坐标可能会丢失
A numeric value for buffer is the distance (in the original units) by which the limits Xl, Xu etc. should be shrunk to give the actual plot limits. If buffer is character then a component of DAlist contains the required numeric value.
的数值为buffer的距离(在原单位)的限制XL,徐应缩小到实际的图限制。如果buffer是字符的一个组成部分DAlist包含所需的数值。
Coordinates in the output will be multiplied by the scalar units.
输出中的坐标将被乘以标量units。
Augmentation rows corresponding to "all-zero" detection histories in Y, xcoord, and ycoord are discarded.
增强行对应的“零”检测历史Y,xcoord和ycoord被丢弃。
When writing BUGS data –
BUGS数据写入时 -
Null (all-zero) detection histories are added to the matrix of detection histories Y, and missing (NA) rows are added to the coordinate matrices xcoord and ycoord.
空(零)检测的历史将被添加到矩阵检测的历史Y,和失踪(NA)的行添加到坐标矩阵xcoord和ycoord。
Coordinates in the output will be divided by the scalar units.
输出中的坐标将被划分标量units。
值----------Value----------
For read.DA, an object of class "capthist".
对于read.DA,的对象类的capthist“。
For write.DA, a list with the components
对于write.DA,与组件的列表
U1 and U2 are "NA" where animal was not detected.
U1和U2是未检测到动物的“NA”。
参考文献----------References----------
for spatial capture–recapture data: Comment. Ecology 92, 526–528.
capture–recapture data. Ecology 89, 2281–2289.
running WinBUGS from R. Journal of Statistical Software 12, 1–16.
参见----------See Also----------
hornedlizardCH, verify, capthist
hornedlizardCH,verify,capthist
实例----------Examples----------
write.DA (hornedlizardCH, buffer = 100, units = 100)
## In this example, the input uses Xl, Xu etc.[#在这个例子中,输入使用的是XL,徐等。]
## for the limits of the plot itself, so buffer = 0.[编号图本身的限制,所以缓冲= 0。]
## Input is in hundreds of metres.[#输入是在几百米。]
## First, obtain the list lzdata[#首先,获得列表lzdata]
olddir <- setwd (system.file("extdata", package="secr"))
source ("lizarddata.R")
str(lzdata)
## Now convert to capthist[#现在转换到capthist的]
tempcapt <- read.DA(lzdata, Y = "H", xcoord = "X",
ycoord = "Y", buffer = 0, units = 100)
summary(tempcapt)
setwd(olddir)
## Not run: [#不运行:]
plot(tempcapt)
secr.fit(tempcapt)
## etc.[#等。]
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|