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

R语言 SkewHyperbolic包 SkewHyperbolicDistribution()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 09:51:17 | 显示全部楼层 |阅读模式
SkewHyperbolicDistribution(SkewHyperbolic)
SkewHyperbolicDistribution()所属R语言包:SkewHyperbolic

                                         Skewed Hyperbolic Student t-Distribution
                                         斜交双曲学生t分布

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

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

Density function, distribution function, quantiles and random number generation for the skew hyperbolic Student t-distribution, with parameters beta (skewness), delta (scale), mu (location) and nu (shape). Also a function for the derivative of the density function.
密度函数,分布函数,分位数的倾斜双曲学生t分布的随机数生成,参数beta(偏斜度),delta(规模),mu(位置)和nu(形状)。同时作为一个函数的导数的密度函数。


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


dskewhyp(x, mu = 0, delta = 1, beta = 1, nu = 1,
         param = c(mu,delta,beta,nu), log = FALSE,
         tolerance = .Machine$double.eps^0.5)
pskewhyp(q, mu = 0, delta = 1, beta = 1, nu = 1,
         param = c(mu, delta, beta, nu), log.p = FALSE,
         lower.tail = TRUE, subdivisions = 100,
         intTol = .Machine$double.eps^0.25, valueOnly = TRUE, ...)
qskewhyp(p, mu = 0, delta = 1, beta = 1, nu = 1,
         param = c(mu,delta, beta, nu),
         lower.tail = TRUE, log.p = FALSE,
         method = c("spline","integrate"),
         nInterpol = 501, uniTol = .Machine$double.eps^0.25,
         subdivisions = 100, intTol = uniTol, ...)
rskewhyp(n, mu = 0, delta = 1, beta = 1, nu = 1,
         param = c(mu,delta,beta,nu), log = FALSE)
ddskewhyp(x, mu = 0, delta = 1, beta = 1, nu = 1,
          param = c(mu,delta,beta,nu),log = FALSE,
          tolerance = .Machine$double.eps^0.5)



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

参数:x,q
Vector of quantiles.
向量的位数。


参数:p
Vector of probabilities.
向量的可能性。


参数:n
Number of random variates to be generated.
要生成的随机变数数目。


参数:mu
Location parameter mu, default is 0.
位置参数mu,默认为0。


参数:delta
Scale parameter delta, default is 1.
尺度参数delta,默认值是1。


参数:beta
Skewness parameter beta, default is 1.
偏度参数beta,默认值是1。


参数:nu
Shape parameter nu, default is 1.
形状参数nu,默认值是1。


参数:param
Specifying the parameters as a vector of the form<br> c(mu,delta,beta,nu).
指定参数作为一个向量的形式<br>物理化学学报c(mu,delta,beta,nu)。


参数:log,log.p
Logical; if log = TRUE, probabilities are given as log(p).
逻辑,如果log = TRUE,概率给定的作为log(P)。


参数:method
Character. If "spline" quantiles are found from a spline approximation to the distribution function. If "integrate", the distribution function used is always obtained by integration.
字符。如果"spline"位数是样条曲线逼近的分布函数。如果"integrate",所用的分布函数总是通过积分获得。


参数:lower.tail
Logical. If lower.tail = TRUE, the cumulative density is taken from the lower tail.
逻辑。如果lower.tail = TRUE,采取的累积密度从较低的尾部。


参数:tolerance
Specified level of tolerance when checking if parameter beta is equal to 0.
指定级别的耐受性检查时,如果参数beta等于0。


参数:subdivisions
The maximum number of subdivisions used to integrate the density and determine the accuracy of the distribution function calculation.
的最大数目的细分用于集成密度和确定的分布函数计算的准确性。


参数:intTol
Value of rel.tol and hence abs.tol in calls to integrate. See integrate.
rel.tol“,因此abs.tol在调用integrate。见integrate。


参数:valueOnly
Logical. If valueOnly = TRUE calls to pskewhyp only return the value obtained for the integral. If valueOnly = FALSE an estimate of the accuracy of the numerical integration is also returned.
逻辑。 valueOnly = TRUE如果调用pskewhyp只返回值获得的积分。如果valueOnly = FALSE的估计值的精度的数值积分,也返回。


