找回密码
 注册
查看: 611|回复: 0

R语言 RMC包 RMC.mod()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-26 23:56:30 | 显示全部楼层 |阅读模式
RMC.mod(RMC)
RMC.mod()所属R语言包:RMC

                                        Estimation of categorical discrete-time non-stationary Markov chain models with simple parameterisation.
                                         分类离散时间非平稳马尔可夫链模型用简单的参数化的估计。

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Estimation of categorical Markov chain models whose parameterisation is based on a simple reversible Markov model and that can be extended to non-stationary cases. The model is parameterised by two vectors of parameters: one describing the probability of moving from each state (phi) and the other describing the probability of moving into each state given that a movement will occur (pi). Non-stationary models are incorporated by letting each of these vectors depend on covariates.
分类马尔可夫链模型的参数化的估计是基于一个简单的可逆马尔可夫模型,并可以扩展到非固定的情况下。该模型是参数化的两个向量的参数:1描述从每个状态(φ)和其他描述移动到给定的运动将发生(PI)的每个状态的概率的概率。非固定式的结合,让这些向量依赖于协变量。


用法----------Usage----------


RMC.mod( states, chain.id=NULL, X=NULL, phi.id=NULL, pi.id=NULL, vcov=FALSE, inits=NULL, contr=list( maxit=1000, epsg=1e-8, epsf=1e-8, epsx=1e-8), quiet=FALSE, penalty=0)



参数----------Arguments----------

参数: states
observed ordered chained data. If there are multiple chains then chains are stacked on top of each other. Argument must be supplied
观察下令链接数据。如果有多个链,那么链堆叠在彼此的顶部。参数必须提供


参数: chain.id
vector (length matches states) of identifiers for the individual chains. If NULL then it is assumed that all observations form a single chain.
向量(长度匹配州)的个人链的标识符。如果为NULL,那么它是假定所有的意见形成一个单链。


参数: X
design matrix (covariates) for the two vectors of probabilities. If NULL then X is assumed to contain an intercept term only. If not NULL then model will depend on phi.id and pi.id matrices (see below). X must be of dimensions nrow(X)=length(states) and ncol(X)=number of covariates. Typically will be created with a call to model.matrix
设计矩阵(协变量)的两个向量的概率。如果为NULL,则X被假定为仅包含截距项。如果不为NULL,那么模式将依赖于的phi.id和pi.id矩阵(见下文)。 X必须是尺寸NROW(X)=长(州)和ncol(X)=协变量的数量。通常情况下,将创建一个呼叫model.matrix


参数: phi.id
indicator matrix of zeros and ones showing which covariates to include in the model for which element of phi (zero means not included and one means included). Each element of phi corresponds to the probability of moving from an observed state. phi.id must be of dimensions nrow(phi.id)=ncol(X)=number of covariates and ncol(phi.id)=number of states. If NULL then all covariates are included. Covariates are included via a logistic model for each element of phi
指标显示哪一个矩阵的零和的协变量包括在模型中岛(零表示不包含,装置,它包括一个元素)。披的每一个元素对应移动从所观察到的状态的概率。 phi.id必须是尺寸NROW(phi.id)= NCOL(X)=协变量和ncol(phi.id)的数量=状态数。如果为NULL,然后所有的协变量。协变量包括通过Logistic回归模型中的每个元素披


参数: pi.id
indicator vector of zeros and ones showing which covariates to include in the model for all elements of pi (zero means not included and one means included). Each element of pi correspond to the probability of moving to that state given that a movement will occur. pi.id must have length equal to the number of covariates and indicates if that covariate is included in the model for pi. Covariates are included via the additive logistic transformation (Aitchison 1982)
指标向量的协变量包括在模型中的所有元素的PI(零表示不包含,包含的手段之一)的零和一。圆周率的每一个元素对应于移动到给定的运动将发生该状态的概率。 pi.id长度必须等于协变量的数目,表示如果该协变量包括在模型为pi。协变量包括添加剂的MF转型(艾奇逊1982年通过)


参数: vcov
boolean indicating if the variance matrix of the parameter estimates should be calculated. TRUE indicates that it is calculated
布尔值,表示如果参数估计的协方差矩阵的计算。 TRUE表示,其计算方法是


参数: inits
initial values for the parameters. Must be of appropriate length and ordered as phi parameters and the pi parameters. If NULL then initial values are assumed to be zero. The ordering of this vector is:phi parameters for category 1, category 2, etc followed by pi parameters for transformed category 1, transformed category 2, etc.
为参数的初始值。必须是适当的长度,并下令披参数和PI参数。如果NULL,则初始值被假定为零。这个向量的顺序是:1类,2类,披参数等PI参数转化1类2类等,改造后的


参数: contr
list containing control values for the optimisation procedure. maxit specifies the maximum number of iterations before optimisation is stopped. epsg, epsf and epsx give the stopping tolerances for gradients, relative function and estimates respectively
控制值列表,其中包含的优化过程。麦克斯特指定的最大数目的迭代优化前停止。 EPSG,EPSF和epsx的的停止公差,相对功能梯度估计分别


参数: quiet
boolean indicating if any output is wanted. TRUE indicates that output is generated
布尔值,表示如果任何输出被通缉。 TRUE表明,生成输出


参数: penalty
experimental argument for an optional quadratic penalty on the parameters. A non-zero value indicates that the sum of the squared parameters must be less than or equal to the value. A value of zero indicates no penalty and is the default.
一个可选的参数,二次罚的实验参数。一个非零的值表示的总和必须小于或等于该值的平方参数。零值表示没有惩罚,并且是默认。


Details

详细信息----------Details----------

