sn.em(sn)
sn.em()所属R语言包:sn
Fitting Skew-normal variables using the EM algorithm
配件扭曲正常的变量,使用EM算法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a skew-normal (SN) distribution to data, or fits a linear regression model with skew-normal errors, using the EM algorithm to locate the MLE estimate. The estimation procedure can be global or it can fix some components of the parameters vector.
适合歪斜正常(SN)分布的数据,或适合歪斜正常误差的线性回归模型,使用EM算法来定位的最大似然估计。估计过程可以是全局的,或者它可以修复的参数向量的某些组成部分。
用法----------Usage----------
sn.em(X, y, fixed, p.eps=0.0001, l.eps=0.01, trace=FALSE, data=FALSE)
参数----------Arguments----------
参数:y
a vector contaning the observed variable. This is the response variable in case of linear regression.
一个向量,浸渗观察到的变量。这是一个的情况下的响应变量线性回归。
参数:X
a matrix of explanatory variables. If X is missing, then a one-column matrix of all 1's is created. If X is supplied, and an intercept term is required, then it must include a column of 1's.
的解释变量的矩阵。 X如果丢失了,那么所有的一列矩阵的创建。如果X被供给,并需要截距项,那么它必须包括1的一列。
参数:fixed
a vector of length 3, indicating which components of the parameter vector must be regarded as fixed. In fixed=c(NA,NA,NA), which is the default setting, a global maximization is performed. If the 3rd component is given a value, then maximization is performed keeping that value fixed for the shape parameter. If the 3rd and 2nd parameters are fixed, then the scale and the shape parameter are kept fixed. No other patterns of the fixed values are allowed.
的长度为3的矢量,指示哪些组件必须被视为固定的参数矢量。在的fixed=c(NA,NA,NA),这是默认的设置,是一个全球性的最大化。如果第三分量给定值,然后最大化该值保持固定的形状参数。如果第三和第二参数是固定的,那么规模和保持固定的形状参数。无其他模式的固定值是允许的。
参数:p.eps
numerical value which regulates the parameter convergence tolerance.
数值调节参数收敛性。
参数:l.eps
numerical value which regulates the log-likelihood convergence tolerance.
其中规定了对数似然收敛公差的数值。
参数:trace
logical value which controls printing of the algorithm convergence. If trace=TRUE, details are printed. Default value is F.
逻辑控制打印算法的收敛值。如果trace=TRUE,细节被打印出来。默认值为F。
参数:data
logical value. If data=TRUE, the returned list includes the original data. Default value is data=FALSE. </table>
逻辑值。如果data=TRUE,返回的列表包含原始数据。默认值为data=FALSE。 </ TABLE>
Details
详细信息----------Details----------
The function works using the direct parametrization; on convergence, the output is then given in both parametrizations.
该功能适用于使用直接参数化;收敛,输出,然后在这两个参数化。
This function is based on the EM algorithm; it is generally quite slow, but it appears to be very robust. See sn.mle for an alternative method, which also returns standard errors.
此功能是基于EM算法,它通常是相当缓慢的,但它似乎是非常强大的。见sn.mle的另一种方法,这也返回标准错误。
值----------Value----------
a list with the following components:
与以下组件的列表:
<table summary="R valueblock"> <tr valign="top"><td>dp</td> <td> a vector of the direct parameters, as explained in the references below. </td></tr> <tr valign="top"><td>cp</td> <td> a vector of the centred parameters, as explained in the references below. </td></tr> <tr valign="top"><td>logL</td> <td> the log-likelihood at congergence. </td></tr> <tr valign="top"><td>data</td> <td> optionally (if data=TRUE), a list containing X and y, as supplied on input, and a vector of residuals, which should have an approximate SN distribution with location=0 and scale=1, in the direct parametrization. </td></tr></table>
<table summary="R valueblock"> <tr valign="top"> <TD>dp</ TD> <td>一个矢量的直接参数的说明,以下引用。 </ TD> </ TR> <tr valign="top"> <TD>cp</ TD> <TD>的向量中心的参数,解释在下面的参考资料。 </ TD> </ TR> <tr valign="top"> <TD> logL</ TD> <TD>的log在congergence的可能性。 </ TD> </ TR> <tr valign="top"> <TD>data </ TD> <TD>可选(如果data=TRUE),一个列表,其中包含X y,上提供的输入,和一个向量的residuals,它应该有一个近似的SN分布location=0和scale=1,在直接的参数化。 </ TD> </ TR> </ TABLE>
背景----------Background----------
Background information on the SN distribution is given by Azzalini (1985). See Azzalini and Capitanio (1999) for a more detailed discussion of the direct and centred parametrizations.
背景信息的SN分布给出者Azzalini(1985)。 Azzalini和卡皮塔尼奥(1999年)的直接和中心的参数化更详细的讨论。
参考文献----------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.
参见----------See Also----------
dsn, sn.mle, cp.to.dp
dsn,sn.mle,cp.to.dp
实例----------Examples----------
data(ais, package="sn")
attach(ais)
#[]
a<-sn.em(y=bmi)
#[]
a<-sn.em(X=cbind(1,lbm,lbm^2),y=bmi)
#[]
M<-model.matrix(~lbm+I(ais$sex))
b<-sn.em(M,bmi)
#[]
fit <- sn.em(y=bmi, fixed=c(NA, 2, 3), l.eps=0.001)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|