seqtransn(TraMineR)
seqtransn()所属R语言包:TraMineR
Number of transitions in a sequence
在一个序列中的转换数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the number of transitions in each sequence of a sequence object.
计算在每个序列的第一个序列对象的转换次数。
用法----------Usage----------
seqtransn(seqdata, with.missing=FALSE, norm=FALSE, pweight=FALSE)
参数----------Arguments----------
参数:seqdata
a state sequence object as defined by the seqdef function.
一个状态序列对象定义的seqdef功能。
参数:with.missing
logical. if set as TRUE, missing states (gaps in sequences) are considered as an additional state and included in the DSS sequence. See seqdss.
逻辑。如果设置为TRUE,缺少的状态(序列中的差距)被认为是一个额外的状态,其中包括的DSS序列中。见seqdss。
参数:norm
logical. If set as TRUE, the number of transitions is divided by its theoretical maximum, the length of the sequence minus 1. When length of the sequence is 1, normalized value is set to 0 as in the non-normalized case.
逻辑。如果设置为TRUE,跃变的次数除以它的最大理论值,序列的长度减1。当序列长度为1时,如在非归一化的情况下,归一化值被设置为0。
参数:pweight
logical. EXPERIMENTAL! If set as TRUE, when counting transitions each transition does not account for 1 but for its probability (transition rate) as observed in the data.
逻辑。实验!如果设置为TRUE,计数时,每一个过渡转换不考虑1,但其概率(转换率)中观察到的数据。
Details
详细信息----------Details----------
A transition in a sequence is a state change between time/position t and t+1. For example, the sequence "A-A-A-A-B-B-A-D-D-D" contains 3 transitions. The maximum number of transitions a sequence can contain is l-1 where l is the length of the sequence. The number of transitions is obtained by subtracting 1 to the length of the the
在一个序列中的一个过渡时间/位置t和t+1之间的状态变化。例如,序列"A-A-A-A-B-B-A-D-D-D"包含3转换。序列可以包含的最大数量的转换是l-1其中l是序列的长度。通过以下方式获得转换的数量减去1的长度的的
值----------Value----------
a state sequence object containing the number of transitions
一个状态序列对象,它包含的转换次数
参考文献----------References----------
参见----------See Also----------
seqdss.
seqdss。
实例----------Examples----------
## Creating a sequence object from columns 13 to 24[#创建一个序列对象是从13至24列]
## in the 'actcal' example data set[#在“actcal”示例数据集]
data(actcal)
actcal.seq <- seqdef(actcal,13:24)
## Computing the number of transitions[#计算跃变的次数]
actcal.trans <- seqtransn(actcal.seq)
## Displaying the DSS for the first 10 sequences[#显示DSS的第10个序列]
actcal.trans[1:10]
## Example with with.missing argument[#示例with.missing参数的]
data(ex1)
ex1.seq <- seqdef(ex1, 1:13)
seqtransn(ex1.seq)
seqtransn(ex1.seq, with.missing=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|