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

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

[复制链接]
发表于 2012-10-1 14:24:58 | 显示全部楼层 |阅读模式
VarianceGammaDistribution(VarianceGamma)
VarianceGammaDistribution()所属R语言包:VarianceGamma

                                        The Variance Gamma Distribution
                                         方差Gamma分布

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

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

Density function, distribution function, quantiles and random number generation for the variance gamma distribution with parameters c (location), sigma (spread), theta (asymmetry) and nu (shape). Utility routines are included for the derivative of the density function and to find suitable break points for use in determining the distribution function.
密度函数,分布函数,分位数和随机数生成的方差伽玛分布参数c(位置),sigma(扩散),theta(不对称)和nu (形状)。实用程序例程包括的密度函数的导数和用于在确定的分布函数以找到合适的中断点。


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


  dvg(x, vgC = 0, sigma = 1, theta = 0, nu = 1,
    param = c(vgC,sigma,theta,nu), log = FALSE,
    tolerance = .Machine$double.eps ^ 0.5, ...)
  pvg(q, vgC = 0, sigma = 1, theta = 0, nu = 1,
    param = c(vgC,sigma,theta,nu), lower.tail = TRUE, log.p = FALSE,
    small = 10^(-6), tiny = 10^(-10), deriv = 0.3, subdivisions = 100,
    accuracy = FALSE, ...)
  qvg(p, vgC = 0, sigma = 1, theta = 0, nu = 1,
    param = c(vgC,sigma,theta,nu), lower.tail = TRUE, log.p = FALSE,
    small = 10^(-6), tiny = 10^(-10), deriv = 0.3, nInterpol = 100,
    subdivisions = 100, ...)
  rvg(n, vgC = 0, sigma = 1, theta = 0, nu = 1,
    param = c(vgC,sigma,theta,nu))
  ddvg (x,  vgC = 0, sigma = 1, theta = 0, nu = 1,
    param = c(vgC,sigma,theta,nu), log = FALSE,
    tolerance = .Machine$double.eps ^ 0.5, ...)
  vgBreaks (vgC = 0, sigma = 1, theta = 0, nu = 1,
    param = c(vgC,sigma,theta,nu), small = 10^(-6), tiny = 10^(-10),
    deriv = 0.3, ...)



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

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


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


参数:n
Number of observations to be generated.
要生成的观测数。


参数:vgC
The location parameter c, default is 0.
位置参数c,默认为0。


参数:sigma
The spread parameter sigma, default is 1, must be positive.
扩散参数sigma,默认为1,必须是积极的。


参数:theta
The asymmetry parameter theta, default is 0.
的不对称参数theta,默认为0。


参数:nu
The shape parameter nu, default is 1, must be positive.
形状参数nu,默认为1,必须是积极的。


参数:param
Specifying the parameters as a vector which takes the form c(vgC,sigma,theta,nu).
指定的参数作为向量的形式c(vgC,sigma,theta,nu)。


参数:log, log.p
Logical; if TRUE, probabilities p are given as log(p); not yet implemented.
逻辑,如果TRUE,给出概率P为log(P);尚未实现。


参数:lower.tail
If TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]; not yet implemented.
如果为TRUE(默认值),概率是P[X <= x],否则,P[X > x];尚未实施。


参数:small
Size of a small difference between the distribution function and zero or one. See Details.
之间的分布函数和零个或一个小的差异的大小。查看详细信息。


参数:tiny
Size of a tiny difference between the distribution function and zero or one. See Details.
的大小的分布函数和零个或一个一个微小的区别。查看详细信息。


参数:deriv
Value between 0 and 1. Determines the point where the derivative becomes substantial, compared to its maximum value. See Details.
0和1之间的值。确定该衍生物变得大幅的地步,相比,其最大值。查看详细信息。


参数:accuracy
Uses accuracy calculated by~integrate to try and determine the accuracy of the distribution function calculation.
使用精度计算出的~integrate尝试的分布函数的计算和判断的准确性。


参数:subdivisions
The maximum number of subdivisions used to integrate the density returning the distribution function.
用于集成返回的分布函数的密度的最大数目的细分。


参数:nInterpol
The number of points used in qvg for cubic spline interpolation (see splinefun) of the distribution function.
在qvg三次样条插值点(见splinefun)的分布函数。


