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

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

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

                                         Spatially Explicit Capture–Recapture
                                         空间显式捕获 - 再捕获

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

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

Estimate animal population density with data from an array of passive detectors (traps) by fitting a spatial detection model by maximizing the likelihood. Data must have been assembled as an object of class capthist. Integration is by summation over the grid of points in mask.
估计动物种群密度与装修空间的可能性最大化的检测模型数据从一个阵列的被动探测器(陷阱)。数据必须被组装成一个对象类capthist。集成是由网格点mask求和。


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


secr.fit (capthist, model = list(D~1, g0~1, sigma~1),
    mask = NULL, buffer = NULL, CL = FALSE, detectfn = NULL,
    binomN = NULL, start = NULL, link = list(), fixed = list(),
    timecov = NULL, sessioncov = NULL, groups = NULL,
    dframe = NULL, details = list(), method = "Newton-Raphson",
    verify = TRUE, biasLimit = 0.01, trace = NULL, ...)



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

参数:capthist
capthist object including capture data and detector (trap) layout  
capthist对象包括捕获的数据和布局探测器(陷阱)


参数:mask
mask object
mask对象


参数:buffer
scalar mask buffer radius if mask not specified (default 100 m)
标模板缓冲区半径mask没有指定(默认为100米)


参数:CL
logical, if true then the model is fitted by maximizing the conditional likelihood  
逻辑,如果为真,则模型拟合最大化的条件的可能性


参数:detectfn
integer code or character string for shape of detection function 0 = halfnormal, 1 = hazard rate etc. – see detectfn
形状的检测功能0 = halfnormal,1 =风险率等的的整数代码或字符的字符串 -  detectfn


参数:binomN
integer code for distribution of counts (see Details)  
分布计数的整数代码(见详情)


参数:start
vector of initial values for beta parameters, or secr object from which they may be derived  
矢量测试参数,或secr对象,他们可能得到的初始值


参数:link
list with optional components "D", "g0", "sigma" and "z", each a character string in {"log", "logit", "identity", "sin"} for the link function of the relevant real parameter  
与可选组件D,G0,六西格玛到z,每一个字符的字符串{“log”,“罗吉”,“身份”,“罪”}列表有关实参数的链接功能


参数:fixed
list with optional components corresponding to each "real" parameter (e.g., "D", "g0", "sigma"), the scalar value to which parameter is to be fixed  
与相对应的每个“真正的”参数(例如,D,G0,西格玛),该参数是要固定的标量值的可选组件列表


参数:model
list with optional components "D", "g0", "sigma" and "z", each symbolically defining a linear predictor for the relevant real parameter using formula notation  
与可选组件D,G0,六西格玛到z,象征性地定义线性预测相关的参数,使用formula符号列表


参数:timecov
optional dataframe of values of time (occasion-specific) covariate(s).  
可选的数据框的时间值(特定场合)协(S)。


参数:sessioncov
optional dataframe of values of session-specific covariate(s).  
可选的数据框的特定会话的协变量(S)的值。


参数:groups
optional vector of one or more variables with which to form groups. Each element should be the name of a factor variable in the covariates attribute of capthist.  
与一个或多个变量,以形成一组可选的矢量。的每个元素都应该是一个因素变量在covariates属性capthist的名称。


参数:dframe
optional data frame of design data for detection parameters  
可选的数据框的检测参数设计数据


参数:details
list of additional settings, mostly model-specific (see Details)  
额外的设置,主要是特定模型(见详情)


参数:method
character string giving method for maximizing log likelihood  
字符的字符串,给出了最大化对数似然方法


参数:verify
logical, if TRUE the input data are checked with verify  
逻辑,如果为true,输入数据检查verify


参数:biasLimit
numeric threshold for predicted relative bias due to buffer being too small  
由于缓冲区过小数字阈值的预测相对偏差


参数:trace
logical, if TRUE then output each evaluation of the likelihood, and other messages
逻辑,如果TRUE,则输出的可能性,评估和其他信息


