lines.saddle.distn(boot)
lines.saddle.distn()所属R语言包:boot
Add a Saddlepoint Approximation to a Plot
新增的鞍点逼近的图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function adds a line corresponding to a saddlepoint density or distribution function approximation to the current plot.
此功能增加了一个线对应1的鞍密度或分布函数逼近当前的图。
用法----------Usage----------
## S3 method for class 'saddle.distn'
lines(x, dens = TRUE, h = function(u) u, J = function(u) 1,
npts = 50, lty = 1, ...)
参数----------Arguments----------
参数:x
An object of class "saddle.distn" (see saddle.distn.object representing a saddlepoint approximation to a distribution.
类对象"saddle.distn"(见saddle.distn.object代表一个鞍点近似分布。
参数:dens
A logical variable indicating whether the saddlepoint density (TRUE; the default) or the saddlepoint distribution function (FALSE) should be plotted.
鞍密度(是否TRUE;默认)或鞍点分布函数(FALSE)的应绘制一个逻辑变量。
参数:h
Any transformation of the variable that is required. Its first argument must be the value at which the approximation is being performed and the function must be vectorized.
任何变量的转变需要。其第一个参数必须是在逼近正在执行的功能,必须量化的价值。
参数:J
When dens=TRUE this function specifies the Jacobian for any transformation that may be necessary. The first argument of J must the value at which the approximation is being performed and the function must be vectorized. If h is supplied J must also be supplied and both must have the same argument list.
当dens=TRUE此功能指定的任何改造,这可能是必要的雅可比。第一个参数J必须逼近正在执行的功能,必须量化的价值。如果h提供J还必须提供,都必须具有相同的参数列表。
参数:npts
The number of points to be used for the plot. These points will be evenly spaced over the range of points used in finding the saddlepoint approximation.
图点的数量。将这些点均匀分布在范围内寻找鞍点逼近点。
参数:lty
The line type to be used.
要使用的线路类型。
参数:...
Any additional arguments to h and J.
任何额外的参数h和J。
Details
详情----------Details----------
The function uses smooth.spline to produce the saddlepoint curve. When dens=TRUE the spline is on the log scale and when dens=FALSE it is on the probit scale.
功能使用smooth.spline产生鞍点的曲线。当dens=TRUE样条日志规模和dens=FALSE它是概率规模。
值----------Value----------
sad.d is returned invisibly.
sad.d返回无形。
副作用----------Side Effects----------
A line is added to the current plot.
行被添加到当前的图。
参考文献----------References----------
Bootstrap Methods and Their Application. Cambridge University Press.
参见----------See Also----------
saddle.distn
saddle.distn
举例----------Examples----------
# In this example we show how a plot such as that in Figure 9.9 of[在这个例子中我们将展示如何如在图9.9中的图]
# Davison and Hinkley (1997) may be produced. Note the large number of[戴维森和欣克利(1997)可能会产生。注意:大量]
# bootstrap replicates required in this example.[在这个例子中需要引导重复。]
expdata <- rexp(12)
vfun <- function(d, i) {
n <- length(d)
(n-1)/n*var(d[i])
}
exp.boot <- boot(expdata,vfun, R = 9999)
exp.L <- (expdata - mean(expdata))^2 - exp.boot$t0
exp.tL <- linear.approx(exp.boot, L = exp.L)
hist(exp.tL, nclass = 50, probability = TRUE)
exp.t0 <- c(0, sqrt(var(exp.boot$t)))
exp.sp <- saddle.distn(A = exp.L/12,wdist = "m", t0 = exp.t0)
# The saddlepoint approximation in this case is to the density of[在这种情况下的鞍点逼近密度]
# t-t0 and so t0 must be added for the plot.[T-T0,因此T0必须添加的图。]
lines(exp.sp, h = function(u, t0) u+t0, J = function(u, t0) 1,
t0 = exp.boot$t0)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|