参数:tolerance
Size of a machine difference between two values. See Details.
的一台机器的两个值之间的差异的大小。查看详细信息。


参数:...
Passes arguments to uniroot.  See Details.
传递参数到uniroot。查看详细信息。


Details

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

Users may either specify the values of the parameters individually or as a vector. If both forms are specifed but with different values, then the values specified by vector param will always overwrite the other ones.
用户可以指定单独或作为一个向量参数的值。如果两种形式都指定不同的值,然后指定的值的矢量param将始终覆盖其他的人。

The variance gamma distribution has density
方差伽玛分布密度

where K_nu() is the modified Bessel function of the third kind of order nu, and
其中K_nu()是为了nu的第三类修正Bessel函数,

Special cases:
特殊情况:

1. If nu < 2 and x = c, then the density function is approximate to
1。如果nu < 2和x = c,然后的密度函数是近似

2. If nu >= 2 and x = c, then the density function is taken the value Inf.
2。如果nu >= 2和x = c,密度函数值天道酬勤。

Use vgChangePars to convert from the (mu, sigma, theta, tau), or (theta, sigma, kappa, tau) parameterisations given in Kotz et al. (2001) to the (c, sigma, theta, nu) parameterisation used above.
使用vgChangePars转换(mu, sigma, theta, tau)或科兹等(theta, sigma, kappa, tau)parameterisations的,。 (2001)(c, sigma, theta, nu)参数设置上面使用的。

pvg breaks the real line into eight regions in order to determine the integral of dvg. The break points determining the regions are found by vgBreaks, based on the values of small, tiny, and deriv. In the extreme tails of the distribution where the probability is tiny according to vgCalcRange, the probability is taken to be zero.  In the inner part of the distribution, the range is divided in 6 regions, 3 above the mode, and 3 below. On each side of the mode, there are two break points giving the required three regions. The outer break point is where the probability in the tail has the value given by the variable small. The inner break point is where the derivative of the density function is deriv times the maximum value of the derivative on that side of the mode. In each of the 6 inner regions the numerical integration routine safeIntegrate (which is a wrapper for integrate) is used to integrate the density dvg.
pvg打破了实线分为八个区域,以确定的积分dvg的。破发点确定的区域被发现vgBreaks,根据small,tiny的值,和deriv。的分布的概率是在极端的尾巴tiny根据vgCalcRange,被取为0的概率。在分布的内侧部分,范围划分为6个区域,上述第3模式,和第3段。每一侧上的模式中,有两个地提供所需的三个区域的中断点。的外断点在尾部的概率是具有给定的值由可变small。的内断点是其中的密度函数的导数是deriv倍的最大的值的模式的那一侧上的衍生物。在6内的每个区域中的数值积分例程safeIntegrate(integrate),用于集成的密度dvg是一个包装。

qvg uses the breakup of the real line into the same 8 regions as pvg. For quantiles which fall in the 2 extreme regions, the quantile is returned as -Inf or Inf as appropriate. In the 6 inner regions splinefun is used to fit values of the distribution function generated by pvg. The quantiles are then found using the uniroot function.
qvg使用相同的8个区域pvg解体实线。在极端区域的位数,位数,则返回-Inf或Inf。在6内部区域splinefun被用于拟合值的分布函数所产生pvg。位数,然后发现使用uniroot功能的。

pvg and qvg may generally be expected to be accurate to 5 decimal places.
pvg和qvg一般可预期的是精确到5位小数。

The variance gamma distribution is discussed in Kotz et al (2001).  It can be seen to be the weighted difference of two i.i.d. gamma variables shifted by the value of theta. rvg uses this representation to generate oberservations from the variance gamma distribution.
科兹等人(2001)的方差伽玛分布进行了讨论。它可以被看作是两个独立同分布的加权差分伽玛变量移位的值theta。 rvg使用此表示,从方差伽玛分布来生成玉米离。


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

dvg gives the density function, pvg gives the distribution function, qvg gives the quantile function and rvg generates random variates. An estimate of the accuracy of the approximation to the distribution function may be found by setting accuracy=TRUE in the call to pvg which then returns a list with components value and error.
dvg给出了密度函数,pvg给出了分布函数,qvg给出了分位数的功能和rvg生成随机变数。的近似的分布函数的估计值的精度可能会发现通过设置accuracy=TRUE中的呼叫到pvg然后返回一个列表组件value和error。