参数:...
other arguments passed to the maximization function  
其他参数传递的最大化功能


Details

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

secr.fit fits a SECR model by maximizing the likelihood. The likelihood depends on the detector type ("multi", "proximity", "count", "polygon" etc.) of the traps attribute of capthist (Borchers and Efford 2008, Efford, Borchers and Byrom 2009, Efford, Dawson and Borchers 2009, Efford 2011). The "multi" form of the likelihood is also used, with a warning, when detector type = "single" (see Efford et al. 2009 for justification). The default model is null (constant density and detection probability). The set of variables available for use in linear predictors includes some that are constructed automatically (t, T, b, B), group (g), and others that appear in the covariates of the input data. See secr models and ../doc/secr-overview.pdf for more on defining models.
secr.fit适合一个SECR的模型的可能性最大化。的可能性取决于检测器类型(“多”,“近水楼台”,“算”,“多边形”等)的traps属性capthist(BORCHERS和Efford 2008, Efford,BORCHERS拜罗姆2009年,Efford,道森和BORCHERS 2009年,Efford 2011)。也可用于多形式的可能性,警告,当探测器类型=“单”为理由(见Efford等,2009)。默认model是空的(不断的密度和检测概率)。可用于线性预测中使用的变量的集合包括一些自动构造(吨,T b时,B),组(g),以及其他出现在covariates的输入数据的。秘书服务模式和.. / DOC / SECR overview.pdf中定义模型。

buffer and mask are alternative ways to define the region of integration (see mask).
buffer和mask是另一种方式来定义的整合(见面具)的区域。

The length of timecov should equal the number of sampling occasions (ncol(capthist)). Arguments timecov, sessioncov and groups are used only when needed for terms in one of the model specifications. Default link is list(D="log", g0="logit", sigma="log").
timecov的长度应等于样本的数量(ncol(capthist))。参数timecov,sessioncov和groups只有当需要的型号规格。默认link是list(D="log", g0="logit", sigma="log")。

If start is missing then autoini is used for D, g0 and sigma, and other beta parameters are set initially to arbitrary values, mostly zero. start may be a previously fitted nested model. In this case, a vector of starting beta values is constructed from the nested model and additional betas are set to zero. Mapping of parameters follows the default in score.test, but user intervention is not allowed.
start如果缺少那么autoini用于D,G0和sigma,和其他测试参数的初始设置为任意值,大多是零。 start可能是先前的带有嵌套模型。在这种情况下,从嵌套的模型构造开始beta值的矢量,和额外的贝塔值被设置为零。参数如下映射默认情况下,在score.test,但是用户干预是不允许的。

binomN (previously a component of details) determines the distribution that is fitted for the number of detections of an individual at a particular detector, on a particular occasion, when the detectors are of type "count", "polygon" or "transect":
binomN(先前的一个组件details)确定分配嵌合个人的检测的数量,在一个特定的场合,在一个特定的检测器时,检测器的类型为计数 ,“多边形”或“样”:

binomN > 1 binomial with size binomN
binomN> 1二项式大小binomN

binomN = 1 Bernoulli
binomN = 1伯努利

binomN = 0 Poisson
binomN = 0,泊松

binomN < 0 negative binomial with size abs(binomN) &ndash; see  dnbinom
binomN <0负二项分布与大小ABS(binomN)的 -  dnbinom

The default with these detectors is to fit a Poisson distribution. The "size" parameter of the negative binomial is not estimated: it must be supplied. binomN should be an integer unless negative.
默认情况下,这些探测器是适合的泊松分布。 “大小”负二项分布参数的估计:它必须提供。 binomN应该是一个整数,除非负。

details is used for various specialized settings &ndash;
details用于各种专门设置 -

