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

R语言:empinf()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 17:26:01 | 显示全部楼层 |阅读模式
empinf(boot)
empinf()所属R语言包:boot

                                         Empirical Influence Values
                                         实证的影响值

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

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

This function calculates the empirical influence values for a statistic applied to a data set.  It allows four types of calculation, namely the infinitesimal jackknife (using numerical differentiation), the usual jackknife estimates, the "positive" jackknife estimates and a method which estimates the empirical influence values using regression of bootstrap replicates of the statistic.  All methods can be used with one or more samples.
此函数计算的经验应用到一个数据集的统计影响值。它允许四种类型的计算,即无限小折刀(使用数值微分),通常的刀切估计,“积极的”折刀估计方法估计影响经验值引导回归的统计重复。所有的方法,可以用一个或多个样品。


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


empinf(boot.out = NULL, data = NULL, statistic = NULL,
       type = NULL, stype = NULL ,index = 1, t = NULL,
       strata = rep(1, n), eps = 0.001, ...)



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

参数:boot.out
A bootstrap object created by the function boot.  If type is "reg" then this argument is required.  For any of the other types it is an optional argument.  If it is included when optional then the values of data, statistic, stype, and strata are taken from the components of boot.out and any values passed to empinf directly are ignored.  
创建一个引导对象的功能boot。如果type是"reg"那么这个参数是必需的。对于任何其他类型的,它是一个可选的参数。如果包含可选则的值data,statistic,stype,strataboot.out组件传递给任何值均取自empinf直接被忽略。


参数:data
A vector, matrix or data frame containing the data for which empirical influence values are required.  It is a required argument if boot.out is not supplied.  If boot.out is supplied then data is set to boot.out$data and any value supplied is ignored.  
一个向量,矩阵或数据框包含的数据为实证的影响值是必需的。 boot.out如果不提供,这是一个必要的参数。如果boot.out提供再data设置为boot.out$data提供任何值将被忽略。


参数:statistic
The statistic for which empirical influence values are required.  It must be a function of at least two arguments, the data set and a vector of weights, frequencies or indices.  The nature of the second argument is given by the value of stype.  Any other arguments that it takes must be supplied to empinf and will be passed to statistic unchanged. This is a required argument if boot.out is not supplied, otherwise its value is taken from boot.out and any value supplied here will be ignored.  
统计经验的影响值是必需的。它必须是一个至少有两个参数,重量,频率或指数数据集和向量的功能。第二个参数的性质由stype值。 ,它需要的任何其他参数,必须提供empinf“将被传递给statistic不变。这是一个必需的参数,如果boot.out不提供的,否则它的值从boot.out这里提供的任何值将被忽略。


参数:type
The calculation type to be used for the empirical influence values. Possible values of type are "inf" (infinitesimal jackknife), "jack" (usual jackknife), "pos" (positive jackknife), and "reg" (regression estimation).  The default value depends on the other arguments.  If t is supplied then the default value of type is "reg" and boot.out should be present so that its frequency array can be found.  It t is not supplied then if stype is "w", the default value of type is "inf"; otherwise, if boot.out is present the default is "reg".  If none of these conditions apply then the default is "jack".  Note that it is an error for type to be "reg" if boot.out is missing or to be  "inf" if stype is not "w".  
可用于实证的影响值的计算类型。可能的值type是"inf"(无穷小折刀),"jack"(通常折刀),"pos"积极折刀,"reg"(回归估计)。默认值取决于其他参数。如果t提供的默认值type是"reg"和boot.out应该存在,所以可以发现,其频率阵列。它t没有提供,则如果stype是"w",默认值type是"inf",否则,如果boot.out是呈现缺省"reg"。如果没有这些条件的申请,然后默认为"jack"。请注意,这是一个错误type是"reg"如果boot.out丢失或"inf"如果stype不"w"。


参数:stype
A character variable giving the nature of the second argument to statistic. It can take on three values: "w" (weights), "f" (frequencies), or "i" (indices).  If boot.out is supplied the value of stype is set to boot.out$stype and any value supplied here is ignored. Otherwise it is an optional argument which defaults to "w". If type is "inf" then stype MUST be "w".  
字符变量的第二个参数statistic性质。它可以采取三个值:"w"(重),"f"(频率),或"i"(指数)。如果boot.out提供stype的价值设置为boot.out$stype这里提供的任何值将被忽略。否则,它是一个可选参数,默认为"w"。如果type是"inf"然后stype必须是"w"。


参数:index
An integer giving the position of the variable of interest in the output of statistic.  
一个整数的兴趣在statistic输出变量的位置。


参数:t
A vector of length boot.out$R which gives the bootstrap replicates of the statistic of interest.  t is used only when type is reg and it defaults to boot.out$t[,index].  
长度的向量boot.out$R这给人的引导,重复统计的兴趣。 t时type是reg“默认boot.out$t[,index]。


参数:strata
An integer vector or a factor specifying the strata for multi-sample problems. If boot.out is supplied  the value of strata is set to boot.out$strata. Otherwise it is an optional argument which has default corresponding to the single sample situation.  
指定整数向量或一个因素地层多重采样问题。如果boot.out提供strata的价值设置为boot.out$strata。否则,它是一个可选参数,默认对应的单个样品的情况。


