alaplaceUC(VGAM)
alaplaceUC()所属R语言包:VGAM
The Laplace Distribution
拉普拉斯分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Density, distribution function, quantile function and random generation for the 3-parameter asymmetric Laplace distribution with location parameter location, scale parameter scale, and asymmetry parameter kappa.
密度,分布函数,分位数函数和随机生成的3参数的非对称Laplace分布位置参数location,尺度参数scale,和非对称参数kappa。
用法----------Usage----------
dalap(x, location = 0, scale = 1, tau = 0.5, kappa = sqrt(tau/(1-tau)),
log = FALSE)
palap(q, location = 0, scale = 1, tau = 0.5, kappa = sqrt(tau/(1-tau)))
qalap(p, location = 0, scale = 1, tau = 0.5, kappa = sqrt(tau/(1-tau)))
ralap(n, location = 0, scale = 1, tau = 0.5, kappa = sqrt(tau/(1-tau)))
参数----------Arguments----------
参数:x, q
vector of quantiles.
向量的位数。
参数:p
vector of probabilities.
向量的概率。
参数:n
number of observations. If length(n) > 1 then the length is taken to be the number required.
若干意见。如果length(n) > 1的长度是所需的数量。
参数:location
the location parameter xi.
位置参数xi。
参数:scale
the scale parameter sigma. Must consist of positive values.
尺度参数sigma。必须由正面的价值观。
参数:tau
the quantile parameter tau. Must consist of values in (0,1). This argument is used to specify kappa and is ignored if kappa is assigned.
位数参数tau。必须由在(0,1)值。该参数用于指定kappa和被忽略,如果kappa分配。
参数:kappa
the asymmetry parameter kappa. Must consist of positive values.
的不对称参数kappa。必须由正面的价值观。
参数:log
if TRUE, probabilities p are given as log(p).
如果TRUE,概率plog(p)。
Details
详细信息----------Details----------
There are many variants of asymmetric Laplace distributions (ALDs) and this one is known as the ALD by Kotz et al. (2001). See alaplace3, the VGAM family function for estimating the three parameters by maximum likelihood estimation, for formulae and details.
不对称Laplace分布有许多变种(ALDS)和这一个被称为ALD科兹等。 (2001)。 alaplace3,VGAM家庭功能的三个参数估计的最大似然估计,公式和细节。
值----------Value----------
dalap gives the density, palap gives the distribution function, qalap gives the quantile function, and ralap generates random deviates.
dalap给出了密度,palap给出了分布函数,qalap给出了分位数的功能,和ralap随机产生的偏离。
(作者)----------Author(s)----------
T. W. Yee
参考文献----------References----------
The Laplace distribution and generalizations: a revisit with applications to communications, economics, engineering, and finance, Boston: Birkhauser.
参见----------See Also----------
alaplace3.
alaplace3。
实例----------Examples----------
x <- seq(-5, 5, by = 0.01)
loc <- 0; sigma <- 1.5; kappa <- 2
## Not run: plot(x, dalap(x, loc, sigma, kappa = kappa), type = "l", col = "blue",[#未运行图(X,DALAP(X,禄,SIGMA,KAPPA = KAPPA),类型为“L”,列=“蓝”,]
main = "Blue is density, red is cumulative distribution function",
ylim = c(0,1), sub = "Purple are 5, 10, ..., 95 percentiles",
las = 1, ylab = "", cex.main = 0.5)
abline(h = 0, col = "blue", lty = 2)
lines(qalap(seq(0.05, 0.95, by = 0.05), loc, sigma, kappa = kappa),
dalap(qalap(seq(0.05, 0.95, by = 0.05), loc, sigma, kappa = kappa),
loc, sigma, kappa = kappa), col = "purple", lty = 3, type = "h")
lines(x, palap(x, loc, sigma, kappa = kappa), type = "l", col = "red")
abline(h = 0, lty = 2)
## End(Not run)[#(不执行)]
pp = seq(0.05, 0.95, by = 0.05) # Test two functions[测试两个功能]
max(abs(palap(qalap(pp, loc, sigma, kappa = kappa),
loc, sigma, kappa = kappa) - pp)) # Should be 0[应为0]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|