one.boot(simpleboot)
one.boot()所属R语言包:simpleboot
One sample bootstrap of a univariate statistic.
一个样品单变量统计的引导。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
one.boot is used for bootstrapping a univariate statistic for one sample problems. Examples include the mean, median, etc.
one.boot用于引导单变量统计的一个样本问题。的例子包括:mean,median,等等。
用法----------Usage----------
one.boot(data, FUN, R, student = FALSE, M, weights = NULL, ...)
参数----------Arguments----------
参数:data
The data. This should be a vector of numbers.
数据。这应该是一个矢量的数字。
参数:FUN
The statistic to be bootstrapped. This can be either a quoted string containing the name of a function or simply the function name.
自举的统计。这可以是一个带引号的字符串,其中包含一个函数的名称或简单的函数名。
参数:R
The number of bootstrap replicates to use.
引导的数量重复使用。
参数: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; a vector of length equal to the number of observations.
重采样权重;等于观测值的数量的长度的矢量。
参数:...
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(20)
x <- rgamma(100, 1)
b.mean <- one.boot(x, mean, 1000)
print(b.mean)
boot.ci(b.mean) ## No studentized interval here[#这里没有学生化的时间间隔]
hist(b.mean)
## This next line could take some time on a slow computer[#下面这一行可能需要一些时间,在一个缓慢的电脑]
b.median <- one.boot(x, median, R = 500, student = TRUE, M = 50)
boot.ci(b.median)
hist(b.median)
## Bootstrap with weights[#配重引导]
set.seed(10)
w <- runif(100)
bw <- one.boot(x, median, 1000, weights = w)
print(bw)
## Studentized[#学生化]
bw.stud <- one.boot(x, median, R = 500, student = TRUE, M = 50,
weights = w)
boot.ci(bw.stud, type = "stud")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|