参数:eps
This argument is used only if type is "inf".  In that case the value of epsilon to be used for numerical differentiation will be eps divided by the number of observations in data.  
这种说法是用来只有type是"inf"。 epsilon值,数值微分,在这种情况下,将eps由观测data的数量划分。


参数:...
Any other arguments that statistic takes.  They will be passed unchanged to statistic every time that it is called.  
任何其他参数,statistic需要。他们将通过不变statistic每次被调用时。


Details

详情----------Details----------

If type is "inf" then numerical differentiation is used to approximate the empirical influence values.  This makes sense only for statistics which are written in weighted form (i.e. stype is "w").  If type is "jack" then the usual leave-one-out jackknife estimates of the empirical influence are returned.  If type is "pos" then the positive (include-one-twice) jackknife values are used.  If type is "reg" then a bootstrap object must be supplied. The regression method then works by regressing the bootstrap replicates of statistic on the frequency array from which they were derived. The bootstrap frequency array is obtained through a call to boot.array.  Further details of the methods are given in Section 2.7 of Davison and Hinkley (1997).
如果type是"inf"然后数值微分近似的影响的经验值。这使得加权形式的书面统计意识(即stype是"w")。 type如果是"jack"然后平时休假一个出经验的影响折刀估计返回。 type如果是"pos"然后阳性(包括一两次)折刀值使用。如果type是"reg"然后引导对象必须提供。回归方法,然后由倒退引导复制statistic从它们被派生的频率数组。调用boot.array通过引导频率阵列得到。戴维森和欣克利(1997)2.7节中给出的方法的进一步细节。

Empirical influence values are often used frequently in nonparametric bootstrap applications.  For this reason many other functions call empinf when they are required.  Some examples of their use are for nonparametric delta estimates of variance, BCa intervals and finding linear approximations to statistics for use as control variates.  They are also used for antithetic bootstrap resampling.
实证的影响值通常用于经常在非参数引导应用。出于这个原因,许多其他函数调用empinf他们需要的时候。他们使用的一些例子三角洲非参数方差,BCA间隔作为控制变元的使用统计发现线性近似估计。它们也可以用来为偶举重采样。


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

A vector of the empirical influence values of statistic applied to data.  The values will be in the same order as the observations in data.
一个的statistic的经验影响值向量data的。值将是相同的顺序在数据的意见。


警告----------Warning----------

All arguments to empinf must be passed using the name =     value convention.  If this is not followed then unpredictable errors can occur.
所有empinf的参数,必须通过使用name =     value公约。如果不遵循这是不可预知的错误可能发生。


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

Bootstrap Methods and Their Application. Cambridge University Press.
Resampling Plans. CBMS-NSF Regional Conference Series in Applied Mathematics, 38, SIAM.
Lecture Notes in Statistics, 19, Springer-Verlag.

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

boot, boot.array, boot.ci, control, jack.after.boot, linear.approx, var.linear
boot,boot.array,boot.ci,control,jack.after.boot,linear.approx,var.linear


举例----------Examples----------


# The empirical influence values for the ratio of means in[实证的手段比的影响值]
# the city data.[城市数据。]
ratio <- function(d, w) sum(d$x *w)/sum(d$u*w)
empinf(data = city, statistic = ratio)
city.boot <- boot(city, ratio, 499, stype="w")
empinf(boot.out = city.boot, type = "reg")

# A statistic that may be of interest in the difference of means[一个统计手段的差异,可能会感兴趣]
# problem is the t-statistic for testing equality of means.  In[问题是测试手段平等的t-统计。在]
# the bootstrap we get replicates of the difference of means and[引导我们得到复制和手段的区别]
# the variance of that statistic and then want to use this output[该统计方差,然后要使用这个输出]
# to get the empirical influence values of the t-statistic.[获得经验的影响值的t-统计。]
grav1 <- gravity[as.numeric(gravity[,2]) >= 7,]
grav.fun <- function(dat, w) {
     strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
     d <- dat[, 1]
     ns <- tabulate(strata)
     w <- w/tapply(w, strata, sum)[strata]
     mns &lt;- as.vector(tapply(d * w, strata, sum)) # drop names[下降的名字]
     mn2 <- tapply(d * d * w, strata, sum)
     s2hat <- sum((mn2 - mns^2)/ns)
     c(mns[2] - mns[1], s2hat)
}

grav.boot <- boot(grav1, grav.fun, R = 499, stype = "w",
                  strata = grav1[, 2])

# Since the statistic of interest is a function of the bootstrap[由于利益的统计数据是一个引导功能]
# statistics, we must calculate the bootstrap replicates and pass[统计数据,我们必须计算引导复制,并通过]
# them to empinf using the t argument.[他们empinf使用t参数。]
grav.z <- (grav.boot$t[,1]-grav.boot$t0[1])/sqrt(grav.boot$t[,2])
empinf(boot.out = grav.boot, t = grav.z)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-2 16:58 , Processed in 0.024934 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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