linear.approx(boot)
linear.approx()所属R语言包:boot
Linear Approximation of Bootstrap Replicates
自举线性逼近复制
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function takes a bootstrap object and for each bootstrap replicate it calculates the linear approximation to the statistic of interest for that bootstrap sample.
这个函数需要一个引导对象,并为每个引导复制的利益,引导样本的统计计算线性近似。
用法----------Usage----------
linear.approx(boot.out, L = NULL, index = 1, type = NULL,
t0 = NULL, t = NULL, ...)
参数----------Arguments----------
参数:boot.out
An object of class "boot" representing a nonparametric bootstrap. It will usually be created by the function boot.
类"boot"代表的非参数引导的对象。它通常会被创建功能boot。
参数:L
A vector containing the empirical influence values for the statistic of interest. If it is not supplied then L is calculated through a call to empinf.
一个向量,包含利益的统计经验的影响值。如果没有提供,则L计算调用empinf通过。
参数:index
The index of the variable of interest within the output of boot.out$statistic.
利益内boot.out$statistic输出变量的指数。
参数:type
This gives the type of empirical influence values to be calculated. It is not used if L is supplied. The possible types of empirical influence values are described in the help for empinf.
这使经验的影响值来计算的类型。不使用它,如果L提供。经验的影响值可能是在帮助empinf的。
参数:t0
The observed value of the statistic of interest. The input value is used only if one of t or L is also supplied. The default value is boot.out$t0[index]. If t0 is supplied but neither t nor L are supplied then t0 is set to boot.out$t0[index] and a warning is generated.
利益的统计观测值。输入值时,才使用t或L也提供。默认值是boot.out$t0[index]。 t0如果提供,但既不t也L提供t0设置为boot.out$t0[index]和警告生成。
参数:t
A vector of bootstrap replicates of the statistic of interest. If t0 is missing then t is not used, otherwise it is used to calculate the empirical influence values (if they are not supplied in L).
一个向量,引导,重复统计的兴趣。如果的t0丢失t不使用,否则它是用来计算经验的影响值(如果他们不提供L)。
参数:...
Any extra arguments required by boot.out$statistic. These are needed if L is not supplied as they are used by empinf to calculate empirical influence values. </table>
boot.out$statistic所需的任何额外的参数。这些都需要L如果没有提供,因为它们是由empinf用来计算经验的影响值。 </ TABLE>
Details
详情----------Details----------
The linear approximation to a bootstrap replicate with frequency vector f is given by t0 + sum(L * f)/n in the one sample with an easy extension to the stratified case. The frequencies are found by calling boot.array.
线性近似与频率向量f引导复制t0 + sum(L * f)/n在同一个易于扩展的分层情况下的一个样本。被发现的频率调用boot.array。
值----------Value----------
A vector of length boot.out$R with the linear approximations to the statistic of interest for each of the bootstrap samples.
长度的向量boot.out$R引导样本利益的统计与线性近似。
参考文献----------References----------
Bootstrap Methods and Their Application. Cambridge University Press.
参见----------See Also----------
boot, empinf, control
boot,empinf,control
举例----------Examples----------
# Using the city data let us look at the linear approximation to the [使用城市的数据,让我们看看线性近似的]
# ratio statistic and its logarithm. We compare these with the [比统计量和它的对数。我们比较这些]
# corresponding plots for the bigcity data [相应片为bigcity数据,]
ratio <- function(d, w) sum(d$x * w)/sum(d$u * w)
city.boot <- boot(city, ratio, R = 499, stype = "w")
bigcity.boot <- boot(bigcity, ratio, R = 499, stype = "w")
op <- par(pty = "s", mfrow = c(2, 2))
# The first plot is for the city data ratio statistic.[第一图是城市的数据比统计量。]
city.lin1 <- linear.approx(city.boot)
lim <- range(c(city.boot$t,city.lin1))
plot(city.boot$t, city.lin1, xlim = lim, ylim = lim,
main = "Ratio; n=10", xlab = "t*", ylab = "tL*")
abline(0, 1)
# Now for the log of the ratio statistic for the city data.[现在的比率为城市数据统计日志。]
city.lin2 <- linear.approx(city.boot,t0 = log(city.boot$t0),
t = log(city.boot$t))
lim <- range(c(log(city.boot$t),city.lin2))
plot(log(city.boot$t), city.lin2, xlim = lim, ylim = lim,
main = "Log(Ratio); n=10", xlab = "t*", ylab = "tL*")
abline(0, 1)
# The ratio statistic for the bigcity data.[比为bigcity数据统计。]
bigcity.lin1 <- linear.approx(bigcity.boot)
lim <- range(c(bigcity.boot$t,bigcity.lin1))
plot(bigcity.lin1, bigcity.boot$t, xlim = lim, ylim = lim,
main = "Ratio; n=49", xlab = "t*", ylab = "tL*")
abline(0, 1)
# Finally the log of the ratio statistic for the bigcity data.[最后的日志比为bigcity数据统计。]
bigcity.lin2 <- linear.approx(bigcity.boot,t0 = log(bigcity.boot$t0),
t = log(bigcity.boot$t))
lim <- range(c(log(bigcity.boot$t),bigcity.lin2))
plot(bigcity.lin2, log(bigcity.boot$t), xlim = lim, ylim = lim,
main = "Log(Ratio); n=49", xlab = "t*", ylab = "tL*")
abline(0, 1)
par(op)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|