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

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

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

                                         Gumbel Distribution Family Function
                                         Gumbel分布家庭功能

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

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

Maximum likelihood estimation of the 2-parameter Gumbel distribution.
最大似然估计的参数Gumbel分布。


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


gumbel(llocation = "identity", lscale = "loge", elocation = list(),
       escale = list(), iscale = NULL, R = NA, percentiles = c(95, 99),
       mpv = FALSE, zero = NULL)
egumbel(llocation = "identity", lscale = "loge", elocation = list(),
        escale = list(), iscale = NULL, R = NA, percentiles = c(95, 99),
        mpv = FALSE, zero = NULL)



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

参数:llocation, lscale
Parameter link functions for mu and sigma. See Links for more choices.  
参数链接功能,为mu和sigma。见Links更多的选择。


参数:elocation, escale
Extra argument for the llocation and lscale arguments. See earg in Links for general information.  
llocation和lscale参数的额外参数。见earg中Links的一般信息。


参数:iscale
Numeric and positive.  Optional initial value for sigma. Recycled to the appropriate length. In general, a larger value is better than a smaller value. A NULL means an initial value is computed internally.   
数字和积极的。可选的初始值sigma。再循环到适当的长度。在一般情况下,一个较大的值优于一个较小的值。 ANULL是指内部计算的初始值。


参数:R
Numeric. Maximum number of values possible. See Details for more details.   
数字。可能的值的最大数目。更多详细信息,请参阅详细信息。


参数:percentiles
Numeric vector of percentiles used for the fitted values. Values should be between 0 and 100. This argument uses the argument R if assigned. If percentiles = NULL then the mean will be returned as the fitted values.   
用于拟合值的百分位数的数字矢量。值应该介于0和100之间。该参数使用参数R分配。如果percentiles = NULL然后平均将返回的拟合值。


参数:mpv
Logical. If mpv = TRUE then the median predicted value (MPV) is computed and returned as the (last) column of the fitted values. This argument is ignored if percentiles = NULL. See Details for more details.   
逻辑。如果mpv = TRUE然后预测值中位数(MPV)计算的(最后的)列的拟合值作为返回。如果percentiles = NULL此参数将被忽略。更多详细信息,请参阅详细信息。


参数:zero
An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only.  The value (possibly values) must be from the set {1,2} corresponding respectively to mu and sigma.  By default all linear/additive predictors are modelled as a linear combination of the explanatory variables.  
指定一个整数值向量线性/添加剂的预测模型仅作为拦截。值(可能值),必须从集合{1,2}分别对应mu和sigma。默认情况下,所有的线性/添加剂的预测模型的解释变量的线性组合。


Details

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

The Gumbel distribution is a generalized extreme value (GEV)  distribution with shape parameter xi = 0. Consequently it is more easily estimated than the GEV. See gev for more details.
Gumbel分布是一个广义的极值(GEV)分布形状参数xi = 0的。因此,更容易比GEV估计。见gev更多详情。

The quantity R is the maximum number of observations possible, for example, in the Venice data below, the top 10 daily values are recorded for each year, therefore  R = 365 because there are about 365 days per year. The MPV is the value of the response such that the probability of obtaining a value greater than the MPV is 0.5 out of R observations. For  the Venice data, the MPV is the sea level such that there is an even chance that the highest level for a particular year exceeds the MPV. When mpv = TRUE, the column labelled  "MPV" contains the MPVs when fitted() is applied to the fitted object.
的数量R的最大数量是可能的观测,例如,在下面的威尼斯数据,排名前10位的每日摄取量每年被记录,因此R = 365,因为有大约每年365天。 MPV是使得获得的值大于的MPV的概率是0.5,满分R观测的响应的值。对于的威尼斯数据,MPV的海平面,有一个甚至某年的最高水平,超过了MPV的机会。当mpv = TRUE,列标记为"MPV"当fitted()被拟合的对象施加包含多用途车(MPV)。

The formula for the mean of a response Y is μ+σ \times Euler where Euler is a constant that has value approximately equal to 0.5772. The formula for the percentiles are (if R is not given) location-     scale*log[-log(P/100)] where P is the percentile argument value(s). If R is given then the percentiles are location-     scale*log[-log(R*(1-P/100))].
其计算公式的平均响应Y的是μ+σ \times EulerEuler是一个恒定值约等于0.5772。其计算公式为百分(R如果)location-     scale*log[-log(P/100)]其中P是percentile参数值(S)。如果R然后百分位是location-     scale*log[-log(R*(1-P/100))]。


值----------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----------

When R is not given (the default) the fitted percentiles are that of the data, and not of the overall population. For example, in the example below, the 50 percentile is approximately the running median through the data, however, the data are the highest sea level measurements recorded each year (it therefore equates to the median predicted value or MPV).
当R(缺省的)拟合的百分位数的数据,而不是总人口。例如,在下面的例子中,50百分位大约是通过数据的中位数,但是,这些数据是最高的海平面测量记录每年(因此,它等同于预测值中位数或MPV)。


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