details$distribution specifies the distribution of the number of individuals detected; this may be conditional on the number in the masked area ("binomial") or unconditional ("poisson"). distribution affects the sampling variance of the estimated density. The default is "poisson". See also Note.
details$distribution指定个体中,检测的数量分布,这可能是被屏蔽的区域中的数字(“二项式”)或无条件(“泊松”)条件。 distribution影响抽样方差的估计密度。默认值是“泊”。另请参阅注意。

details$hessian is a character string controlling the computation of the Hessian matrix from which variances and covariances are obtained. Options are "none" (no variances), "auto" (the default) or "fdhess" (use the function fdHess in nlme).  If "auto" then the Hessian from the optimisation function is used.
details$hessian是一个字符串Hessian矩阵计算方差和协方差得到控制。选项是“无”(无差异),“自动”(默认值)或“fdhess”(使用的功能fdHess,在nlme)。如果选择“自动”,然后在黑森州的优化功能使用。

details$LLonly = TRUE causes the function to returns a single evaluation of the log likelihood at the "start" values.
details$LLonly= TRUE在“开始”值,导致该函数返回一个单一的评价,对数似然。

details$scalesigma = TRUE causes sigma to be scaled by 1/sqrt(D).
details$scalesigma= TRUE原因西格玛进行调整1/sqrt(D)。

details$scaleg0 = TRUE causes g0 to be scaled by sigma^-2.
details$scaleg0= TRUE原因G0进行缩放的sigma^-2的。

details$centred = TRUE causes coordinates of both traps and mask to be centred on the centroid of the traps, computed separately for each session in the case of multi-session data. This may be necessary to overcome numerical problems when x- or y-coordinates are large numbers. The default is not to centre coordinates.
details$centred= TRUE原因的陷阱和口罩,集中于质心的陷阱,分别计算每个会话的情况下,多会话数据的坐标。这可能是必要的,克服当x-或y-坐标是大量的数值问题。默认情况下是没有的中心坐标。

details$param = 1 causes the Gardner &amp; Royle parameterisation of the detection model (p0, &sigma;; Gardner et al. 2009) to be used for multi-catch detectors (default 0 for Borchers and Efford). This parameterisation does not allow detector covariates.
details$param = 1时,加德纳和罗伊尔参数化的检测模式(P0,&sigma;;加德纳等人,2009),可用于多捕捉器(默认为0 BORCHERS和Efford)。此参数设置不允许探测器协变量。

If method = "Newton-Raphson" then nlm is used to maximize the log likelihood (minimize the negative log likelihood); otherwise optim is used with the chosen method ("BFGS", "Nelder-Mead", etc.).  If maximization fails a warning is given appropriate to the method.
如果method = "Newton-Raphson"nlm是用来最大限度地提高对数似然(最小的负对数似然),否则optim使用所选择的方法(“BFGS”,“内尔德酒” ,等)。如果最大化失败的警告,给予适当的方法。

If verify = TRUE then verify is called to check capthist and mask; analysis is aborted if "errors" are found. Some conditions that trigger an "error" are benign (e.g., no detections in some sessions of a multi-session study of a sparse population); use verify = FALSE to avoid the check. See also Note.
如果verify= TRUE,则verify被称为检查,分析capthist和掩码被中止,如果被发现的“错误”。触发一个“错误”的一些条件是良性的(例如,没有检测到稀少的人口会多研究一些会议),使用verify = FALSE,以避免检查。另请参阅注意。

If buffer is used rather than mask, and biasLimit is valid, then the estimated density is checked for bias due to the choice of buffer. A warning is generated when buffer appears to be too small (predicted RB(D-hat) > biasLimit, default 1% relative bias). The prediction uses bias.D. No check is performed when mask is specified, when biasLimit is 0, negative or NA, or when the detector type is "polygon", "transect", "polygonX" or "transectX".
如果buffer使用,而不是mask和biasLimit是有效的,那么估计密度检查由于缓冲区的选择偏差。时,会产生一个警告buffer似乎是小RB(D-HAT)>biasLimit,默认情况下,1%的相对偏差(预测)。预测使用bias.D。时,不进行校验mask指定,当biasLimit是0,负数或NA,或当检测器的类型是“多边形”,“断面”,“polygonX”或“transectX的” ;


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

