msn.fit(sn)
msn.fit()所属R语言包:sn
Fitting multivariate skew-normal distributions
配件多变量偏斜正态分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a multivariate skew-normal (MSN) distribution to data, or fits a linear regression model with multivariate skew-normal errors, using maximum likelihood estimation. The outcome is then displayed in graphical form.
适用于多变量歪斜正常(MSN)分布的数据,或符合一元线性回归模型多元歪斜正常的错误,用最大似然估计。然后,结果以图形的形式显示。
用法----------Usage----------
msn.fit(X, y, freq, plot.it=TRUE, trace=FALSE, ... )
参数----------Arguments----------
参数:y
a matrix or a vector. If y is a matrix, its rows refer to observations, and its columns to components of the multivariate distribution. If y is a vector, it is converted to a one-column matrix, and a scalar skew-normal distribution is fitted.
一个矩阵或矢量。如果y是一个矩阵,它的行是指观察,和它的列的多元分布的组件。如果y是一个矢量,它被转换到一个列的矩阵,和一个标量歪斜正态分布嵌合。
参数:X
a matrix of covariate values. If missing, a one-column matrix of 1's is created; otherwise, it must have the same number of rows of y.
矩阵的协变量值。如果缺少,矩阵中1的一列被创建,否则,它必须有相同数量的行y。
参数:freq
a vector of weights. If missing, a one-column matrix of 1's is created; otherwise it must have the same number of rows of y.
的权重的矢量。如果缺少,矩阵中1的一列被创建,否则它必须有相同数量的行y。
参数:plot.it
logical value which controls the graphical output (default=TRUE); see below for description.
逻辑值,控制图形输出(默认值= TRUE),见下面的说明。
参数:trace
logical value which controls printing of the algorithm convergence. If trace=TRUE, details are printed. Default value is FALSE.
逻辑控制打印算法的收敛值。如果trace=TRUE,细节被打印出来。默认值为FALSE。
参数:...
additional parameters passed to msn.mle; in practice, the start, the algorithm and the control parameters can be passed. </table>
额外的参数传递给msn.mle,实际上,start,algorithm和control参数可以通过。 </ TABLE>
Details
详细信息----------Details----------
For computing the maximum likelihood estimates, msn.fit invokes msn.mle which does the actual computational work; then, msn.fit displays the results in graphical form. The documentation of msn.mle gives details of the numerical procedure for maximum likelihood estimation.
对于计算的最大似然估计,msn.fit调用msn.mle来完成实际的计算工作,然后,msn.fit结果以图形的形式显示。文件msn.mle最大似然估计的数值计算程序的详细信息。
Although the function accepts a vector y as input, the use of sn.mle is recommended in the scalar case.
虽然该函数接受一个向量y作为输入,用sn.mle建议在标量情况。
值----------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> a list containing the direct parameters beta, Omega, alpha. Here, beta is a matrix of regression coefficients with dim(beta)=c(nrow(X),ncol(y)), Omega is a covariance matrix of order ncol(y), alpha is a vector of shape parameters of length ncol(y). </td></tr> <tr valign="top"><td>logL</td> <td> log-likelihood evaluated at dp. </td></tr> <tr valign="top"><td>se</td> <td> a list containing the components beta, alpha, info. Here, beta and alpha are the standard errors for the corresponding point estimates; info is the observed information matrix for the working parameter, as explained below. </td></tr> <tr valign="top"><td>algorithm</td> <td> see the documentation of msn.mle for its explanation </td></tr> <tr valign="top"><td>test.normality</td> <td> a list of with elements test and p.value, which are the value of the likelihood ratio test statistic for normality (i.e. test that all components of the shape parameter are 0), and the corresponding p-value. </td></tr> <tr valign="top"><td>mahalanobis</td> <td> a list of with elements distance, prob and df, which are the Mahalanobis distances of the residuals from the origin, with respect to the metric associated to the matrix Omega, and the values prob of the associated probabilities computed from the chi-square distribution with df=ncol(y) degrees of freedom. </td></tr></table>
<table summary="R valueblock"> <tr valign="top"> <TD>call</ TD> <td>一个字符串,其中包含调用语句。 </ TD> </ TR> <tr valign="top"> <TD> dp</ TD> <td>一个列表,其中包含的直接参数beta,Omega, alpha。在这里,beta是一个矩阵的回归系数与dim(beta)=c(nrow(X),ncol(y)),Omega的协方差矩阵为了ncol(y),alpha是一个矢量形状参数的长度ncol(y)。在logL</ TD> </ TR> <tr valign="top"> <TD> dp </ TD> <TD>log的可能性进行评估。 </ TD> </ TR> <tr valign="top"> <TD> se</ TD> <td>一个列表,其中包含的组件beta,alpha,info。在这里,beta和alpha的对应点的标准误差的估计;info是观察到的信息矩阵的工作参数,如下面解释。 </ TD> </ TR> <tr valign="top"> <TD>algorithm </ TD> <TD>看到的文档msn.mle其解释</ TD> </ TR > <tr valign="top"> <TD> test.normality </ TD> <td>一个列表中的元素test和p.value,这是值的似然比检验正常(即测试的所有组成部分的形状参数为0),以及相应的p-值的统计量。 </ TD> </ TR> <tr valign="top"> <TD>mahalanobis </ TD> <td>一个列表中的元素distance,prob和df,这是Omega的相关概率计算卡方分布的残差的来源,马氏距离的度量标准相关的矩阵prob,和值df=ncol(y)自由度。 </ TD> </ TR> </ TABLE>
副作用----------Side Effects----------
Graphical output is produced if (plot.it \& missing(freq))=TRUE and a suitable device is active. Three plots are produced, and the programs pauses between each two of them, waiting for the <Enter> key to be pressed.
图形输出如果(plot.it \& missing(freq))=TRUE和产生一个合适的移动设备被激活。三幅图的生产和程序,它们两两之间的暂停,等待回车键被按下。
The first plot uses the variable y if X is missing, otherwise it uses the residuals from the regression. The form of this plot depends on the value of k=ncol(y); if k=1, an histogram is plotted with the fitted distribution superimposed. If k>1, a matrix of scatterplots is produced, with superimposed the corresponding bivariate densities of the fitted distribution.
第一个图使用变量y如果X缺少的,否则它使用回归的残差。这个图的形式取决于k=ncol(y),如果k=1,直方图绘制与拟合分布叠加。如果k>1,散点图矩阵,与相应的二元拟合分布密度的叠加。
The second plot has two panels, each representing a QQ-plot of Mahalanobis distances. The first of these refers to the fitting of a multivariate normal distribution, a standard statistical procedure; the second panel gives the corresponding QQ-plot of suitable Mahalanobis distances for the multivariate skew-normal fit.
第二幅图有两个小组,每个代表一个QQ积马氏距离。这是指多元正态分布的拟合,标准的统计程序的第二个面板给出了相应的QQ积歪斜正常合身的多元合适的马氏距离。
The third plot is similar to the previous one, except that PP-plots are produced.
第三个图是前一个相似,不同的是PP图产生。
背景----------Background----------
The multivariate skew-normal distribution is discussed by Azzalini and Dalla Valle (1996); the (Omega,alpha) parametrization adopted here is the one of Azzalini and Capitanio (1999).
的多元歪斜正态分布讨论由Azzalini和达拉瓦莱达奥(1996年);这里通过(Omega,alpha)参数化是一项Azzalini和卡皮塔尼奥(1999)。
注意----------Note----------
This function may be removed in future versions of the package, and (some of) its functionality transferred somewhere else
此功能可在未来版本的软件包中删除,其他地方(部分),其功能将
参考文献----------References----------
Azzalini, A. and Dalla Valle, A. (1996). The multivariate skew-normal distribution. Biometrika 83, 715–726.
Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew-normal distribution. J.Roy.Statist.Soc. B 61, 579–602.
参见----------See Also----------
msn.mle, mst.fit, dmsn,
msn.mle,mst.fit,dmsn,
实例----------Examples----------
data(ais, package="sn")
attach(ais)
# a simple-sample case[一个简单的样品的情况下,]
b <- msn.fit(y=cbind(Ht,Wt))
#[]
# a regression case:[一个回归的情况下:]
a <- msn.fit(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-6))
#[]
# refine the previous outcome[改进了先前的结果]
a1 <- msn.fit(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-9), start=a$dp)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|