dtrg(TRIANG)
dtrg()所属R语言包:TRIANG
Symmetric discrete triangular distributions
对称离散三角分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function plots symmetric discrete triangular distributions
函数曲线的对称离散三角分布
用法----------Usage----------
dtrg(c, a, h, y)
参数----------Arguments----------
参数:c
The center $c$ is an integer
中心是一个整数,$ C $
参数:h
The order $h$ is a positive real number
该命令$ H $是一个正实数。
参数:a
The arm $a$ is a non-negative integer
臂$元是一个非负的整数
参数:y
The vector of entire observations
整个观测向量
Details
详细信息----------Details----------
The symmetric discrete triangular distribution has the probability mass function
离散对称三角形分布的概率密度函数
$$ Pr(Y=y) = [(a+1)^h - {abs(y-c)}^h]/A $$
$ $ PR(Y = Y)= [(1 +1)^ H - {ABS(Y-C)} ^ H] / A $ $
where $ A=(2a+1)(a+1)^h-2sum_k=1^ak^h$ is the normalizing constant. The mean is equal to $c$ and the variance is given by $V(a,h)=(1/A){a(2a+1)(a+1)^h+1/3 - 2sum_k=1^ak^h+2}.$
其中$ A =(2A +1)(+1)^ H-2sum_k = 1 ^ AK ^ H $是标准化常数。平均等于$ C $ = 1,方差为$ V(A,H)=(1 / A){A(2A +1)(+1)^ H +1 / 3 - 2sum_k ^ AK ^ H +2。
值----------Value----------
The function returns probability mass function in [0,1] of the corresponding $y$ value.
该函数返回概率密度函数在[0,1]的相应价值$ Y $。
(作者)----------Author(s)----------
Tristan Senga Kiess\'e, Silvio S. Zocchi, C\'elestin C. Kokonendji
参考文献----------References----------
Kokonendji, C.C. and Zocchi, S.S. (2010). Extensions of discrete triangular distributions and boundary bias in kernel estimation for discrete functions. Statistics and Probability Letters, 80, 1655–1662.
Kokonendji, C.C., Senga Kiess\'e, T. and Zocchi, S.S. (2007). Discrete triangular distributions and non-parametric estimation for probability mass function. Journal of Nonparametric Statistics 19, 241–254.
参见----------See Also----------
'dtrgg' for the general discrete triangular distribution
对于一般的离散三角形分布的“dtrgg”
实例----------Examples----------
##These examples provide some symmetric discrete triangular distributions of order [#这些示例提供了一些对称离散三角分布的订单]
## h in {1/12, 1/2, 1, 2, 12} centered in c=5 with arm a=4 .[集中在#h的{1/12,1/2,1,2,12},C = 5与臂= 4。]
y=0:10
a=4
c=5
h=12
T12=dtrg(c,a,h,y)
h=2
T2=dtrg(c,a,h,y)
h=1
T1=dtrg(c,a,h,y) ##The case h=1 provides a discrete triangular distribution [#H = 1的情况下,提供了一个离散三角形分布]
##said to be pyramidal[#说是锥体]
h=1/2
T_05=dtrg(c,a,h,y)
h=1/12
T_012=dtrg(c,a,h,y)
plot(y,T1,xlab="y",ylab="Probab(y)",xlim=c(0,11),ylim=c(0,0.7),
main="Symmetric discrete triangular distributions centered in c=5 with arm a=4",
cex.lab=1.5,cex.axis=1.5,pch=20)
lines(y,T1,pch=20,lty=1)
points(y,T_012,pch=17)
lines(y,T_012,lty=1)
points(y,T2)
lines(y,T2,lty=2)
points(y,T12)
lines(y,T12, lty=1)
points(y,T_05, pch=17)
lines(y,T_05,lty=2)
op <- par(bg="white")
legend(8,0.7,c("h=1/12", "h=1/2","h=1", "h=2", "h=12"),pch=c(17,17,20,1,1),
lty=c(1,2,1,2,1),cex = 1.2)
par(op)
## The function is currently defined as[#功能目前被定义为]
function(c,a,h,y){T=rep(0,length(y));
if (a==0)
{
{for (j in 1:length(y)) # Loop in j for each observation y[在j循环的每个观察Ÿ]
{if (y[j]==c)
T[j]= 1 # Dirac distribution at c [狄拉克分布在c]
else{
T[j]=0
}
}
}
}
else
{
if (h==0)
{
{for (j in 1:length(y)) # Loop in j for each observation y[在j循环的每个观察Ÿ]
{if (y[j]==c)
T[j]= 1 # Dirac distribution at c [狄拉克分布在c]
else{
T[j]=0
}
}
}
}
else if (h==Inf)
{
{for (j in 1:length(y)) # Loop in j for each observation y[在j循环的每个观察Ÿ]
{if (y[j]>=(c-a) & y[j]<=(c+a)& y[j]==as.integer(y[j]))
# Support {c-a,...,c,...c+a}[支持{C-A,...,C,C + A}]
T[j]= 1/(2*a+1)
# Discrete uniform distribution [离散均匀分布]
else{
T[j]=0
}
}
}
}
else
{ u=0
{for (k in 1:a)
{
u=u+k^h
}
}
A=(2*a+1)*(a+1)^h-2*u # Normalizing constant [标准化常数]
{for (j in 1:length(y)) # Loop in j for each observation y[在j循环的每个观察Ÿ]
{if (y[j]>=(c-a) & y[j]<=(c+a) & y[j]==as.integer(y[j]))
# Support {c-a,...,c,...c+a}[支持{C-A,...,C,C + A}]
T[j]= ((a+1)^h - (abs(y[j]-c))^h)/A
# Symmetric discrete triangular distribution [对称离散三角形分布]
else{
T[j]=0
}
}
}
}
}
return(T) }
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|