sn.mle.grouped(sn)
sn.mle.grouped()所属R语言包:sn
Maximum likelihood estimation of SN and ST distribution for grouped data
最大似然估计的SN和ST分组数据的分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a skew-normal (SN) and skew-t (ST) distribution to grouped data using exact maximum likelihood estimation
适合偏斜正常(SN)和skew-T(ST)的分布分组数据的精确极大似然估计
用法----------Usage----------
sn.mle.grouped(breaks, freq, trace=FALSE, start=NA)
st.mle.grouped(breaks, freq, trace=FALSE, start=NA)
参数----------Arguments----------
参数:breaks
a vector contaning the cut points of the groups, given in ascending order. The last value can be Inf, the first one can be -Inf
浸渗组的切点的一个向量,给出的升序排列。最后一个值可以Inf,第一个是-Inf
参数:freq
a vector containing the observed frequencies corresponding to the intervals defined by breaks; it is required that length(freq)=length(breaks)-1
一个向量,包含由breaks定义的时间间隔对应于所观察到的频率,它被要求length(freq)=length(breaks)-1
参数:trace
logical value which controls printing of the algorithm convergence. If trace=TRUE, details are printed. Default value is FALSE
逻辑控制打印算法的收敛值。如果trace=TRUE,细节被打印出来。默认值是FALSE
参数:start
vector of length with initial values for the woking parameters: location, log(scale), shape and (for the ST case) log(df). </table>
矢量的长度与沃金参数:位置,log(尺度),形状和(为ST案)log(自由度)的初始值。 </ TABLE>
Details
详细信息----------Details----------
The optimizer optim is used, supplying the log-likelihood function for grouped data, namely the multinomial expression whose probabilities are assigned by the SN or ST distribution to the given intervals.
优化optim提供的数似然函数时,分组数据,即多项式的表达,其概率分配的SN或ST分配给定的时间间隔。
值----------Value----------
a list containing the following components:
一个列表,包含以下组件:
<table summary="R valueblock"> <tr valign="top"><td>call</td> <td> a string containing the calling statement </td></tr> <tr valign="top"><td>dp</td> <td> for the SN case, a vector of length 3 containing the location, scale and shape parameter; for the ST case, there is an extra parameter, the degress of freedom </td></tr> <tr valign="top"><td>end</td> <td> a vector of length 3 or 4 containing the working parameters; this vector can be used as a start for a new call to the function </td></tr> <tr valign="top"><td>opt</td> <td> the list returned by the optimizer optim; see the documentation of this function for explanation of its components. </td></tr></table>
<table summary="R valueblock"> <tr valign="top"> <TD> call</ TD> <td>一个字符串,其中包含调用语句</ TD> </ TR> <TR VALIGN = “顶部”> <TD>dp</运输署“<td>的SN的情况下,含有的位置,大小和形状参数的长度为3的矢量;为ST的情况下,有一个额外的参数,学位的自由</ TD> </ TR> <tr valign="top"> <TD>end </ TD> <td>一个矢量的长度为3或4的工作参数;该向量可作为一个start一个新的呼叫的功能</ TD> </ TR> <tr valign="top"> <TD>opt </ TD> <TD>在返回的列表优化optim;看到这个函数的文档说明它的组件。 </ TD> </ TR> </ TABLE>
背景----------Background----------
Background information on the SN distribution is given by Azzalini (1985); see also Azzalini and Capitanio (1999). For the ST distribution, see Azzalini and Capitanio (2003).
SN分布的背景资料上给出了Azzalini(1985年); Azzalini和卡皮塔尼奥(1999)。对于ST分配,Azzalini和卡皮塔尼奥(2003)。
参考文献----------References----------
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scand. J. Statist. 12, 171-178.
Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew-normal distribution. J.Roy.Statist.Soc. B 61, 579–602.
Azzalini, A. and Capitanio, A. (2003). Distributions generated by perturbation of symmetry with emphasis on a multivariate skew-t distribution. J.Roy. Statist. Soc. B 65, 367–389.
参见----------See Also----------
dsn, dst, optim, sn.mle
dsn,dst,optim,sn.mle
实例----------Examples----------
data(ais, package="sn")
attach(ais)
breaks<- c(130,160, seq(170, 190, by=2.5), 200, 230)
f <- cut(Ht[sex=="female"], breaks = breaks)
freq <- tabulate(f, length(levels(f)))
b1 <- sn.mle.grouped(breaks, freq)
b2 <- st.mle.grouped(breaks, freq, start=c(b1$end,log(5)))
print(b2$dp)
#[]
us.income <- c(0,seq(from=0.2, to=1.8, by=0.1), 2.0, 2.5, 5.0, Inf)
mid <- (us.income[-1]+us.income[-length(us.income)])/2
mid[length(mid)] <- 6.5
cum.freq<- c(1.78, 3.25, 5.56, 8.16, 11.12, 14.21, 17.54, 20.78, 24.00,
27.52, 30.77, 34.21, 37.56, 40.70, 44.41, 47.85, 51.22,
57.60, 72.12, 96.40, 100) / 100
freq<- round(diff(c(0,cum.freq*34660)))
a <- st.mle.grouped(breaks=log(us.income), freq, trace=TRUE,
start=c(1.2, log(0.9), -2.1, log(20)))
print(a$dp)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|