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

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

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

                                         Generalized Pareto Distribution Family Function
                                         广义Pareto分布家庭功能

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

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

Maximum likelihood estimation of the 2-parameter generalized  Pareto distribution (GPD).
最大似然估计的参数广义帕累托分布(GPD)。


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


gpd(threshold = 0, lscale = "loge", lshape = "logoff", escale = list(),
    eshape = if (lshape == "logoff") list(offset = 0.5) else
             if (lshape == "elogit") list(min = -0.5, max = 0.5) else NULL,
    percentiles = c(90, 95), iscale = NULL, ishape = NULL,
    tolshape0 = 0.001, giveWarning = TRUE, imethod = 1, zero = 2)



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

参数:threshold
Numeric, values are recycled if necessary. The threshold value(s), called mu below.  
数字被回收,价值观如果必要的话。阈值(S),称为mu以下。


参数:lscale
Parameter link function for the scale parameter sigma. See Links for more choices.  
为尺度参数sigma参数链接功能。见Links更多的选择。


参数:lshape
Parameter link function for the shape parameter xi. See Links for more choices. The default constrains the parameter to be greater than -0.5 because if xi <= -0.5 then Fisher scoring does not work. See the Details section below for more information.  
参数链接函数的形状参数xi。见Links更多的选择。默认的约束的参数大于-0.5,因为如果xi <= -0.5然后费舍尔得分不工作的。查看“详细信息”一节以获取更多信息。


参数:escale, eshape
Extra argument for the lscale and lshape arguments. See earg in Links for general information. For the shape parameter, if the logoff link is chosen then the offset is called A below; and then the second linear/additive predictor is log(xi+A) which means that xi > -A. The working weight matrices are positive definite if A = 0.5.  
lscale和lshape参数的额外参数。见earg中Links的一般信息。对于的形状参数,如果logoff链接被选择,则偏移量被称为A下面;,然后第二线性/添加剂预测器是log(xi+A)这意味着xi > -A。工作的权重矩阵是正定如果A = 0.5。


参数:percentiles
Numeric vector of percentiles used for the fitted values. Values should be between 0 and 100. See the example below for illustration. However, if percentiles = NULL then the mean mu + sigma / (1-xi) is returned; this is only defined if xi<1.  
用于拟合值的百分位数的数字矢量。值应该介于0和100之间。请看下面的例子作说明。但是,如果percentiles = NULL然后平均mu + sigma / (1-xi)返回,这是唯一的定义,如果xi<1。


参数:iscale, ishape
Numeric. Optional initial values for sigma and xi. The default is to use imethod and compute a value internally for each parameter. Values of ishape should be between -0.5 and 1. Values of iscale should be positive.  
数字。可选的初始值sigma和xi。默认的是使用imethod内部的每个参数,并计算出一个值。 ishape的值应在-0.5和1。 iscale值应该是积极的。


参数:tolshape0, giveWarning
Passed into dgpd when computing the log-likelihood.  
传递到dgpd计算对数似然。


参数:imethod
Method of initialization, either 1 or 2. The first is the method of moments, and the second is a variant of this.  If neither work, try assigning values to arguments ishape and/or iscale.  
初始化的方法,无论是1或2。第一个是矩量法,和第二这是一个变体。如果没有工作,尽量将值分配给参数ishape和/或iscale。


参数:zero
An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The value must be from the set {1,2} corresponding respectively to sigma and xi. It is often a good idea for the sigma parameter only to be modelled through a linear combination of the explanatory variables because the shape parameter is probably best left as an intercept only: zero = 2. Setting zero=NULL means both parameters are modelled with explanatory variables.  
指定一个整数值向量线性/添加剂的预测模型仅作为拦截。该值必须是从集合{1,2}分别对应sigma和xi。它往往是一个好主意,sigma参数只被解释变量通过线性组合模型的形状参数,因为可能是最好的离开仅作为一个拦截:zero = 2。设置zero=NULL是指两个参数模型的解释变量。


Details

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

The distribution function of the GPD can be written
总政治部的分布函数可以写成

where mu is the location parameter (known, with value threshold), sigma > 0 is the scale parameter, xi is the shape parameter, and h_+ = max(h,0). The function 1-G is known as the survivor function. The limit xi --> 0 gives the shifted exponential as a special case:
其中mu的位置参数(已知的,与价值threshold)sigma > 0是尺度参数,xi的形状参数,和h_+ = max(h,0)。被称为生存函数的功能1-G。的限制xi --> 0给出了转移指数作为一种特殊的情况下:

The support is y>mu for xi>0, and mu < y <mu-sigma / xi for xi<0.
的支持是y>mu的xi>0,mu < y <mu-sigma / xixi<0。

Smith (1985) showed that if xi <= -0.5 then this is known as the nonregular case and problems/difficulties can arise both theoretically and numerically. For the (regular) case xi > -0.5 the classical asymptotic theory of maximum likelihood estimators is applicable; this is the default.
史密斯(1985年)表明,如果xi <= -0.5那么,这是被称为非正规的情况下,可能会出现问题/困难的理论和数值。 (定期)的情况下,xi > -0.5经典的最大似然估计的渐近理论是适用的,这是默认的。

