Expectiles-Koenker(VGAM)
Expectiles-Koenker()所属R语言包:VGAM
Expectiles/Quantiles of the Koenker Distribution
Expectiles / Koenker分布的分位数的
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Density function, distribution function, and quantile/expectile function and random generation for the Koenker distribution.
密度函数,分布函数,和分量/ expectile的功能和随机生成的Koenker分布。
用法----------Usage----------
dkoenker(x, location = 0, scale = 1, log = FALSE)
pkoenker(q, location = 0, scale = 1, log = FALSE)
qkoenker(p, location = 0, scale = 1)
rkoenker(n, location = 0, scale = 1)
参数----------Arguments----------
参数:x, q
Vector of expectiles/quantiles. See the terminology note below.
向量的expectiles /位数。请参阅下面的术语说明。
参数:p
Vector of probabilities. These should lie in (0,1).
向量的可能性。这些在于(0,1)。
参数:n, log
See runif.
见runif。
参数:location, scale
Location and scale parameters. The latter should have positive values. Values of these vectors are recyled.
位置和尺度参数。后者应该有正面的价值观。这些向量的值recyled。
Details
详细信息----------Details----------
A Student-t distribution with 2 degrees of freedom and a scale parameter of sqrt(2) is equivalent to the standard Koenker distribution. Further details about this distribution are given in koenker.
以学生为t分布的自由和尺度参数sqrt(2)的2度是等同的标准Koenker分布。这种分布的进一步的细节给出了koenker。
值----------Value----------
dkoenker(x) gives the density function. pkoenker(q) gives the distribution function. qkoenker(p) gives the expectile and quantile function. rkoenker(n) gives n random variates.
dkoenker(x)给出的密度函数。 pkoenker(q)给出的分布函数。 qkoenker(p)给出了expectile和分位数的功能。 rkoenker(n)给n随机变数。
(作者)----------Author(s)----------
T. W. Yee
参见----------See Also----------
dt, koenker.
dt,koenker。
实例----------Examples----------
my_p = 0.25; y = rkoenker(nn <- 5000)
(myexp = qkoenker(my_p))
sum(myexp - y[y <= 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 Koenker distribution[非标Koenker分布]
myloc = 1; myscale = 2
yy = rkoenker(nn, myloc, myscale)
(myexp = qkoenker(my_p, myloc, myscale))
sum(myexp - yy[yy <= myexp]) / sum(abs(myexp - yy)) # Should be my_p[应该是MY_P]
pkoenker(mean(yy), myloc, myscale) # Should be 0.5[应为0.5]
abs(qkoenker(0.5, myloc, myscale) - mean(yy)) # Should be 0[应为0]
abs(pkoenker(myexp, myloc, myscale) - my_p) # Should be 0[应为0]
integrate(f = dkoenker, lower = -Inf, upper = Inf,
locat = myloc, scale = myscale) # Should be 1[应该是1]
y <- seq(-7, 7, len = 201)
max(abs(dkoenker(y) - dt(y / sqrt(2), df = 2) / sqrt(2))) # Should be 0[应为0]
## Not run: plot(y, dkoenker(y), type = "l", col = "blue", las = 1,[#不运行:图(Y,dkoenker(Y),类型为“L”,列=“蓝”,LAS = 1,]
ylim = c(0, 0.4), main = "Blue = Koenker; orange = N(0, 1)")
lines(y, dnorm(y), type = "l", col = "orange")
abline(h = 0, v = 0, lty = 2)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|