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

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

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

                                         Smooth Distributions on Data Points
                                         数据点上的平稳分布

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

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

This function uses the method of frequency smoothing to find a distribution  on a data set which has a required value, theta,  of the statistic of  interest.  The method results in distributions which vary smoothly with  theta.
此功能使用平滑找到了一个数据集,其中有一个必需的值,theta感兴趣的统计,分布频率的方法。方法在分布的结果不同theta的顺利。


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


smooth.f(theta, boot.out, index = 1, t = boot.out$t[, index],
         width = 0.5)



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

参数:theta
The required value for the statistic of interest.  If theta is a vector, a separate distribution will be found for each element of theta.  
利益的统计所需的值。 theta如果是一个向量,会发现一个单独的分布为每个元素的theta。


参数:boot.out
A bootstrap output object returned by a call to boot.   
返回调用boot由一个引导输出对象。


参数:index
The index of the variable of interest in the output of boot.out$statistic. This argument is ignored if t is supplied.  index must be a scalar.  
该指数的兴趣在boot.out$statistic输出变量。如果t提供此参数将被忽略。 index必须是一个标量。


参数:t
The bootstrap values of the statistic of interest.  This must be a vector of length boot.out$R and the values must be in the same order as the bootstrap replicates in boot.out.  
引导利益的统计值。这必须是一个长度boot.out$R“的值必须以相同的顺序是引导在boot.out复制的向量。


参数:width
The standardized width for the kernel smoothing.  The smoothing uses a value of width*s for epsilon, where s is the bootstrap estimate of the  standard error of the statistic of interest.  width should take a value in  the range (0.2, 1) to produce a reasonable smoothed distribution.  If width is too large then the distribution becomes closer to uniform.   </table>
标准化宽度为内核平滑。平滑使用值width*s为小量,其中s是利益的统计标准错误的引导估计。 width应采取一个范围值(0.2,1)产生一个合理的平滑分布。 width如果过大则分布变得均匀。 </ TABLE>


Details

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

The new distributional weights are found by applying a normal kernel smoother to the observed values of t weighted by the observed frequencies in the bootstrap simulation.  The resulting distribution may not have parameter value exactly equal to the required value theta but it will  typically have a value which is close to theta.  The details of how this method works can be found in Davison, Hinkley and Worton (1995) and Section 3.9.2 of Davison and Hinkley (1997).
申请一个正常的内核更流畅的观测值的新的分配权t引导模拟观测到的频率加权。分布可能没有参数值恰好等于所需的值theta,但它通常有一个价值,这是密切theta。这种方法可以发现,欣克利和戴维森Worton(1995年)和第3.9.2(1997年)的戴维森和欣克利的细节。


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

If length(theta) is 1 then a vector with the same length as the data set boot.out$data is returned.  The value in position i is the probability  to be given to the data point in position i so that the distribution has  parameter value approximately equal to theta. If length(theta) is bigger than 1 then the returned value is a matrix with  length(theta) rows each of which corresponds to a distribution with the  parameter value approximately equal to the corresponding value of theta.
length(theta)如果是1,那么与相同长度的数据集boot.out$data返回的向量。位置i的价值是,得到的数据点的位置的概率i使分布参数值约等于theta。 length(theta)如果大于1,则返回值是一个length(theta)行,每个对应一个分布参数值约等于相应值的theta矩阵。


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


construction of bootstrap likelihoods. Statistics and Computing,  5, 257&ndash;264.

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

boot, exp.tilt, tilt.boot
boot,exp.tilt,tilt.boot


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


# Example 9.8 of Davison and Hinkley (1997) requires tilting the resampling[戴维森和欣克利(1997)9.8为例,需要倾斜的重采样]
# distribution of the studentized statistic to be centred at the observed[学生化统计分布在观测中心]
# value of the test statistic 1.84.  In the book exponential tilting was used[测试统计值1.84。在这本书中,指数倾斜]
# but it is also possible to use smooth.f.[但它也有可能使用smooth.f。]
grav1 <- gravity[as.numeric(gravity[, 2]) >= 7, ]
grav.fun <- function(dat, w, orig) {
     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, (mns[2]-mns[1]-orig)/sqrt(s2hat))
}
grav.z0 <- grav.fun(grav1, rep(1, 26), 0)
grav.boot <- boot(grav1, grav.fun, R = 499, stype = "w",
                  strata = grav1[, 2], orig = grav.z0[1])
grav.sm <- smooth.f(grav.z0[3], grav.boot, index = 3)

# Now we can run another bootstrap using these weights[现在我们可以运行另一个使用这些权重的引导]
grav.boot2 <- boot(grav1, grav.fun, R = 499, stype = "w",
                   strata = grav1[, 2], orig = grav.z0[1],
                   weights = grav.sm)

# Estimated p-values can be found from these as follows[预测市盈率值,可以发现,从这些如下:]
mean(grav.boot$t[, 3] >= grav.z0[3])
imp.prob(grav.boot2, t0 = -grav.z0[3], t = -grav.boot2$t[, 3])


# Note that for the importance sampling probability we must [请注意,为重要抽样概率,我们必须]
# multiply everything by -1 to ensure that we find the correct[乘以-1的一切,以确保我们找到正确的]
# probability.  Raw resampling is not reliable for probabilities[概率。的概率是不可靠的原料重采样]
# greater than 0.5. Thus[大于0.5。从而]
1 - imp.prob(grav.boot2, index = 3, t0 = grav.z0[3])$raw
# can give very strange results (negative probabilities).[可非常奇怪的结果(负的概率)。]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 11:56 , Processed in 0.020001 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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