Although for xi < -0.5 the usual asymptotic properties do not apply, the maximum likelihood estimator generally exists and is superefficient for -1 < xi < -0.5, so it is &ldquo;better&rdquo; than normal. When xi < -1 the maximum likelihood estimator generally does not exist as it effectively becomes a two parameter problem.
虽然对于xi < -0.5一般的渐近性质不适用,最大似然估计一般-1 < xi < -0.5,所以它是“更好”比正常存在,并且是超高效。当xi < -1最大似然估计一般不存在,因为它实际上变成了两个参数的问题。

The mean of Y does not exist unless xi < 1, and the variance does not exist unless xi < 0.5.  So if you want to fit a model with finite variance use lshape = "elogit".
平均Y不存在,除非xi < 1,和方差不存在,除非xi < 0.5。所以,如果你想拟合模型与有限方差使用lshape = "elogit"。


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

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam. However, for this VGAM family function, vglm is probably preferred over vgam when there is smoothing.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能如vglm和vgam。然而,对于这VGAM家庭功能,vglm可能是优于vgam的时候有平滑。


警告----------Warning----------

Fitting the GPD by maximum likelihood estimation can be numerically fraught. If 1 + xi*(y-mu)/sigma <=   0 then some crude evasive action is taken but the estimation process can still fail. This is particularly the case if vgam with s is used. Then smoothing is best done with vglm with regression splines (bs or ns) because vglm implements half-stepsizing whereas vgam doesn't. Half-stepsizing helps handle the problem of straying outside the parameter space.
拟合GPD可以通过最大似然估计数值充满。如果1 + xi*(y-mu)/sigma <=   0然后一些原油的规避动作,但仍然无法估计过程。这是特别的情况下,如果vgams使用。平滑最好用vglm回归样条曲线(bs或ns),因为“vglm实现半stepsizing的,而vgam不。半stepsizing帮助处理问题以外的参数空间的偏离。


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

The response in the formula of vglm and vgam is y. Internally, y-mu is computed.
响应的公式vglm和vgam是y。在内部,y-mu计算。

With functions rgpd, dgpd, etc., the argument location matches with the argument threshold here.
随着功能rgpd,dgpd,等等,参数location比赛的说法threshold这里。


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


T. W. Yee



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

Vector generalized linear and additive extreme value models. Extremes, 10, 1&ndash;19.
An Introduction to Statistical Modeling of Extreme Values. London: Springer-Verlag.
Maximum likelihood estimation in a class of nonregular cases. Biometrika, 72, 67&ndash;90.

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

rgpd, meplot, gev, pareto1, vglm, vgam, s.
rgpd,meplot,gev,pareto1,vglm,vgam,s。


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


# Simulated data from an exponential distribution (xi = 0)[从指数分布的模拟数据(XI = 0)]
threshold = 0.5
gdata = data.frame(y1 = threshold + rexp(n = 3000, rate = 2))
fit = vglm(y1 ~ 1, gpd(threshold = threshold), gdata, trace = TRUE)
head(fitted(fit))
coef(fit, matrix = TRUE)   # xi should be close to 0[十一应该是接近0的]
Coef(fit)
summary(fit)

fit@extra$threshold  # Note the threshold is stored here[注意的阈值被存储在这里]

# Check the 90 percentile[检查了90个百分]
ii = depvar(fit) < fitted(fit)[1, "90%"]
100 * table(ii) / sum(table(ii))   # Should be 90%[应为90%]

# Check the 95 percentile[检查了95个百分]
ii = depvar(fit) < fitted(fit)[1, "95%"]
100 * table(ii) / sum(table(ii))   # Should be 95%[应为95%]

## Not run:  plot(depvar(fit), col = "blue", las = 1,[#未运行图(depvar(FIT),列=“蓝”,LAS = 1,]
               main = "Fitted 90% and 95% quantiles")
matlines(1:length(depvar(fit)), fitted(fit), lty = 2:3, lwd = 2)
## End(Not run)[#(不执行)]


# Another example[另一个例子]
gdata = data.frame(x2 = runif(nn <- 2000))
threshold = 0; xi = exp(-0.8) - 0.5
gdata = transform(gdata, y2 = rgpd(nn, scale = exp(1+0.1*x2), shape = xi))
fit = vglm(y2 ~ x2, gpd(threshold), gdata, trace = TRUE)
coef(fit, matrix = TRUE)


## Not run:  # Nonparametric fits[#不运行:#非参数符合]
gdata = transform(gdata, yy = y2 + rnorm(nn, sd = 0.1))
# Not so recommended:[事实并非如此建议:]
fit1 = vgam(yy ~ s(x2), gpd(threshold), gdata, trace = TRUE)
par(mfrow = c(2,1))
plotvgam(fit1, se = TRUE, scol = "blue")
# More recommended:[更多推荐:]
fit2 = vglm(yy ~ bs(x2), gpd(threshold), gdata, trace = TRUE)
plotvgam(fit2, se = TRUE, scol = "blue")
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 19:50 , Processed in 0.024373 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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