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

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

[复制链接]
发表于 2012-10-1 13:09:15 | 显示全部楼层 |阅读模式
Tweedie(tweedie)
Tweedie()所属R语言包:tweedie

                                        Tweedie Distributions
                                         特威迪分派

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

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

Density, distribution function, quantile function and random
密度,分布函数,分位数的功能和随机


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


        dtweedie(y, xi=power, mu, phi, power=NULL)
        dtweedie.series(y, power, mu, phi)
        dtweedie.inversion(y, power, mu, phi, exact=TRUE, method)
        dtweedie.stable(y, power, mu, phi)
        ptweedie(q, xi=power, mu, phi, power=NULL)
        ptweedie.series(q, power, mu, phi)
        qtweedie(p, xi=power, mu, phi, power=NULL)
        rtweedie(n, xi=power, mu, phi, power=NULL)



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

参数:y, q
vector of quantiles
向量的位数


参数:p
vector of probabilities
向量的概率


参数:n
the number of observations
的若干意见


参数:xi
the value of xi such that the variance is  var(Y) = phi * mu^xi
值的方差是xi等var(Y) = phi * mu^xi


参数:power
a synonym for xi
的代名词xi,


参数:mu
the mean
的意思


参数:phi
the dispersion
分散


参数:exact
logical flag;  if TRUE (the default), exact zeros are used with the W-algorithm of Sidi (1982); if FALSE, approximate (asymptotic) zeros are used in place of exact zeros. Using asymptotic zeros requires less computation but is often less accurate; using exact zeros can be slower but generally improves accuracy.
逻辑标志,如果TRUE(默认值),精确零使用W算法的思迪(1982);如果FALSE,近似的(渐近)零的用来代替确切零。需要较少的计算采用了渐进零,但往往是不准确的;使用精确的零速度可能很慢,但普遍提高了精度。


参数:method
either 1, 2 or 3, determining which of three methods to use to compute the density using the inversion method. If method is NULL (the default), the optimal method (in terms of relative accuracy) is used, element-by-element of y. See the Note in the Details section below
是1,2或3,决定使用这三种方法来计算密度的反演方法。如果method是NULL(默认值),最佳的方法(相对精度),元素的元素的y。详细信息“一节中的注释


Details

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

The Tweedie family of distributions belong to the class of exponential dispersion models (<acronym>EDM</acronym>s), famous for their role in generalized linear models. The Tweedie distributions are the <acronym>EDM</acronym>s with a variance of the form var(Y) = phi * mu^power where power is greater than or equal to one, or less than or equal to zero. This function only evaluates for power greater than or equal to one. Special cases include the  normal (power=0), Poisson (power=1 with phi=1), gamma (power=2) and inverse Gaussian (power=3) distributions. For other values of  power, the distributions are still defined but cannot be written in closed form, and hence evaluation is very difficult.
泰迪家族的分布,属于类指数扩散模型(<acronym> EDM </首字母缩写),著名发挥的作用,广义线性模型中。 Tweedie爵士分布<acronym>EDM</的缩写> s的形式的方差var(Y) = phi * mu^power其中power是大于或等于1,或小于或等于零。此功能只计算power大于或等于1。特殊情况包括正常(power=0),泊松(power=1phi=1),γ(power=2)和逆高斯(power=3)分布。对于其他power的值,分布仍定义但不能被写入在封闭的形式,因此,评价是非常困难的。

When 1 < power < 2, the distribution are continuous for Y greater than zero, with a positive mass at Y=0. For power > 2,  the distributions are continuous for Y greater than zero.
当1 < power < 2,Y,“大于零,以积极的质量在Y=0的的分布是连续的。 power > 2,分布是连续的Y,“大于零。

This function evaluates the density or cumulative probability  using one of two methods,  depending on the combination of parameters.  One method is the evaluation of an infinite series. The second interpolates some stored values computed from a  Fourier inversion technique.
此函数计算的密度或累积概率,使用以下两种方法之一,根据参数的组合。一种方法是一个无穷级数的评价。第二个插入一些存储的计算值从傅里叶反变换技术。

The function dtweedie.inversion evaluates the density using a Fourier series technique;  ptweedie.inversion does likewise for the cumulative  probabilities.  The actual code is contained in an external FORTRAN program.  Different code is used for power > 2 and for 1 < power < 2.
函数dtweedie.inversion计算密度,用傅立叶级数技术,“ptweedie.inversion同样的累积概率。实际的代码中包含一个外部的FORTRAN程序。不同的代码用于power > 2和1 < power < 2。

The function dtweedie.series evaluates the density using a series expansion;  a different series expansion is used for power > 2 and for 1 < power < 2. The function ptweedie.series does likewise for the  cumulative probabilities but only for 1 < power < 2.
函数dtweedie.series计算密度,采用了一系列扩张,不同系列的扩展,用于power > 2和1 < power < 2。函数ptweedie.series同样的累积概率,但只1 < power < 2。