The observed chained categorical data (in argument states) is modelled according to that described in Foster et al (2009). The Markov process is assumed to be parameterised by two vectors, phi and pi. The phi parameters indicate the probability of moving from each state and the pi probabilities prescribe the probability of moving to each state given that a move will occur. This process is reversible if the parameters do not change within a chain. The probabilities are allowed to vary within a chain by specifying these two vectors of probabilities as functions of covariates (possibly index number).
根据Foster等人(2009年)中描述所观察到的链接分类数据(参数状态)为蓝本。马尔可夫过程被假定为两个向量,φ和PI参数化。披参数的概率从每个国家和圆周率的概率规定移动到每个国家,此举将发生的概率。这个过程是可逆的,如果参数不改变,内链。允许内改变链,通过指定这两个向量的协变量的函数(可能是索引号)的概率的概率。

Since the model has simple form then the stationary distribution is known (up to normalisation constant) and hence, the (log-)likelihood is calculated exactly.
由于该模型具有简单的形式,然后在固定的分布是已知的(最多归一化常数),因此,(log)的可能性被精确计算。

Optimisation is performed using a quasi-Newton method implemented in the LBFGS code from the ALGLIB website (see references). First derivatives for the optimisation are obtained using automatic differentiation (Griewank 2001) using the CppAD tool for C++ (Bell 2007). This saves an awful lot of mucking around with derivative free methods and increases speed. If you do not already use automatic differentiation then you may want to look into it.
优化使用拟牛顿方法实现在LBFGS代码从该ALGLIB的网站(请参阅参考资料)。一阶导数的优化使用自动分化(Griewank 2001年)使用C + +(贝尔2007)CppAD工具。这样可以节省非常多的摆弄周围的衍生方法和增长速度。如果你还没有使用自动分化,那么你可能想看看它。


值----------Value----------

<table summary="R valueblock"> <tr valign="top"><td> Upon successful completion the function returns</td> <td> </td></tr> <tr valign="top"><td> pars</td> <td> the parameter estimates ordered as phi parameters and then pi parameters. The ordering of this vector is:phi parameters for category 1, category 2, etc followed by pi parameters for transformed category 1, transformed category 2, etc.</td></tr> <tr valign="top"><td> like</td> <td> the maximised log-likelihood</td></tr> <tr valign="top"><td> scores</td> <td> the gradients calculated at the estimates. Ordered to match the pars vector</td></tr> <tr valign="top"><td> vcov</td> <td> the variance matrix of the estimates if vcov==TRUE and NULL if vcov==FALSE</td></tr> <tr valign="top"><td> conv</td> <td> the convergence code from the quasi-Newton optimiser</td></tr> <tr valign="top"><td> time</td> <td> the time taken to perform the fit</td></tr> <tr valign="top"><td> niter</td> <td> the number of iterations required by the optimiser</td></tr> <tr valign="top"><td> stuff</td> <td> quite literal:stuff used for model specification and optimisation. Generally not of use to the user</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> Upon successful completion the function returns </ TD> <TD> </ TD> </ TR> <tr valign="top"> <TD > pars </ TD> <TD>参数估计下令披参数,然后PI参数。这个向量的顺序是:PHI参数为1类,2类,转化类第2类1,转化等PI参数,等等。</ TD> </ TR> <tr valign="top"> <TD >  like </ TD> <TD>最大化对数似然</ TD> </ TR> <tr valign="top"> <TD>  scores </ TD> <TD>的梯度计算的估计。有序,以配合</ TD> </ TR> <tr valign="top"> <TD>  vcov</ TD> <TD>方差矩阵的估计,如果vcov部矢量== TRUE,NULL如果vcov == FALSE </ TD> </ TR> <tr valign="top"> <TD>  conv</ TD> <TD>的收敛代码的拟牛顿优化器</ TD> < / TR> <tr valign="top"> <TD>  time </ TD> <TD>所花费的时间来完成这一配合</ TD> </ TR> <tr valign="top"> <  niter TD> </ TD> <TD>数的重复工作,通过优化</ TD> </ TR> <tr valign="top"> <TD>  stuff</ TD> <TD>相当字面的东西,用于规范和优化模型。一般不使用的用户</ TD> </ TR> </ TABLE>


(作者)----------Author(s)----------


Scott D. Foster



参考文献----------References----------

Aitchison J. (1982) The statistical analysis of compositional data. The Journal of the Royal Statistical Society-series B 44: 139-177.
ALGLIB http://www.alglib.net/ (accessed June 2008)
Bell BM. 2007. CppAD: a package for C++ algorithmic differentiation, COIN-OR. http://www.coin-or.org/CppAD/, version 2007/02/07.
Griewank A. (2001) Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. SIAM. Philadelphia.
Foster, S.D., Bravington, M.V., Williams, A., Althaus, F, Laslett, G.M., and Kloser, R.J. (2008) Analysis and prediction of faunal distributions from video and multi-beam sonar data using Markov models. Environmetrics, 20: 541-560.

参见----------See Also----------

RMC.pred for predicting the stationary distribution at arbitrary combinations of covariates. diagnos and diagnos.envel for graphical diagnostic methods for models of class RMC.
RMC.pred预测的平稳分布的协变量的任意组合。 diagnos和diagnos.envel图形类RMC模型的诊断方法。


实例----------Examples----------


#estimate a model for the stationary example data, dataEG1[估计一个固定的示例数据模型,dataEG1]
fm.est1 <- RMC.mod( states=dataEG1[,2], chain.id=dataEG1[,1], X=dataEG1[,3])
#estimate a model for the non-stationary example data, dataEG2[估计模型的非平稳示例数据,dataEG2]
fm.est2 <- RMC.mod( states=dataEG2[,2], chain.id=dataEG2[,1], X=dataEG2[,-(1:2)])

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-24 02:31 , Processed in 0.020013 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表