egumbel() only handles a univariate response, and is preferred to gumbel() because it is faster.
egumbel()只处理一个单变量的响应,最好是gumbel()因为它速度更快。

gumbel() can handle a multivariate response, i.e., a matrix with more than one column. Each row of the matrix is sorted into descending order. Missing values in the response are allowed but require na.action = na.pass. The response matrix needs to be padded with any missing values. With a multivariate response one has a matrix y, say, where y[,2] contains the second order statistics etc.
gumbel()可以处理多变量响应,即一个以上的列矩阵。的矩阵的每一行进行排序降序排列。遗漏值在响应被允许的,但需要na.action = na.pass。响应矩阵需要任何遗漏值进行填充。随着多变量响应矩阵y,说,y[,2]包含的二阶统计等。


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


T. W. Yee



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

Vector generalized linear and additive extreme value models. Extremes, 10, 1–19.
Extreme value theory based on the r largest annual events. Journal of Hydrology, 86, 27–43.
Extreme percentile regression. In: Haerdle, W. and Schimek, M. G. (eds.),  Statistical Theory and Computational Aspects of Smoothing: Proceedings of the COMPSTAT '94 Satellite Meeting held in Semmering, Austria, 27–28 August 1994, pp.200–214, Heidelberg: Physica-Verlag.
An Introduction to Statistical Modeling of Extreme Values. London: Springer-Verlag.

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

rgumbel, cgumbel, guplot, gev, egev,  venice.
rgumbel,cgumbel,guplot,gev,egev,venice。


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


# Example 1: Simulated data[例1:模拟数据]
gdata = data.frame(y = rgumbel(n = 1000, loc = 100, scale = exp(1)))
fit = vglm(y ~ 1, egumbel(perc = NULL), gdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
head(fitted(fit))
with(gdata, mean(y))

# Example 2: Venice data[例2:威尼斯数据]
(fit = vglm(cbind(r1,r2,r3,r4,r5) ~ year, data = venice,
            gumbel(R = 365, mpv = TRUE), trace = TRUE))
head(fitted(fit))
coef(fit, mat = TRUE)
vcov(summary(fit))  
sqrt(diag(vcov(summary(fit))))   # Standard errors[标准误差]


# Example 3: Try a nonparametric fit ---------------------[例3:尝试一种非参数拟合---------------------]
# Use the entire data set, including missing values[使用整个数据集,包含有遗漏值]
y = as.matrix(venice[,paste("r",1:10,sep = "")])
fit1 = vgam(y ~ s(year, df = 3), gumbel(R = 365, mpv = TRUE),
            data = venice, trace = TRUE, na.action = na.pass)
fit1@y[4:5,]  # NAs used to pad the matrix[来港定居用来垫的矩阵]

## Not run: [#不运行:]
# Plot the component functions[绘制组件的功能]
par(mfrow = c(2,1), mar = c(5,4,.2,1)+0.1, xpd = TRUE)
plot(fit1, se = TRUE, lcol = "blue", scol = "green", lty = 1,
     lwd = 2, slwd = 2, slty = "dashed")

# Quantile plot --- plots all the fitted values[分量图---小区所有的拟合值]
par(mfrow = c(1,1), bty = "l", mar = c(4,4,.2,3)+0.1, xpd = TRUE, las = 1)
qtplot(fit1, mpv = TRUE, lcol = c(1,2,5), tcol = c(1,2,5), lwd = 2,
       pcol = "blue", tadj = 0.1, ylab = "Sea level (cm)")

# Plot the 99 percentile only[只画出99个百分]
par(mfrow = c(1,1), mar = c(3,4,.2,1)+0.1, xpd = TRUE)
year = venice[["year"]]
matplot(year, y, ylab = "Sea level (cm)", type = "n")
matpoints(year, y, pch = "*", col = "blue")
lines(year, fitted(fit1)[,"99%"], lwd = 2, col = "red")

# Check the 99 percentiles with a smoothing spline.[检查99个百分位数与平滑样条曲线。]
# Nb. (1-0.99) * 365 = 3.65 is approx. 4, meaning the 4th order [铌。 (1-0.99)* 365 = 3.65约。 4,这意味着四阶]
# statistic is approximately the 99 percentile.[统计约99百分。]
par(mfrow = c(1,1), mar = c(3,4,2,1)+0.1, xpd = TRUE, lwd = 2)
plot(year, y[,4], ylab = "Sea level (cm)", type = "n",
     main = "Red is 99 percentile, Green is a smoothing spline")
points(year, y[,4], pch = "4", col = "blue")
lines(year, fitted(fit1)[,"99%"], lty = 1, col = "red")
lines(smooth.spline(year, y[,4], df = 4), col = "darkgreen", lty = 2)

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 10:39 , Processed in 0.022131 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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