koenker(VGAM)
koenker()所属R语言包:VGAM
Koenker's Distribution Family Function
Koenker的分配家庭功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Estimates the location and scale parameters of Koenker's distribution by maximum likelihood estimation.
Koenker的分布位置与刻度参数估计的最大似然估计。
用法----------Usage----------
koenker(percentile = 50, llocation = "identity", lscale = "loge",
elocation = list(), escale = list(), ilocation = NULL,
iscale = NULL, imethod = 1, zero = 2)
参数----------Arguments----------
参数:percentile
A numerical vector containing values between 0 and 100, which are the quantiles and expectiles. They will be returned as "fitted values".
向量的数值介于0和100之间的值,这是位数和expectiles的。他们将返回“拟合值”。
参数:llocation, lscale, elocation, escale
See Links for more choices, and CommonVGAMffArguments.
见Links更多的选择,和CommonVGAMffArguments。
参数:ilocation, iscale, imethod, zero
See CommonVGAMffArguments for details.
见CommonVGAMffArguments的详细信息。
Details
详细信息----------Details----------
Koenker (1993) solved for the distribution whose quantiles are equal to its expectiles. This is called Koenker's distribution here. Its canonical form has mean and mode at 0 and has a heavy tail (in fact, its variance is infinite).
koenker(1993)的分布,其位数等于其expectiles解决。这就是所谓的Koenker的分布在这里。其典型形式在0均值和模式,并有一个沉重的尾巴(事实上,它的方差是无限的)。
The standard (“canonical”) form of Koenker's distribution can be endowed with a location and scale parameter. The standard form has a density that can be written as
标准(“规范”)的形式可以赋予Koenker的分布的位置和尺度参数。的标准形式具有的密度,可以写为
for real y. Then z = (y-a)/b for location and scale parameters a and b > 0. The mean of Y is a. By default, eta1=a and eta2=log(b). The expectiles/quantiles corresponding to percentile are returned as the fitted values; in particular, percentile = 50 corresponds to the mean (0.5 expectile) and median (0.5 quantile).
真正的y。然后z = (y-a)/b的位置和尺度参数a和b > 0。 Y的平均a。默认情况下,eta1=a和eta2=log(b)。的expectiles /分位数对应于percentile返回作为拟合的值,特别是,percentile = 50对应的平均(0.5 expectile)和中位数(0.5分位数)。
Note that if Y has a standard Koenker distribution then Y = sqrt(2) * T_2 where T_2 has a Student-t distribution with 2 degrees of freedom. The two parameters here can also be estimated using studentt2 by specifying df = 2 and making an adjustment for the scale parameter, however, this VGAM family function is more efficient since the EIM is known (Fisher scoring is implemented.)
请注意,如果Y有一个标准的Koenker分布,然后Y = sqrt(2) * T_2其中T_2有一个Student-t分布与2个自由度。然而,这里的两个参数也可使用studentt2通过指定df = 2和使调整为尺度参数估计,这VGAM家庭功能是更有效的,因为已知的EIM(费希尔得分实现。)
值----------Value----------
An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能,如vglm,rrvglm和vgam。
(作者)----------Author(s)----------
T. W. Yee
参考文献----------References----------
When are expectiles percentiles? (solution) Econometric Theory, 9, 526–527.
参见----------See Also----------
dkoenker, studentt2.
dkoenker,studentt2。
实例----------Examples----------
set.seed(123); nn <- 1000
kdat <- data.frame(x2 = sort(runif(nn)))
kdat <- transform(kdat, mylocat = 1 + 3 * x2,
myscale = 1)
kdat <- transform(kdat, y = rkoenker(nn, loc = mylocat, scale = myscale))
fit <- vglm(y ~ x2, koenker(perc = c(1, 50, 99)), kdat, trace = TRUE)
fit2 <- vglm(y ~ x2, studentt2(df = 2), kdat, trace = TRUE) # 'same' as fit[作为适合的同]
coef(fit, matrix = TRUE)
head(fitted(fit))
head(predict(fit))
# Nice plot of the results[尼斯积的结果]
## Not run: plot(y ~ x2, kdat, col = "blue", las = 1,[#未运行图(Y 2倍,KDAT,列=“蓝”,LAS = 1,]
sub = paste("n =", nn),
main = "Fitted quantiles/expectiles using Koenker's distribution")
matplot(with(kdat, x2), fitted(fit), add = TRUE, type = "l", lwd = 3)
legend("bottomright", lty = 1:3, lwd = 3, legend = colnames(fitted(fit)),
col = 1:3)
## End(Not run)[#(不执行)]
fit@extra$percentile # Sample quantiles[采样位数]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|