The function secr.fit returns an object of class secr.  This has components
函数secr.fit返回一个对象类秘书服务。这也有组件


参数:call
function call (as character string prior to secr 1.5)  
函数调用(作为字符串之前SECR 1.5)


参数:capthist
saved input
保存的输入


参数:mask
saved input
保存的输入


参数:detectfn
saved input
保存的输入


参数:CL
saved input
保存的输入


参数:timecov
saved input
保存的输入


参数:sessioncov
saved input
保存的输入


参数:groups
saved input
保存的输入


参数:dframe
saved input
保存的输入


参数:design
reduced design matrices, parameter table and parameter index array for actual animals (see secr.design.MS)
降低了设计矩阵,参数表和参数索引数组实际的动物(见secr.design.MS)


参数:design0
reduced design matrices, parameter table and parameter index array for "naive" animal (see secr.design.MS)
降低了设计矩阵,参数表和参数索引数组“天真”的动物(见secr.design.MS)


参数:start
vector of starting values for beta parameters  
矢量测试参数的初始值


参数:link
list with one component for each real parameter (typically "D", "g0", "sigma"),giving the name of the link function used for each real parameter.
用的一个组成部分,每个真实参数(通常是D,G0,西格玛),提供用于每个实参数的链接功能的名称的列表。


参数:fixed
saved input   
保存的输入


参数:parindx
list with one component for each real parameter giving the indices of the "beta" parameters associated with each real parameter   
每一个真实的参数给出的测试版参数指标与每个实际参数列表的一个组成部分,


参数:model
saved input
保存的输入


参数:details
saved input
保存的输入


参数:vars
vector of unique variable names in model  
向量的唯一的变量名在model


参数:betanames
names of beta parameters
测试参数的名称


参数:realnames
names of fitted (real) parameters  
名的拟合参数(真正的)


参数:fit
list describing the fit (output from nlm or optim)  
列表描述适合nlm或optim(输出)


参数:beta.vcv
variance-covariance matrix of beta parameters   
测试参数的方差 - 协方差矩阵


参数:N
if CL = FALSE, array of predicted number in each group at in each session, summed across mask, dim(N) = c(ngroups, nsessions), otherwise NULL  
如果CL = FALSE,阵列在每次会议各组的预测,总结整个面具,朦朦胧胧(N)= C(NGROUPS,nsessions),否则为NULL


参数:version
secr version number  
秘书服务的版本号


参数:starttime
character string of date and time at start of fit  
字符的字符串,日期和时间开始的拟合


参数:proctime
processor time for model fit, in seconds  
处理器模型拟合,以秒为单位的时间


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

One system of units is used throughout secr. Distances are in metres and areas are in hectares (ha). The unit of density is animals per hectare. 1 ha = 10000 m^2 = 0.01 km^2. To convert density to animals / km^2, multiply by 100.
用于整个系统的单位之一secr。距离是米和区域公顷。密度的单位是每公顷的动物。 1公顷= 10000平方公尺^ 2 = 0.01公里。要转换的动物/平方公里的密度,再乘以100。

print, AIC, vcov, and predict methods are provided. derived is used to compute the derived parameters "esa" (effective sampling area) and "D" (density) for models fitted by maximizing the conditional likelihood (CL = TRUE).
print,AIC,vcov和predict方法。 derived安装最大化的条件的可能性(CL = TRUE)的模型被用于计算派生的参数的欧空局(有效的取样区)和D(密度)。

The component "distribution" of argument "details" may also take a numeric value larger than nrow(capthist), rather than "binomial" or "poisson". The likelihood then treats n as a binomial draw from a superpopulation of this size, with consequences for the variance of density estimates. This can help to reconcile MLE with Bayesian estimates using data augmentation.
组件的分布参数的详细信息也可以采取一个数字值大于NROW(capthist),而不是“二项式”或“泊”。的可能性,然后将n作为这种规模从超总体二项式抽奖,与密度估计方差的后果。这可以帮助调和使用数据增强贝叶斯估计的MLE。

