gev(VGAM)
gev()所属R语言包:VGAM
Generalized Extreme Value Distribution Family Function
广义极值分布的家庭功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Maximum likelihood estimation of the 3-parameter generalized extreme value (GEV) distribution.
最大似然估计的三参数广义极值分布(GEV)。
用法----------Usage----------
gev(llocation = "identity", lscale = "loge", lshape = "logoff",
elocation = list(), escale = list(),
eshape = if (lshape == "logoff") list(offset = 0.5) else
if (lshape == "elogit") list(min = -0.5, max = 0.5) else list(),
percentiles = c(95, 99), iscale=NULL, ishape = NULL,
imethod = 1, gshape=c(-0.45, 0.45), tolshape0 = 0.001,
giveWarning = TRUE, zero = 3)
egev(llocation = "identity", lscale = "loge", lshape = "logoff",
elocation = list(), escale = list(),
eshape = if (lshape == "logoff") list(offset = 0.5) else
if (lshape == "elogit") list(min = -0.5, max = 0.5) else list(),
percentiles = c(95, 99), iscale=NULL, ishape = NULL,
imethod = 1, gshape=c(-0.45, 0.45), tolshape0 = 0.001,
giveWarning = TRUE, zero = 3)
参数----------Arguments----------
参数:llocation, lscale, lshape
Parameter link functions for mu, sigma and xi respectively. See Links for more choices.
参数的链接功能,mu,sigma和xi分别。见Links更多的选择。
参数:elocation, escale, eshape
List. Extra argument for the respective links. 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 linear/additive predictor is log(xi+A) which means that xi > -A. For technical reasons (see Details) it is a good idea for A = 0.5.
列表。额外的参数,相应的链接。见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. However, if percentiles=NULL, then the mean mu + sigma * (gamma(1-xi)-1)/xi is returned, and this is only defined if xi<1.
用于拟合值的百分位数的数字矢量。值应该介于0和100之间。但是,如果percentiles=NULL,然后平均mu + sigma * (gamma(1-xi)-1)/xi是回来了,而这仅仅是定义,如果xi<1。
参数:iscale, ishape
Numeric. Initial value for sigma and xi. A NULL means a value is computed internally. The argument ishape is more important than the other two because they are initialized from the initial xi. If a failure to converge occurs, or even to obtain initial values occurs, try assigning ishape some value (positive or negative; the sign can be very important). Also, in general, a larger value of iscale is better than a smaller value.
数字。 sigma和xi的初始值。 ANULL是指在内部计算的值。参数ishape比其他两个更重要的是,因为它们是从最初的xi初始化。如果收敛失败时,或即使获得初始值时,尝试分配ishape一定的价值(正或负的符号是非常重要的)。另外,在一般情况中,一个较大的值iscale是优于一个较小的值。
参数:imethod
Initialization method. Either the value 1 or 2. Method 1 involves choosing the best xi on a course grid with endpoints gshape. Method 2 is similar to the method of moments. If both methods fail try using ishape.
初始化方法。无论的值1或2。方法1,选择最好的xi在电网与端点gshape。方法2是类似矩量法。如果两种方法都失败尝试使用ishape。
参数:gshape
Numeric, of length 2. Range of xi used for a grid search for a good initial value for xi. Used only if imethod equals 1.
数字,长度为2。范围的xi一格寻找一个好的初始值xi使用。仅用于如果imethod等于1。
参数:tolshape0, giveWarning
Passed into dgev when computing the log-likelihood.
传递到dgev计算对数似然。
参数:zero
An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The values must be from the set {1,2,3} corresponding respectively to mu, sigma, xi. If zero=NULL then all linear/additive predictors are modelled as a linear combination of the explanatory variables. For many data sets having zero = 3 is a good idea.
指定一个整数值向量线性/添加剂的预测模型仅作为拦截。这些值必须是从集合{1,2,3},分别对应于mu,sigma,xi。如果zero=NULL然后所有的线性/添加剂预测因子建模作为解释变量的线性组合。对于许多数据集有zero = 3是一个好主意。
Details
详细信息----------Details----------
The GEV distribution function can be written
GEV分布函数可以写成
where sigma > 0, -Inf < mu < Inf, and 1 + xi*(y-mu)/sigma > 0. Here, x_+ = max(x,0). The mu, sigma, xi are known as the location, scale and shape parameters respectively. The cases xi>0, xi<0, xi = 0 correspond to the Frechet, Weibull, and Gumbel types respectively. It can be noted that the Gumbel (or Type I) distribution accommodates many commonly-used distributions such as the normal, lognormal, logistic, gamma, exponential and Weibull.
sigma > 0,-Inf < mu < Inf和1 + xi*(y-mu)/sigma > 0。在这里,x_+ = max(x,0)。 mu,sigma,xi的位置,大小和形状参数分别被称为。的情况下,xi>0,xi<0,xi = 0对应的导数,韦伯,和Gumbel分布类型分别。它可以指出的是,耿贝尔(或I型)发行可容纳许多常用的如正常,对数正态分布,MF,伽玛值,指数分布和Weibull分布。
For the GEV distribution, the kth moment about the mean exists if xi < 1/k. Provided they exist, the mean and variance are given by mu + sigma { Gamma(1-xi)-1} / xi and sigma^2 { Gamma(1-2 xi) - Gamma^2 (1- xi) } / xi^2 respectively, where Gamma is the gamma function.
k阶矩的平均GEV分布,如果xi < 1/k。只要他们存在,均值和方差mu + sigma { Gamma(1-xi)-1} / xi和sigma^2 { Gamma(1-2 xi) - Gamma^2 (1- xi) } / xi^2,其中Gamma是伽玛函数。
Smith (1985) established that when xi > -0.5, the maximum likelihood estimators are completely regular. To have some control over the estimated xi try using lshape = "logoff" and the eshape=list(offset = 0.5), say, or lshape = "elogit" and eshape=list(min = -0.5, max = 0.5), say.
史密斯(1985年)成立,当xi > -0.5,极大似然估计是完全正规的。有一些的估计xi控制尝试使用lshape = "logoff"和eshape=list(offset = 0.5),说,或lshape = "elogit"和eshape=list(min = -0.5, max = 0.5)“说。
值----------Value----------
An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能,如vglm,vgam。
警告----------Warning ----------
Currently, if an estimate of xi is too close to zero then an error will occur for gev() with multivariate responses. In general, egev() is more reliable than gev().
目前,如果xi的估计是太接近零,那么错误将发生gev()多元反应。在一般情况下,egev()是更可靠的比gev()。
Fitting the GEV 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.)
拟合GEV可以通过最大似然估计数值充满。如果1 + xi*(y-mu)/sigma <= 0然后一些原油的规避动作,但仍然无法估计过程。这是特别的情况下,如果vgams,然后平滑最好的做法是vglm的回归样条(bs或ns)的,因为vglm实现半stepsizing的,而vgam不(半stepsizing帮助处理问题的参数空间的偏离外)。
注意----------Note----------
The VGAM family function gev can handle a multivariate (matrix) response. If so, each row of the matrix is sorted into descending order and NAs are put last. With a vector or one-column matrix response using egev will give the same result but be faster and it handles the xi = 0 case. The function gev implements Tawn (1988) while egev implements Prescott and Walden (1980).
VGAM家庭函数gev可以处理多元(矩阵)的反应。如果是这样,该矩阵的每一行被分成降序和NAs的把最后。用向量或一列的矩阵使用egev会得到相同的结果,但速度更快,处理xi = 0情况下的响应。的功能gev实现Tawn(1988年),而egev实现普雷斯科特和Walden(1980),。
The shape parameter xi is difficult to estimate accurately unless there is a lot of data. Convergence is slow when xi is near -0.5. Given many explanatory variables, it is often a good idea to make sure zero = 3. The range restrictions of the parameter xi are not enforced; thus it is possible for a violation to occur.
形状参数xi是很难准确地估计,除非有大量的数据。当xi附近-0.5收敛速度很慢。鉴于许多解释变量,它通常是一个好主意,以确保zero = 3。的范围限制的参数xi不执行,因此这是可能的违反发生。
Successful convergence often depends on having a reasonably good initial value for xi. If failure occurs try various values for the argument ishape, and if there are covariates, having zero = 3 is advised.
成功的收敛往往取决于有一个相当不错的初始值xi。如果发生故障尝试不同的参数值ishape,如果有协变量,zero = 3建议。
(作者)----------Author(s)----------
T. W. Yee
参考文献----------References----------
Vector generalized linear and additive extreme value models. Extremes, 10, 1–19.
An extreme-value theory model for dependent observations. Journal of Hydrology, 101, 227–250.
Maximum likelihood estimation of the parameters of the generalized extreme-value distribution. Biometrika, 67, 723–724.
Maximum likelihood estimation in a class of nonregular cases. Biometrika, 72, 67–90.
参见----------See Also----------
rgev, gumbel, egumbel, guplot, rlplot.egev, gpd, frechet2, elogit, oxtemp, venice.
rgev,gumbel,egumbel,guplot,rlplot.egev,gpd,frechet2,elogit,oxtemp,venice。
实例----------Examples----------
# Multivariate example[多变量示例]
fit1 = vgam(cbind(r1, r2) ~ s(year, df = 3), gev(zero = 2:3),
venice, trace = TRUE)
coef(fit1, matrix = TRUE)
head(fitted(fit1))
## Not run: [#不运行:]
par(mfrow=c(1,2), las = 1)
plot(fit1, se = TRUE, lcol = "blue", scol = "forestgreen",
main = "Fitted mu(year) function (centered)", cex.main = 0.8)
with(venice, matplot(year, y[,1:2], ylab = "Sea level (cm)", col = 1:2,
main = "Highest 2 annual sea levels", cex.main = 0.8))
with(venice, lines(year, fitted(fit1)[,1], lty = "dashed", col = "blue"))
legend("topleft", lty = "dashed", col = "blue", "Fitted 95 percentile")
## End(Not run)[#(不执行)]
# Univariate example[单因素例如]
(fit = vglm(maxtemp ~ 1, egev, oxtemp, trace = TRUE))
head(fitted(fit))
coef(fit, matrix = TRUE)
Coef(fit)
vcov(fit)
vcov(fit, untransform = TRUE)
sqrt(diag(vcov(fit))) # Approximate standard errors[近似的标准误]
## Not run: rlplot(fit) [#不运行:rlplot的(适合)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|