ddvg gives the derivative of dvg.
ddvg提供的衍生dvg。

vgBreaks returns a list with components:
vgBreaks返回一个列表的组件:


参数:xTiny
Value such that probability to the left is less than tiny.
值,例如概率的左边是小于tiny。


参数:xSmall
Value such that probability to the left is less than small.
值,例如概率的左边是小于small。


参数:lowBreak
Point to the left of the mode such that the derivative of the density is deriv times its maximum value on that side of the mode.
指向左侧的模式,使得衍生物的密度是deriv倍模式的那一侧上的最大值。


参数:highBreak
Point to the right of the mode such that the derivative of the density is deriv times its maximum value on that side of the mode.
点权利的模式,使得衍生物的密度是deriv倍模式的那一侧上的最大值。


参数:xLarge
Value such that probability to the right is less than small.
正确的概率是小于small值等。


参数:xHuge
Value such that probability to the right is less than tiny.
正确的概率是小于tiny值等。


参数:modeDist
The mode of the given variance gamma distribution.
模式的方差伽玛分布。


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


David Scott <a href="mailto:d.scott@auckland.ac.nz">d.scott@auckland.ac.nz</a>,
Christine Yang Dong <a href="mailto:c.dong@auckland.ac.nz">c.dong@auckland.ac.nz</a>



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

J. Appl. Prob., 41A:177&ndash;187. Kotz, S, Kozubowski, T. J., and Podg贸rski, K. (2001).  The Laplace Distribution and Generalizations. Birkhauser, Boston, 349 p.

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

vgChangePars, vgCalcRange
vgChangePars,vgCalcRange


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


## Use the following rules for vgCalcRange when plotting graphs for dvg,[#为DVG绘制图表时,使用以下规则vgCalcRange]
## ddvg and pvg.[#ddvg和PVG。]
## if nu &lt; 2, use:[#NU <2,使用:]
##   maxDens &lt;- dvg(vgMode(param = c(vgC, sigma, theta, nu)),[#maxDens < -  DVG(vgMode(参数= C(VGC,γ,σ,θ)),]
##   param = c(vgC, sigma, theta, nu), log = FALSE)[#参数= C(VGC,γ,σ,θ),登录= FALSE)]
##   vgRange &lt;- vgCalcRange(param = c(vgC, sigma, theta, nu),[#vgRange  -  vgCalcRange(参数= C(VGC,σ,θ,女),]
##     tol = 10^(-2)*maxDens, density = TRUE)[TOL = 10 ^(-2)* maxDens,密度= TRUE)]

## if nu &gt;= 2 and theta &lt; 0, use:[#如果NU> = 2,θ<0时,使用:]
##   vgRange &lt;- c(vgC-2,vgC+6)[和#vgRange < -  C(VGC-2,VGC +6)]
## if nu &gt;= 2 and theta &gt; 0, use:[#如果NU> = 2,θ> 0时,使用:]
##   vgRange &lt;- c(vgC-6,vgC+2)[和#vgRange < -  C(VGC-6,VGC +2)]
## if nu &gt;= 2 and theta = 0, use:[#如果NU> = 2,θ= 0,使用方法:]
##   vgRange &lt;- c(vgC-4,vgC+4)[和#vgRange < -  C(VGC-4,VGC +4)]

# Example 1 (nu &lt; 2)[实施例1(ν<2)]
## For dvg and pvg[#对于DVG和PVG]
param <- c(0,0.5,0,0.5)
maxDens <- dvg(vgMode(param = param), param = param, log = FALSE)
## Or to specify parameter values individually, use:[#或者单独指定参数值,请使用:]
maxDens <- dvg(vgMode(0,0.5,0,0.5), 0,0.5,0,0.5, log = FALSE)

vgRange <- vgCalcRange(param = param, tol = 10^(-2)*maxDens, density = TRUE)
par(mfrow = c(1,2))
curve(dvg(x, param = param), from = vgRange[1], to = vgRange[2], n = 1000)
title("Density of the Variance Gamma Distribution")
curve(pvg(x, param = param), from = vgRange[1], to = vgRange[2], n = 1000)
title("Distribution Function of the Variance Gamma Distribution")

## For rvg[#对于RVG]
dataVector <- rvg(500, param = param)
curve(dvg(x, param = param), range(dataVector)[1], range(dataVector)[2],
      n = 500)