参数:nInterpol
Number of points used in qskewhyp for cubic spline interpolation of the distribution function.
在qskewhyp的分布函数为三次样条插值点的数量。


参数:uniTol
Value of tol in calls to uniroot. See uniroot.
价值tol调用uniroot。见uniroot。


参数:...
Passes additional arguments to integrate in pskewhyp and qskewhyp, and to uniroot in qskewhyp.
额外的参数传递到integratepskewhyp和qskewhyp,和uniroot中qskewhyp。


Details

详细信息----------Details----------

Users may either specify the values of the parameters individually or as a vector. If both forms are specified, then the values specified by the vector param will overwrite the other ones. In addition the parameter values are examined by calling the function skewhypCheckPars to see if they are valid.
用户可以指定单独或作为一个向量参数的值。如果两种形式都被指定,那么向量param指定的值将覆盖其他的人。此外,参数值的检查通过调用函数skewhypCheckPars,看看他们是否是有效的。

The density function is
密度函数是

when beta != 0, and
当beta != 0,

when beta = 0, where K_nu(.) is the modified Bessel function of the third kind with order nu, and gamma(.) is the gamma function.
beta = 0,其中K_nu(.)是修正Bessel函数的第三类与为了nu,gamma(.)是伽玛函数。

pskewhyp uses the function integrate to numerically integrate the density function. The integration is from -Inf to x if x is to the left of the mode, and from x to Inf if x is to the right of the mode. The probability calculated this way is subtracted from 1 if required. Integration in this manner appears to make calculation of the quantile function more stable in extreme cases.
pskewhyp使用的功能integrate数值积分的密度函数。整合是从-Inf到x如果x是左边的模式,并从xInf如果x是的权利的模式。如果需要的话,这种方式计算出的概率,从1中减去。整合以这种方式出现,使位数的功能更加稳定,在极端的情况下计算的。

Calculation of quantiles using qhyperb permits the use of two different methods. Both methods use uniroot to find the value of x for which a given q is equal F(x) where F denotes the cumulative distribution function. The difference is in how the numerical approximation to F is obtained. The obvious and more accurate method is to calculate the value of F(x) whenever it is required using a call to phyperb. This is what is done if the method is specified as "integrate". It is clear that the time required for this approach is roughly linear in the number of quantiles being calculated. A Q-Q plot of a large data set will clearly take some time. The alternative (and default) method is that for the major part of the distribution a spline approximation to F(x) is calculated and quantiles found using uniroot with this approximation. For extreme values (for which the tail probability is less than 10^(-7)), the integration method is still used even when the method specifed is "spline".
分位数使用qhyperb的计算允许使用两种不同的方法。这两种方法都使用uniroot值x的q等于F(x)其中F表示累积分布函数。所不同的是在数值逼近F获得。最明显的和更精确的方法来计算的值F(x),只要它是需要使用的呼叫phyperb。这是什么做的方法被指定为"integrate"。很显然,这种方法所需要的时间大致是线性的位数的数目被计算。一个QQ的大型数据集的图显然需要一段时间。另一种方法是(默认)的主要部分的分布样条曲线近似F(x)位数计算和使用uniroot近似。对于极端值(尾概率是小于10^(-7))的整合方法仍然是使用的方法,即使具体确定是"spline"。

If accurate probabilities or quantiles are required, tolerances (intTol and uniTol) should be set to small values, say 10^(-10) or 10^(-12) with method   = "integrate". Generally then accuracy might be expected to be at least 10^(-9). If the default values of the functions are used, accuracy can only be expected to be around 10^(-4). Note that on 32-bit systems .Machine$double.eps^0.25 = 0.0001220703 is a typical value.
如果需要准确的概率或位数,公差(intTol和uniTol)应设置为较小的值,比如10^(-10)或10^(-12)method   = "integrate"。一般来说精度可能会预计将至少10^(-9)。如果使用的功能的默认值,精度只能预期左右10^(-4)。请注意,32位.Machine$double.eps^0.25 = 0.0001220703的是一个典型值。

