seqetm(TraMineR)
seqetm()所属R语言包:TraMineR
Create a transition-definition matrix
创建一个过渡定义矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function automatically creates a transition-definition matrix from a state sequence object to transform the state sequences into time stamped event sequences (in TSE format).
此功能会自动创建一个状态序列对象的状态序列,时间标记的事件序列(TSE格式)转换的过渡定义矩阵。
用法----------Usage----------
seqetm(seq, method = "transition", use.labels = TRUE,
sep = ">", bp = "", ep = "end")
参数----------Arguments----------
参数:seq
State sequence object from which transition events will be determined
状态转换事件的序列对象将确定
参数:method
The method to use. One of "transition", "period" or "state".
使用的方法。 "transition","period"或"state"之一。
参数:use.labels
If TRUE, transition names are built from state labels rather than from the alphabet.
如果TRUE,转变名是内置的,而不是从字母表的状态标签。
参数:sep
Separator to be used between the from-state and to-state that define the transition ("transition" method).
隔板之间要使用从状态和状态定义的过渡(“过渡”的方法)。
参数:bp
Prefix for beginning of period event names ("period" method)
前缀周期事件的名称开始的("period"方法)
参数:ep
Prefix for end of period event names ("period" method)
结束周期事件的名称的前缀("period"方法)
Details
详细信息----------Details----------
Warning!!!: State labels should not contain commas "," which are reserved for separating multiple events of a same transition!
警告!:国家标签不应该包含逗号",":“这是预留用于分隔多个事件的过渡!
One of three methods can be selected with the method argument:
method参数,可以选择以下三种方法之一:
"transition" generates a single (from-state > to-state) event for each found transition and a distinct start-state event for each different sequence start;
"transition"生成一个单一的(从状态>状态)事件,每一个找到的过渡和不同的起始状态为每个不同的顺序启动的事件;
"period" generates a pair of events (end-state-event, start-state-event) for each found transition, a start-state event for the beginning of the sequence and an end-state event for the end of the sequence; names used for end-state and start-state names can be controlled with the bp and ep arguments;
"period"产生一个对事件(最终状态的情况下,开始状态事件)为每一个找到的转变,一开始状态事件的序列开始和结束的最终状态事件序列,为最终状态和启动状态名称中使用的名称是可以控制的bp和ep参数;
"state" generates only the to-state event of each found transition (useful for analysing state sequences with methods for event sequences);
"state"只产生对国家的每一个找到的过渡事件的(有用的,状态序列分析事件序列的方法);
值----------Value----------
The transition-definition matrix.
过渡定义矩阵。
参见----------See Also----------
seqformat for converting to TSE format, seqecreate for creating an event sequence object, seqdef for creating a state sequence object.
seqformatTSE格式转换,seqecreate创建一个事件序列对象,seqdef创建一个状态序列对象。
实例----------Examples----------
## Creating a state sequence object from columns 13 to 24[#创建一个状态序列对象,从13日至24列]
## in the 'actcal' example data set[#在“actcal”示例数据集]
data(actcal)
actcal.seq <- seqdef(actcal,13:24,
labels=c("FullTime", "PartTime", "LowPartTime", "NoWork"))
## Creating a transition matrix, one event per transition[#创建一个转换矩阵,每一个事件过渡]
seqetm(actcal.seq,method = "transition")
## Creating a transition matrix, single to-state events[#创建一个转换矩阵,单一的状态事件]
seqetm(actcal.seq,method = "state")
## Creating a transition matrix, two events per transition[#创建一个转换矩阵,每两个事件过渡]
seqetm(actcal.seq,method = "period")
## changing the prefix of period start event.[#改变周期启动事件的前缀。]
seqetm(actcal.seq,method = "period", bp="begin")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|