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

R语言 scape包 estN()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 22:42:05 | 显示全部楼层 |阅读模式
estN(scape)
estN()所属R语言包:scape

                                        Estimate Effective Sample Size
                                         估计有效样本数

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

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

Estimate the effective sample size for catch-at-age or catch-at-length data, based on the multinomial distribution.
估计有效样本数为赶上在年龄或的追赶长度数据,基于多项式分布。


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


estN(model, what="CAc", series=NULL, init=NULL, FUN=mean, ceiling=Inf,
     digits=0)

estN.int(P, Phat)  # internal function



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

参数:model
fitted scape model containing catch-at-age and/or catch-at-length data.
安装scape模型包含追赶年龄和/或赶上长度的数据。


参数:what
name of model element: "CAc", "CAs", "CLc", or "CLs".
模型元素的名称:"CAc","CAs","CLc"或"CLs"。


参数:series
vector of strings indicating which gears or surveys to analyze (all by default).
向量的字符串表示的齿轮或调查分析(默认情况下)。


参数:init
initial sample size, determining the relative pattern of the effective sample size between years.
最初的样本量,确定年有效样本数之间的相对模式。


参数:FUN
function to standardize the effective sample size.
功能规范有效样本数。


参数:ceiling
largest possible sample size in one year.
在一年内的最大可能的样本量。


参数:digits
number of decimal places to use when rounding, or NULL to suppress rounding.
使用时,四舍五入,或NULL抑制四舍五入的小数位数。


参数:P
observed catch-at-age or catch-at-length matrix.
观察到的捕捉年龄或捕获长度矩阵。


参数:Phat
fitted catch-at-age or catch-at-length matrix.
装追赶在年龄或捕获的长度矩阵。


Details

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

The init sample sizes set a fixed pattern for the relative sample sizes between years. For example, if there are two years of catch-at-age data and the initial sample sizes are 100 in year 1 and 200 in year 2, the effective sample size will be two times greater in year 2 than in year 1, although both will be scaled up or down depending on how closely the model fits the catch-at-age data. The value of init can be one of the following:
init的样本量年的相对样本量之间设置一个固定的模式。例如,如果有两年的追赶时代的数据和初始样本规模是100年1 200年2,有效样本数比第1年第2年的2倍,虽然这两个将被调整或下降取决于如何密切模型拟合追赶年龄数据。 init的值可以是以下之一:

  


NULLmeans read the initial sample sizes from the existing SS column (default).
NULL是指从现有的SS栏(默认)读取初始样本量。

modelmeans read the initial sample sizes from the SS column in that model (object of class scape).
modelmeans阅读从SS列在该模型中的初始样本量(对象类scape“)。

numeric vectormeans those are the initial sample sizes (same length as the number of years).
数字vectormeans那些初始样品体积(相同长度的年数的)。

FALSEmeans ignore the initial sample sizes and use the empirical multinomial sample size (nhat) in each year.
FALSE是指忽略的初始样本大小和使用经验的多项样本量(nhat)每年。

1means calculate one effective sample size to use across all years, e.g. the mean or median of nhat.   
1是指计算一个有效样本数年在所有使用,例如:平均中位数nhat。

The idea behind FUN=mean is to guarantee that regardless of the value of init, the mean effective sample size will always be the same. Other functions can be used to a similar effect, such as FUN=median.
背后的想法FUN=mean是保证,无论init,平均有效样本量将始终是相同的。其他功能都可以使用一个类似的效果,如FUN=median。

The estN function is implemented for basic single-sex datasets. If the data are sex-specific, estN pools (averages) the sexes before estimating effective sample sizes. The general function estN.int, on the other hand, is suitable for analyzing any datasets in matrix format. The int in estN.int stands for internal (not integer), analogous to rep.int, seq.int, sort.int, and similar functions.
estN函数来实现为基本单一性别的数据集。如果数据是性别特异性,estN池(平均值)的性别之前估计有效样本量。一般功能estN.int,另一方面,是适合在matrix格式的任何数据集进行分析。 intestN.int代表内部(不是整数),类似于rep.int,seq.int,sort.int,和类似的功能。


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

Numeric vector of effective sample sizes (one value if init=1), or a list of such vectors when analyzing multiple series.
数字矢量的有效样本量(一个值,如果init=1),或这种向量进行分析时,多系列的列表。


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

This function uses the empirical multinomial sample size to estimate an effective sample size, which may be appropriate as likelihood weights for catch-at-age and catch-at-length data. The better the model fits the data, the larger the effective sample size.
该函数使用经验的多项样本量的有效样本量估计,这可能是适当的,因为赶上,在年龄和追赶长度的数据的可能性的权重。更好的模型拟合数据,有效样本数较大。

