exp.tilt(boot)
exp.tilt()所属R语言包:boot
Exponential Tilting
指数倾斜
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function calculates exponentially tilted multinomial distributions such that the resampling distributions of the linear approximation to a statistic have the required means.
此函数计算指数倾斜的这样一个统计线性逼近的重采样分布有必要的手段多项式分布。
用法----------Usage----------
exp.tilt(L, theta = NULL, t0 = 0, lambda = NULL,
strata = rep(1, length(L)))
参数----------Arguments----------
参数:L
The empirical influence values for the statistic of interest based on the observed data. The length of L should be the same as the size of the original data set. Typically L will be calculated by a call to empinf.
观测数据的基础上的利益的统计经验的影响值。 L长度应该是原始数据集的大小相同。通常情况下L将计算由empinf调用。
参数:theta
The value at which the tilted distribution is to be centred. This is not required if lambda is supplied but is needed otherwise.
是要集中值倾斜的分配。如果lambda提供,但需要的,否则这不是必需的。
参数:t0
The current value of the statistic. The default is that the statistic equals 0.
统计当前值。默认的是,统计等于0。
参数:lambda
The Lagrange multiplier(s). For each value of lambda a multinomial distribution is found with probabilities proportional to exp(lambda * L). In general lambda is not known and so theta would be supplied, and the corresponding value of lambda found. If both lambda and theta are supplied then lambda is ignored and the multipliers for tilting to theta are found.
拉格朗日乘数(S)。对于每个价值lambda多项式分布发现与exp(lambda * L)概率成正比。在一般lambda不知道和theta将提供和lambda的相应值发现。如果双方lambda和theta然后是提供lambda被忽略,并且倾斜乘数theta被发现。
参数:strata
A vector or factor of the same length as L giving the strata for the observed data and the empirical influence values L. </table>
L所观察到的数据和经验的影响值L阶层相同长度的向量或因素。 </ TABLE>
Details
详情----------Details----------
Exponential tilting involves finding a set of weights for a data set to ensure that the bootstrap distribution of the linear approximation to a statistic of interest has mean theta. The weights chosen to achieve this are given by p[j] proportional to exp(lambda*L[j]/n), where n is the number of data points. lambda is then chosen to make the mean of the bootstrap distribution, of the linear approximation to the statistic of interest, equal to the required value theta. Thus lambda is defined as the solution of a nonlinear equation. The equation is solved by minimizing the Euclidean distance between the left and right hand sides of the equation using the function nlmin. If this minimum is not equal to zero then the method fails.
找到一组数据集,以确保线性近似的引导,分配利益的统计,平均theta权重指数倾斜。选择实现这一目标的权重由p[j]exp(lambda*L[j]/n),其中n是数据点的数量。成正比lambda然后选择感兴趣的统计,引导分布均值的线性近似,等于所需的值theta。因此lambda被定义为一个非线性方程的解。方程解决,尽量减少使用功能nlmin等式的左边和右边双方之间的欧几里德距离。如果这个最低是不等于零,则该方法失败。
Typically exponential tilting is used to find suitable weights for importance resampling. If a small tail probability or quantile of the distribution of the statistic of interest is required then a more efficient simulation is to centre the resampling distribution close to the point of interest and then use the functions imp.prob or imp.quantile to estimate the required quantity.
通常指数的倾斜是用来寻找合适重量的重要性重采样。如果一个小尾巴概率或利益的统计分布的分位数则需要一个更有效的模拟中心的重采样分布接近的兴趣点,然后使用功能imp.prob或imp.quantile估计所需的数量。
Another method of achieving a similar shifting of the distribution is through the use of smooth.f. The function tilt.boot uses exp.tilt or smooth.f to find the weights for a tilted bootstrap.
实现了类似的分布转移的另一种方法是通过使用smooth.f。函数tilt.boot使用exp.tilt或smooth.f找到一个倾斜的引导权重。
值----------Value----------
A list with the following components :
以下组件列表:
参数:p
The tilted probabilities. There will be m distributions where m is the length of theta (or lambda if supplied). If m is 1 then p is a vector of length(L) probabilities. If m is greater than 1 then p is a matrix with m rows, each of which contain length(L) probabilities. In this case the vector p[i,] is the distribution tilted to theta[i]. p is in the form required by the argument weights of the function boot for importance resampling.
倾斜的可能性。会有m分布的地方mtheta(或lambda如果提供)的长度。 m如果1plength(L)概率向量。如果m然后是大于1p是m行,每个包含length(L)概率矩阵。在这种情况下向量p[i,]是theta[i]倾斜的分布。 ,p在参数功能weights重要性重采样boot要求的形式。
参数:lambda
The Lagrange multiplier used in the equation to determine the tilted probabilities. lambda is a vector of the same length as theta.
在公式中使用拉格朗日乘数确定倾斜的概率。 lambda是为theta相同长度的向量。
参数:theta
The values of theta to which the distributions have been tilted. In general this will be the input value of theta but if lambda was supplied then this is the vector of the corresponding theta values. </table>
theta分布已倾斜的值。一般情况下,这将是输入theta如果lambda提供的价值,但那么这是相应的theta值的向量。 </ TABLE>
参考文献----------References----------
Bootstrap Methods and Their Application. Cambridge University Press.
(with Discussion). Canadian Journal of Statistics, 9, 139–172.
参见----------See Also----------
empinf, imp.prob, imp.quantile, optim, smooth.f, tilt.boot
empinf,imp.prob,imp.quantile,optim,smooth.f,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. This can be achieved as follows.[测试统计值1.84。这样就可以实现如下。]
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 <- 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.L <- empinf(data = grav1, statistic = grav.fun, stype = "w",
strata = grav1[,2], index = 3, orig = grav.z0[1])
grav.tilt <- exp.tilt(grav.L, grav.z0[3], strata = grav1[,2])
boot(grav1, grav.fun, R = 499, stype = "w", weights = grav.tilt$p,
strata = grav1[,2], orig = grav.z0[1])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|