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

R语言 RMark包 TransitionMatrix()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-26 23:48:39 | 显示全部楼层 |阅读模式
TransitionMatrix(RMark)
TransitionMatrix()所属R语言包:RMark

                                        Multi-state Transition Functions
                                         多状态转换函数

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

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

TransitionMatrix: Creates a transition matrix of movement parameters for a multi-state(strata) model. It computes all Psi values for a multi-strata mark model and constructs a transition matrix.  Standard errors and confidence intervals can also be obtained.
TransitionMatrix:创建一个转换矩阵的多态(层)模型的运动参数。它计算所有帕普西多地层马克模型值,并构建了一个转移矩阵。标准误差及置信区间,也可以以下方式获得。


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


  TransitionMatrix(x,vcv.real=NULL)

  find.possible.transitions(ch)

  transition.pairs(ch)



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

参数:x
Estimate table from get.real with a single record for each possible transition
从get.real的单条记录的每一个可能的过渡估算表


参数:vcv.real
optional variance-covariance matrix from the call to get.real
可选的协方差矩阵由调用get.real


参数:ch
vector of capture history strings for a multi-state analysis
向量捕捉历史的字符串的多态分析


Details

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

find.possible.transitions: Finds possible transitions; essentially it identifies where stratum label A and B are in the same ch for all labels but the the transition could be from A to B or B to A or even ACB which is really an A to C and C to B transition.
find.possible.transitions:查找可能的转换,它本质上阶层的标签标识A和B的所有标签,但在同一个通道的过渡可能是从A到B或B到A或即使ACB这实在是一个A C和C到B的过渡。

transition.pairs: Computes counts of transition pairs. The rows are the "from stratum" and the columns are the "to stratum". So AB would be in the first row second column and BA would be in the second row first column. All intervening 0s are ignored. These are transition pairs so AB0C is A to B and B to C but not A to C.
transition.pairs计算的过渡对数。该行是“阶层”列是“阶层”。因此,AB将在第一行第二列,将在第二行第一列和BA。所有介入的0被忽略。这些过渡对,,所以AB0C是A到B和B到C,但没有A至C。


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

TransitionMatrix: returns either a transition matrix (vcv.real=NULL) or a list of matrices (vcv.real specified) named TransitionMat (transition matrix), se.TransitionMat (se of each transition), lcl.TransitionMat (lower confidence interval limit for each transition), and ucl.TransitionMat (upper confidence interval limit for each transition). find.possible.transitions returns a 0/1 table where 1 means that t both values are in one or more ch strings and transition.pairs returns a table of counts of transition pairs.
TransitionMatrix:返回一个转换矩阵(vcv.real = NULL)或矩阵的列表(vcv.real指定)命名TransitionMat(转换矩阵),se.TransitionMat本身的每一个过渡,lcl.TransitionMat(较低的置信区间上限对于每一次转换),并ucl.TransitionMat(每次转换的置信区间上限)。 find.possible.transitions返回一个0/1表1吨这两个值是在一个或多个通道弦和transition.pairs的返回的转变对表的计数。


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



Jeff Laake




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

get.real
get.real


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



data(mstrata)
# Show possible transitions in first 15 ch values[在第一个15通道的值显示可能的转换]
find.possible.transitions(mstrata$ch[1:15])
# Show transtion pairs for same data[相同的数据显示跃迁对]
transition.pairs(mstrata$ch[1:15])
#limit transtions to 2 and 3 character values for first 30 ch[将限制transtions第30 CH 2和第3个字符的值]
transition.pairs(substr(mstrata$ch[1:30],2,3))

# fit the sequence of multistrata models as shown for ?mstrata[适合多层次模型所示的顺序吗?mstrata]
run.mstrata=function()
{
#[]
# Process data[过程数据]
#[]
mstrata.processed=process.data(mstrata,model="Multistrata")
#[]
# Create default design data[创建默认的设计数据]
#[]
mstrata.ddl=make.design.data(mstrata.processed)
#[]
#  Define range of models for S; note that the betas will differ from the output[定义范围型号为S;注意的beta将不同于输出]
#  in MARK for the ~stratum = S(s) because the design matrix is defined using[MARK~阶层= S(S),因为设计矩阵定义]
#  treatment contrasts for factors so the intercept is stratum A and the other[治疗对比的因素,因此拦截阶层和其他]
#  two estimates represent the amount that survival for B abd C differ from A.[两个估计量生存的B ABDÇ不同A.]
#  You can use force the approach used in MARK with the formula ~-1+stratum which[您可以使用武力MARK~(-1)+层的公式中使用的方法]
#  creates 3 separate Betas - one for A,B and C.[创建3个独立的测试版 - 一个为A,B和C。]
#[]
S.stratum=list(formula=~stratum)
S.stratumxtime=list(formula=~stratum*time)
#[]
#  Define range of models for p[定义范围内的车型为p]
#[]
p.stratum=list(formula=~stratum)
#[]
#  Define range of models for Psi; what is denoted as s for Psi[psi的,还有的是为幽记为S模型的定义范围]
#  in the Mark example for Psi is accomplished by -1+stratum:tostratum which[在psi的是通过-1 +层的标记示例:tostratum]
#  nests tostratum within stratum.  Likewise, to get s*t as noted in MARK you[巢tostratum内地层。同样,s * t的注意在标记你]
#  want ~-1+stratum:tostratum:time with time nested in tostratum nested in[想~(-1)+阶层:tostratum:tostratum嵌套在嵌套随着时间的推移]
#  stratum.[阶层。]
#[]
Psi.s=list(formula=~-1+stratum:tostratum)
Psi.sxtime=list(formula=~-1+stratum:tostratum:time)
#[]
# Create model list and run assortment of models[创建模型列表和运行各式各样的模型]
#[]
model.list=create.model.list("Multistrata")
#[]
# Add on specific models that are paired with fixed p's to remove confounding[加具体型号,搭配固定的p除去混杂]
#[]
p.stratumxtime=list(formula=~stratum*time)
p.stratumxtime.fixed=list(formula=~stratum*time,fixed=list(time=4,value=1))
model.list=rbind(model.list,c(S="S.stratumxtime",p="p.stratumxtime.fixed",
               Psi="Psi.sxtime"))
model.list=rbind(model.list,c(S="S.stratum",p="p.stratumxtime",Psi="Psi.s"))
#[]
# Run the list of models[运行列表模型]
#[]
mstrata.results=mark.wrapper(model.list,data=mstrata.processed,ddl=mstrata.ddl)
#[]
# Return model table and list of models[回归模型的表格和列表的车型]
#[]
return(mstrata.results)
}
mstrata.results=run.mstrata()
mstrata.results
# for the best model, get.real to get a list containing all Psi estimates[最好的模式,get.real得到一个列表,其中包含所有的幽估计]
#  and the v-c matrix[和V-C矩阵]
Psilist=get.real(mstrata.results[[1]],"Psi",vcv=TRUE)
Psivalues=Psilist$estimates
# call Transition matrix using values from time==1; the call to the function[呼叫转移矩阵的值== 1时,调用该函数]
# must only contain one record for each possible transition. An error message is[必须只包含一个记录每一个可能的过渡。一条错误消息。]
# given if not the case[给定的情况下如果不]
TransitionMatrix(Psivalues[Psivalues$time==1,])
# call it again but specify the vc matrix to get se and conf interval[再次调用它,但指定的vc + +矩阵本身和conf间隔]
TransitionMatrix(Psivalues[Psivalues$time==1,],vcv.real=Psilist$vcv.real)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 20:37 , Processed in 0.027113 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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