estN can be used iteratively, along with estSigmaI and estSigmaR to assign likelihood weights that are indicated by the model fit to the data. Sigmas and sample sizes are then adjusted between model runs, until they converge. The iterate function facilitates this procedure.
estN可以反复使用,随着estSigmaI和estSigmaR分配的可能性表示的权重,通过模型拟合的数据。 Sigma的样本量之间调节模式运行,直到收敛。 iterate功能简化此过程。

If P[t,a] is the observed proportion of fish at age (or length bin) a in year t, and Phat[t,a] is the fitted proportion, then the estimated sample size in that year is:
P[t,a]如果是观察到的鱼的比例在年龄(或长斌)a在今年t和Phat[t,a]是拟合的比例,那么估计样本大小,今年是:

sum_a(Phat[t,a]*(1-Phat[t,a])) / sum_a((P[t,a]-Phat[t,a])^2)</i>
的sum_a(柏[T,A] *(1  - 柏[T,A))/ sum_a((P [T,A]柏[T,A])^ 2)</ I>

Due to the non-random and non-independent nature of sampling fish, the effective sample size, for statistical purposes, is much less than the number of fish sampled. Common starting points include using the number of tows as the sample size in each year, or using the empirical multinomial sample sizes. Those &ldquo;initial&rdquo; sample sizes can then be scaled up or down. Sample sizes between 20 and 200 are common in the stock assessment literature.
由于取样鱼,有效样本大小,用于统计目的的非随机的和非独立的性质,是远远小于采样鱼的数目。共同的出发点,包括使用拖在每年的样本量,或使用多项样本量的经验。然后,那些“初始”样本大小可以被按比例放大或向下。 20和200之间的股票评估文献中常见的样本量。


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

Gavaris, S. and J.N. Ianelli. 2002. Statistical issues in fisheries' stock assessments. <CITE>Scandinavian Journal of Statistics</CITE> 29:245&ndash;271.
Maunder, M.N. and A.D. Langley. 2004. Integrating the standardization of catch-per-unit-of-effort into stock assessment models: Testing a population dynamics model and using multiple data types. <CITE>Fisheries Research</CITE> 70:389&ndash;395.
McAllister, M.K. and J.N. Ianelli. 1997. Bayesian stock assessment using catch-age data and the sampling-importance resampling algorithm. <CITE>Canadian Journal of Fisheries and Aquaticic Sciences</CITE> 54:284&ndash;300.

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

getN, getSigmaI, getSigmaR, estN, estSigmaI, and estSigmaR extract and estimate sample sizes and sigmas.
getN,getSigmaI,getSigmaR,estN,estSigmaI和estSigmaR提取和估计的样本量和逐步改善。

iterate combines all the get* and est* functions in one call.
iterate将所有的get*和est*在一个呼叫的功能。

plotCA and plotCL show what is behind the sample-size estimation.
plotCA和plotCL的背后是什么的样本量估计。

scape-package gives an overview of the package.
scape-package给出了一个概述的包。


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


## Exploring candidate sample sizes:[#探索候选样本大小:]

getN(x.sbw)     # sample sizes used in assessment: number of tows[样本量用于评估:一些拖]
estN(x.sbw)     # effective sample size, given data (tows) and model fit[有效样本量,给定的数据(拖)和模型的拟合]
estN(x.sbw, ceiling=200)  # could use this[可以使用此]
estN(x.sbw, init=FALSE)   # from model fit, disregarding tows[从模型的拟合,不顾拖]
plotCA(x.sbw)             # years with good fit =&gt; large sample size[年适合大样本的大小]
estN(x.sbw, init=1)       # one sample size across all years[在所有多年的一个样本大小]
estN(x.sbw, init=c(rep(1,14),rep(2,9)))  # two sampling periods[两个采样周期]

## Same mean, regardless of init:[#同样的意思是,不管初始化:]

mean(estN(x.sbw, digits=NULL))
mean(estN(x.sbw, digits=NULL, init=FALSE))
mean(estN(x.sbw, digits=NULL, init=1))
mean(estN(x.sbw, digits=NULL, init=c(rep(1,14),rep(2,9))))

## Same median, regardless of init:[#位数相同,不管初始化:]

median(estN(x.sbw, FUN=median, digits=NULL))
median(estN(x.sbw, FUN=median, digits=NULL, init=FALSE))
median(estN(x.sbw, FUN=median, digits=NULL, init=1))
median(estN(x.sbw, FUN=median, digits=NULL, init=c(rep(1,14),rep(2,9))))

## Multiple series:[#多个系列:]

getN(x.ling, "CLc")              # sample size used in assessment[用于评估的样本量]
getN(x.ling, "CLc", digits=0)    # rounded[四舍五入]
estN(x.ling, "CLc")              # model fit implies larger sample sizes[模型的拟合意味着更大的样本量]

getN(x.ling, "CLc", series="1", digits=0)  # get one series[得到一个系列]
estN(x.ling, "CLc", series="1")            # estimate one series[估计一个系列]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-29 18:32 , Processed in 0.026364 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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