Note that when small values of nu are used, and the density is skewed, there are often some extreme values generated by rskewhyp. These look like outliers, but are caused by the heaviness of the skewed tail, see Examples.
需要注意的是当小值nu的使用,以及倾斜的密度,经常有一些极端值所产生的rskewhyp。这些看起来像离群值,但所造成的沉重倾斜的尾部,看到的例子。

The extreme skewness of the distribution when beta is large in absolute value and nu is small make this distribution very challenging numerically.
极端的偏态分布,当beta大的绝对值和nu小分布非常具有挑战性的数字。


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

dskewhyp gives the density function, pskewhyp gives the distribution function, qskewhyp gives the quantile function and rskewhyp generates random variates.
dskewhyp给出了密度函数,pskewhyp给出了分布函数,qskewhyp给出了分位数的功能和rskewhyp生成随机变数。

An estimate of the accuracy of the approximation to the distribution function can be found by setting valueOnly = FALSE in the call to pskewyhp which returns a list with components value and error.
的估计值的分布函数的近似的精度,可以发现通过设置valueOnly = FALSE在pskewyhp呼叫返回一个列表组件value和error。

ddskewhyp gives the derivative of dskewhyp.
ddskewhyp提供的衍生dskewhyp。


(作者)----------Author(s)----------



David Scott <a href="mailto:d.scott@auckland.ac.nz">d.scott@auckland.ac.nz</a>, Fiona Grimson




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

The Generalised Hyperbolic Skew Student's t-distribution, Journal of Financial Econometrics, 4, 275&ndash;309.

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

safeIntegrate, integrate for its shortfalls, skewhypCheckPars, logHist. Also skewhypMean for information on moments and mode, and skewhypFit for fitting to data.
safeIntegrate,integrate它的不足之处,skewhypCheckPars,logHist。 skewhypMean矩和模式的信息,skewhypFit拟合数据。


实例----------Examples----------


param <- c(0,1,40,10)
par(mfrow = c(1,2))
range <- skewhypCalcRange(param = param, tol = 10^(-2))

### curves of density and distribution[##曲线,密度和分布]
curve(dskewhyp(x, param = param), range[1], range[2], n = 1000)
title("Density of the \n Skew Hyperbolic Distribution")
curve(pskewhyp(x, param = param),
      range[1], range[2], n = 500)
title("Distribution Function of the \n Skew Hyperbolic Distribution")

### curves of density and log density[##密度曲线和log密度]
par(mfrow = c(1,2))
data <- rskewhyp(1000, param = param)
curve(dskewhyp(x, param = param), range(data)[1], range(data)[2],
      n = 1000, col = 2)
hist(data, freq = FALSE, add = TRUE)
title("Density and Histogram of the\n Skew Hyperbolic Distribution")
logHist(data, main = "Log-Density and Log-Histogram of\n the Skew
      Hyperbolic Distribution")
curve(dskewhyp(x, param = param, log = TRUE),
      range(data)[1], range(data)[2],
      n = 500, add = TRUE, col = 2)

##plots of density and derivative[#图的密度及衍生工具]
par(mfrow = c(2,1))
curve(dskewhyp(x, param = param), range[1], range[2], n = 1000)
title("Density of the Skew\n Hyperbolic Distribution")
curve(ddskewhyp(x, param = param), range[1], range[2], n = 1000)
title("Derivative of the Density\n of the Skew Hyperbolic Distribution")

##example of density and random numbers for beta large and nu small[公测大女小的密度和随机数的例子]
par(mfrow = c(1,2))
param1 <- c(0,1,10,1)
data1 <- rskewhyp(1000, param = param1)
curve(dskewhyp(x, param = param1), range(data1)[1], range(data1)[2],
      n = 1000, col = 2)
hist(data1, freq = FALSE, add = TRUE)
title("Density and Histogram\n when nu is small")
logHist(data1, main = "Log-Density and Log-Histogram\n when nu is small")
curve(dskewhyp(x, param = param1, log = TRUE),
      range(data1)[1], range(data1)[2],
      n = 500, add = TRUE, col = 2)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-25 22:08 , Processed in 0.020965 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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