Components "version" and "starttime" were introduced in version 1.2.7, and recording of the completion time in "fitted" was discontinued.
组件“版本”和“开始时间”中介绍了1.2.7版本,并记录在“装”的完成时间停止。

The Newton-Raphson algorithm is fast, but it sometimes fails to compute the information matrix correctly, causing some or all standard errors to be set to NA. This usually indicates a major problem in fitting the model, and parameter estimates should not be trusted. The alternative method = "BFGS" often works better in these cases, or use details = list(hessian = "fdhess").
Newton-Raphson算法是速度快,但有时它不能正确计算的信息矩阵,导致部分或全部被设置为NA的标准误差。这通常表示一个主要的问题,在拟合模型和参数估计,不应该被信任。的替代method = "BFGS"经常在这种情况下,或使用details = list(hessian = "fdhess")。

The component D in output was replaced with N from version 2.3. Use region.N to obtain SE or confidence intervals for N-hat, or to infer N for a different region.
成分D中输出替换为N从版本2.3。使用region.N来获得SE或置信区间为N-帽子,或推断N为不同的区域。

Prior to version 2.3.2 the buffer bias check could be switched off by setting verify = FALSE. This is now done by setting biasLimit = 0.
2.3.2版本之前的缓冲偏置检查可以通过设置verify = FALSE关闭。这是通过设置biasLimit = 0。


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

likelihood methods for capture&ndash;recapture studies. Biometrics 64, 377&ndash;385.
Oikos 106, 598&ndash;610.
explicit capture&ndash;recapture with area or transect searches. Unpublished manuscript.
by spatially explicit capture&ndash;recapture: likelihood-based methods. In: D. L. Thompson, E. G. Cooch and M. J. Conroy (eds) Modeling Demographic Processes in Marked Populations. Springer. Pp. 255&ndash;269.
density estimated from locations of individuals on a passive detector array. Ecology 90, 2676&ndash;2682.
for estimating density from DNA mark-recapture studies. Ecology 90, 1106&ndash;1115.

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

detection functions, AIC.secr, capthist, derived, mask, predict.secr, print.secr, region.N, troubleshooting vcov.secr, verify,
检测功能,AIC.secr,capthist,derived,mask,predict.secr,print.secr,region.N,troubleshooting vcov.secr,verify,


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



## construct test data (array of 48 `multi-catch' traps)[#构造测试数据(数组48多捕捞“陷阱)]

detectors <- make.grid (nx = 6, ny = 8, detector = "multi")
detections <- sim.capthist (detectors, popn = list(D = 10,
    buffer = 100), detectpar = list(g0 = 0.2, sigma = 25))

## fit &amp; print null (constant parameter) model[#适合打印空(参数不变)模型]
secr0 <- secr.fit (detections)
secr0   ## uses print method for secr[#使用print方法秘书服务]

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

## compare fit of null model with learned-response model for g0[#据悉响应模型比较适合的空模型G0]

secrb <- secr.fit (detections, model = g0~b)
AIC (secr0, secrb)

## typical result[#典型的结果]

##                  model   detectfn npar    logLik     AIC    AICc dAICc  AICwt[#模型detectfn NPAR logLik AIC国际会议中心dAICc AICwt]
## secr0 D~1 g0~1 sigma~1 halfnormal    3 -347.1210 700.242 700.928 0.000 0.7733[#secr0 D~1 G0~1σ~1 halfnormal 3 -347.1210 700.242 700.928 0.000 0.7733]
## secrb D~1 g0~b sigma~1 halfnormal    4 -347.1026 702.205 703.382 2.454 0.2267[#secrb D~1 G0~B SIGMA~1 halfnormal 4 -347.1026 702.205 703.382 2.454 0.2267]

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 12:39 , Processed in 0.026618 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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