pairs.boot(simpleboot)
pairs.boot()所属R语言包:simpleboot
Two sample bootstrap.
两个样本引导。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
pairs.boot is used to bootstrap a statistic which operates on two samples and returns a single value. An example of such a statistic is the correlation coefficient (i.e. cor). Resampling is done pairwise, so x and y must have the same length (and be ordered correctly). One can alternatively pass a two-column matrix to x.
pairs.boot是用来引导的统计,这两个样本,并返回一个单一的值。这样的统计是一个例子,相关系数(即cor)。重新取样进行配对,所以x和y必须具有相同的长度(,并责令正确)。也可以通过一个两列的矩阵,x。
用法----------Usage----------
pairs.boot(x, y = NULL, FUN, R, student = FALSE, M, weights = NULL, ...)
参数----------Arguments----------
参数:x
Either a vector of numbers representing the first sample or a two column matrix containing both samples.
无论是矢量的数字代表第一样品或一个两列的矩阵,含有两个样品。
参数:y
If NULL it is assumed that x is a two-column matrix. Otherwise, y is the second sample.
如果为NULL,假定x是一个两列的矩阵。否则,y是第二个样本。
参数:FUN
The statistic to bootstrap. If x and y are separate vectors then FUN should operate on separate vectors. Similarly, if x is a matrix, then FUN should operate on two-column matrices. FUN can be either a quoted string or a function name.
统计信息引导。如果x和y是独立的向量,然后FUN应该在不同的向量。同样地,如果x是一个矩阵,那么FUN应该运行在两列的矩阵。 FUN可以是带引号的字符串或函数名。
参数:R
The number of bootstrap replicates.
复制的数目引导。
参数:student
Should we do a studentized bootstrap? This requires a double bootstrap so it might take longer.
如果我们做一个学生化的引导?这需要一个双引导,因此它可能需要更长的时间。
参数:M
If student is set to TRUE, then M is the number of internal bootstrap replications to do.
student如果设置为TRUE,然后M是内部自举复制的数量。
参数:weights
Resampling weights.
重新取样权重。
参数:...
Other (named) arguments that should be passed to FUN.
(命名)的参数被传递给FUN。
值----------Value----------
An object of class "simpleboot", which is almost identical to the regular "boot" object. For example, the boot.ci function can be used on this object.
类的一个对象"simpleboot",这是几乎相同的定期"boot"对象。 boot.ci函数例如,可以使用在此对象。
(作者)----------Author(s)----------
Roger D. Peng
实例----------Examples----------
set.seed(1)
x <- rnorm(100)
y <- 2 * x + rnorm(100)
boot.cor <- pairs.boot(x, y, FUN = cor, R = 1000)
boot.ci(boot.cor)
## With weighting[#加权]
set.seed(20)
w <- (100:1)^2
bw <- pairs.boot(x, y, FUN = cor, R = 5000, weights = w)
boot.ci(bw, type = c("norm", "basic", "perc"))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|