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

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

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

                                         Expectiles of the Uniform Distribution
                                         Expectiles的均匀分布

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

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

Density function, distribution function, and expectile function and random generation for the distribution associated with the expectiles of a uniform distribution.
密度函数,分布函数,expectile的功能和随机生成的分布与一个均匀分布的expectiles。


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


deunif(x, min = 0, max = 1, log = FALSE)
peunif(q, min = 0, max = 1, log = FALSE)
qeunif(p, min = 0, max = 1, Maxit_nr = 10, Tol_nr = 1.0e-6)
reunif(n, min = 0, max = 1)



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

参数:x, q
Vector of expectiles. See the terminology note below.  
向量的expectiles。请参阅下面的术语说明。


参数:p
Vector of probabilities.  These should lie in (0,1).  
向量的可能性。这些在于(0,1)。


参数:n, min, max, log
See runif.
见runif。


参数:Maxit_nr
Numeric. Maximum number of Newton-Raphson iterations allowed. A warning is issued if convergence is not obtained for all p values.  
数字。 Newton-Raphson迭代允许的最大数量。如果不收敛,获得所有的p值,将发出警告。


参数:Tol_nr
Numeric. Small positive value specifying the tolerance or precision to which the expectiles are computed.  
数字。小的正数指定的公差精度的expectiles计算。


Details

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

Jones (1994) elucidated on the property that the expectiles of a random variable X with distribution function F(x) correspond to the quantiles of a distribution G(x) where G is related by an explicit formula to F. In particular, let y be the p-expectile of F. Then y is the p-quantile of G where
琼斯(1994)阐明的财产,expectiles的随机变量X与分布函数F(x)对应于位数的分布G(x)G由有关明确的公式来F。特别是,我们y是p-expectile的F。然后y是p位数G其中

and mu is the mean of X. The derivative of G is
和mu的平均X。衍生G

Here, P(y) is the partial moment int^{y} x f(x) dx and 0 < p < 1. The 0.5-expectile is the mean mu and the 0.5-quantile  is the median.
在这里,P(y)是偏矩int^{y} x f(x) dx和0 < p < 1。 0.5-expectile的是平均mu和0.5位数的中位数。

A note about the terminology used here. Recall in the S language there are the dpqr-type functions associated with a distribution, e.g., dunif, punif, qunif, runif, for the uniform distribution. Here, unif corresponds to F and eunif corresponds to G. The addition of &ldquo;e&rdquo; (for expectile) is for the "other" distribution associated with the parent distribution. Thus deunif is for g, peunif is for G, qeunif is for the inverse of G, reunif generates random variates from g.
这里使用的术语的说明。回想一下在S语言有dpqr型的分布与功能,例如,dunif,punif,qunif,runif,为统一分布。在这里,unifF和eunif对应于G。除了“e”(为expectile)是为“其他”的分布与父分布。因此deunif是g,peunif是G,qeunif是G的逆,reunif生成随机变元从g。

For qeunif the Newton-Raphson algorithm is used to solve for y satisfying p = G(y). Numerical problems may occur when values of p are very close to 0 or 1.
对于qeunif Newton-Raphson算法是用来解决y满意p = G(y)。数值时可能出现的问题p值非常接近0或1。


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

deunif(x) gives the density function g(x). peunif(q) gives the distribution function G(q). qeunif(p) gives the expectile function: the expectile y such that G(y) = p. reunif(n) gives n random variates from G.
deunif(x)给出了密度函数g(x)。 peunif(q)给出了分布函数G(q)。 qeunif(p)给出了expectile的功能:expectile yG(y) = p。 reunif(n)给从nG随机变数。


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


T. W. Yee



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

Expectiles and M-quantiles are quantiles. Statistics and Probability Letters, 20, 149&ndash;153.
Vector generalized linear and additive quantile and expectile regression. In preparation.

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

deexp, denorm, dunif, dkoenker.
deexp,denorm,dunif,dkoenker。


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


my_p = 0.25; y = runif(nn <- 1000)
(myexp = qeunif(my_p))
sum(myexp - y[y &lt;= myexp]) / sum(abs(myexp - y))  # Should be my_p[应该是MY_P]
# Equivalently:[等价的:]
I1 = mean(y <= myexp) * mean( myexp - y[y <= myexp])
I2 = mean(y >  myexp) * mean(-myexp + y[y >  myexp])
I1 / (I1 + I2)  # Should be my_p[应该是MY_P]
# Or:[或者:]
I1 = sum( myexp - y[y <= myexp])
I2 = sum(-myexp + y[y >  myexp])

# Non-standard uniform[非标准的统一]
mymin = 1; mymax = 8
yy = runif(nn, mymin, mymax)
(myexp = qeunif(my_p, mymin, mymax))
sum(myexp - yy[yy &lt;= myexp]) / sum(abs(myexp - yy)) # Should be my_p[应该是MY_P]
peunif(mymin, mymin, mymax)     #  Should be 0[应为0]
peunif(mymax, mymin, mymax)     #  Should be 1[应该是1]
peunif(mean(yy), mymin, mymax)  #  Should be 0.5[应为0.5]
abs(qeunif(0.5, mymin, mymax) - mean(yy)) #  Should be 0[应为0]
abs(qeunif(0.5, mymin, mymax) - (mymin+mymax)/2) #  Should be 0[应为0]
abs(peunif(myexp, mymin, mymax) - my_p)  #  Should be 0[应为0]
integrate(f = deunif, lower=mymin - 3, upper = mymax + 3,
          min=mymin, max=mymax) #  Should be 1[应该是1]

## Not run: [#不运行:]
par(mfrow=c(2,1))
yy = seq(0.0, 1.0, len=nn)
plot(yy, deunif(yy), type="l", col="blue", ylim = c(0, 2),
     xlab = "y", ylab = "g(y)", main = "g(y) for Uniform(0,1)")
lines(yy, dunif(yy), col="darkgreen", lty="dotted", lwd = 2) # 'original'[“原始的”]

plot(yy, peunif(yy), type="l", col="blue", ylim = 0:1,
     xlab = "y", ylab = "G(y)", main = "G(y) for Uniform(0,1)")
abline(a=0.0, b=1.0, col="darkgreen", lty="dotted", lwd = 2)
abline(v=0.5, h=0.5, col="red", lty="dashed")
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 20:28 , Processed in 0.031297 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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