The function dtweedie.stable exploits the link between the stable distribution (Nolan, 1997) and Tweedie distributions, as discussed in Jorgensen, Chapter 4. These are computed using Nolan's algorithm as implemented in the  fBasics  package (which is therefore required to use the dtweedie.stable function).
dtweedie.stable的功能利用,约根森,第4章中讨论的稳定分布(诺兰,1997年)和特威迪分布的之间的联系。这些计算在fBasics包(因此,需要使用的dtweedie.stable功能)使用诺兰的算法实现。

The function dtweedie uses a two-dimensional interpolation procedure to  compute the density for some parts of the parameter space from  previously computed values found from the series or the  inversion. For other parts of the parameter space,  the series solution is found.
的功能dtweedie,使用一个二维的插值过程计算从先前计算的值,发现从串联或反演的参数空间的某些部分的密度。有关的参数空间中的其他部分的,被发现的一系列溶液。

ptweedie returns either the computed series  solution or inversion solution.
ptweedie返回计算系列解决方案或反转的解决方案。


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

density (dtweedie), probability (ptweedie), quantile (qtweedie) or random sample (rtweedie) for the given Tweedie distribution with parameters  mu,  phi and  power.
密度(dtweedie),概率(ptweedie),分位数(qtweedie)或随机样本(rtweedie)Tweedie分布参数mu, phi和power。


注意----------Note----------

The methods changed from version 1.4 to 1.5 (methods 1 and 2 swapped). The methods are defined in Dunn and Smyth (2008).
method改变从1.4到1.5版本(方法1和2交换)。 Dunn和史密斯(2008年)中定义的方法。


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


Peter Dunn (<a href="mailto:pdunn2@usc.edu.au">pdunn2@usc.edu.au</a>)



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

Evaluation of Tweedie exponential dispersion model densities by Fourier inversion. Statistics and Computing,  18, 73&ndash;86.
Series evaluation of Tweedie exponential dispersion model densities Statistics and Computing, 15(4). 267&ndash;280.
Tweedie family densities: methods of evaluation. Proceedings of the 16th International Workshop on Statistical Modelling, Odense, Denmark, 2&ndash;6 July
Exponential dispersion models. Journal of the Royal Statistical Society, B, 49, 127&ndash;162.
Theory of Dispersion Models. Chapman and Hall, London.
Numerical calculation of stable densities and distribution functions. Communication in Statistics&mdash;Stochastic models, 13(4). 759&ndash;774.
The numerical evaluation of very oscillatory infinite integrals by extrapolation. Mathematics of Computation 38(158), 517&ndash;529.
A user-friendly extrapolation method for oscillatory infinite integrals. Mathematics of Computation 51(183), 249&ndash;266.
An index which distinguishes between some important exponential families. Statistics: Applications and New Directions. Proceedings of the Indian Statistical Institute Golden Jubilee International Conference (Eds. J. K. Ghosh and J. Roy), pp. 579-604. Calcutta: Indian Statistical Institute.

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

dtweedie.saddle
dtweedie.saddle


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


### Plot a Tweedie density[##图一特威迪密度]
power <- 2.5
mu <- 1
phi <- 1
y <- seq(0, 6, length=500)
fy <- dtweedie( y=y, power=power, mu=mu, phi=phi)
plot(y, fy, type="l", lwd=2, ylab="Density")
# Compare to the saddlepoint density[与鞍点密度比较]
f.saddle <- dtweedie.saddle( y=y, power=power, mu=mu, phi=phi)
lines( y, f.saddle, col=2 )
legend("topright", col=c(1,2), lwd=c(2,1),
    legend=c("Actual","Saddlepoint") )

### A histogram of Tweedie random numbers[##A特威迪随机数的直方图]
hist( rtweedie( 1000, power=1.2, mu=1, phi=1) )

### An example of the multimodal feature of the Tweedie[##特威迪多峰特征的一个例子的]
### family with power near 1 (from Dunn and Smyth, 2005).[##家庭与功率接近1(从邓恩和史密斯,2005)。]
y <- seq(0.001,2,len=1000)
mu <- 1
phi <- 0.1
p <- 1.02
f1 <- dtweedie(y,mu=mu,phi=phi,power=p)
plot(y, f1, type="l", xlab="y", ylab="Density")
p <- 1.05
f2<- dtweedie(y,mu=mu,phi=phi,power=p)
lines(y,f2, col=2)

### Compare series and saddlepoint methods[##系列和鞍点方法比较]
y <- seq(0.001,2,len=1000)
mu <- 1
phi <- 0.1
p <- 1.02
f.series <- dtweedie.series( y,mu=mu,phi=phi,power=p )
f.saddle <- dtweedie.saddle( y,mu=mu,phi=phi,power=p )

f.all <- c( f.series, f.saddle )
plot( range(f.all) ~ range( y ), xlab="y", ylab="Density",
  type="n")
lines( f.series ~ y, lty=1, col=1)
lines( f.saddle ~ y, lty=3, col=3)

legend("topright", lty=c(1,3), col=c(1,3),
  legend=c("Series","Saddlepoint") )


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 15:50 , Processed in 0.024680 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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