hist(dataVector, freq = FALSE, add =TRUE)
title("Density and Histogram of the Variance Gamma Distribution")
logHist(dataVector, main =
   "Log-Density and Log-Histogramof the Generalized Hyperbolic Distribution")
curve(log(dvg(x, param = param)), add = TRUE,
      range(dataVector)[1], range(dataVector)[2], n = 500)

## For dvg and ddvg[#对于DVG和ddvg]
par(mfrow = c(2,1))
curve(dvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
title("Density of the Variance Gamma Distribution")
curve(ddvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
title("Derivative of the Density of the Variance Gamma Distribution")

# Example 2 (nu &gt; 2 and theta = 0)[实施例2(ν> 2,θ= 0)]
## For dvg and pvg[#对于DVG和PVG]
param <- c(0,0.5,0,3)
vgRange <- c(0-4,0+4)
par(mfrow = c(1,2))
curve(dvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
title("Density of the Variance Gamma Distribution")
curve(pvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
title("Distribution Function of the Variance Gamma Distribution")

## For rvg[#对于RVG]
dataVector <- rvg(500, param = param)
curve(dvg(x, param = param), range(dataVector)[1], range(dataVector)[2],
      n = 500)
hist(dataVector, freq = FALSE, add =TRUE)
title("Density and Histogram of the Variance Gamma Distribution")
logHist(dataVector, main =
   "Log-Density and Log-Histogramof the Generalized Hyperbolic Distribution")
curve(log(dvg(x, param = param)), add = TRUE,
      range(dataVector)[1], range(dataVector)[2], n = 500)

## For dvg and ddvg[#对于DVG和ddvg]
par(mfrow = c(2,1))
curve(dvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
title("Density of the Variance Gamma Distribution")
curve(ddvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
title("Derivative of the Density of the Variance Gamma Distribution")



## Use the following rules for vgCalcRange when plotting graphs for vgBreaks.[#使用下面的规则vgCalcRange当为vgBreaks绘制图表时,。]
## if (nu &lt; 2), use:[#(女2),使用:]
##   maxDens &lt;- dvg(vgMode(param =c(vgC, sigma, theta, nu)),[#maxDens < -  DVG(vgMode(参数= C(VGC,γ,σ,θ)),]
##     param = c(vgC, sigma, theta, nu), log = FALSE)[#参数= C(VGC,γ,σ,θ),登录= FALSE)]
##   vgRange &lt;- vgCalcRange(param = param, tol = 10^(-6)*maxDens, density = TRUE)[#vgRange < -  vgCalcRange(参数=参数,TOL = 10 ^(-6)* maxDens,密度= TRUE)]
## if (nu &gt;= 2) and theta &lt; 0, use:[#(女> = 2)和θ<0时,使用:]
##    vgRange &lt;- c(vgC-2,vgC+6)[和#vgRange < -  C(VGC-2,VGC +6)]
## if (nu &gt;= 2) and theta &gt; 0, use:[#(女> = 2)和θ> 0时,使用:]
##    vgRange &lt;- c(vgC-6,vgC+2)[和#vgRange < -  C(VGC-6,VGC +2)]
## if (nu &gt;= 2) and theta = 0, use:[#(女> = 2)和θ= 0时,使用:]
##    vgRange &lt;- c(vgC-4,vgC+4)[和#vgRange < -  C(VGC-4,VGC +4)]

## Example 3 (nu &lt; 2)[#示例3(女2)]
## For vgBreaks[#对于vgBreaks]
param <- c(0,0.5,0,0.5)
maxDens <- dvg(vgMode(param = param), param = param, log = FALSE)
vgRange <- vgCalcRange(param = param, tol = 10^(-6)*maxDens, density = TRUE)
curve(dvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
bks <- vgBreaks(param = param)
abline(v = bks)
title("Density of the Variance Gamma Distribution with breaks")

## Example 4 (nu &gt; 2 and theta = 0)[例4(NU> 2,θ= 0)]
## For vgBreaks[#对于vgBreaks]
param <- c(0,0.5,0,3)
vgRange <- c(0-4,0+4)
curve(dvg(x, param = param), from = vgRange[1], to = vgRange[2],
      n = 1000)
bks <- vgBreaks(param = param)
abline(v = bks)
title("Density of the Variance Gamma Distribution with breaks")  

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 16:31 , Processed in 0.024554 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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