seqtab(TraMineR)
seqtab()所属R语言包:TraMineR
Frequency table of the sequences
频数分布表的序列
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the frequency table of the sequences (count and percent of each sequence).
计算的序列(每个序列的计数和百分比)的频数分布表。
用法----------Usage----------
seqtab(seqdata, tlim=1:10, weighted=TRUE, format="SPS")
参数----------Arguments----------
参数:seqdata
a sequence object as defined by the seqdef function.
一个序列对象的定义的seqdef功能。
参数:tlim
returns the table for the sequences at ranks 'tlim' in the list of distinct sequences sorted in decreasing order of their frequencies. Default is 1:10, i.e. the 10 most frequent sequences. Can be any subset, like 5:10 (fifth to tenth most frequent sequences) or c(2,10) (second and tenth most frequent sequences). Set tlim=0 to get the table for the whole set of distinct sequences.
返回表的顺序在队伍的tlim列表中的不同序列,其频率递减的顺序排序。默认是1:10,即10个最常见的序列。可以是任何的子集,如5:10(第五至第十位最常见的序列)或c(2,10)(第二和第十的最常见的序列)。设置tlim=0得到的一整套不同的序列表。
参数:weighted
if TRUE (default), frequencies account for the weights, if any, assigned to the state sequence object (see seqdef). Set to FALSE for ignoring weights.
如果TRUE(默认),频率占的权重分配,如果有的话,的状态序列对象(见seqdef的)。忽略的权重设置为FALSE。
参数:format
format used for displaying the rownames (the sequences) in the output table. Default is SPS format, which yields shorter and more readable sequence representations. Alternatively, "STS" may be specified.
所使用的格式显示在输出表中的行名(序列)。默认是SPS格式,这将产生更短,更可读的序列表示。另外,"STS"可能被指定。
Details
详细信息----------Details----------
The weighted argument has no effect when no weights were assigned to the state sequence object since weights default in that case to 1.
weighted参数时,没有权重被分配到的权重为1默认情况下,在这种情况下,状态序列对象,因为没有影响。
值----------Value----------
An object of class stslist.freq. This is actually a state sequence object (containing a list of state sequences) with added attributes, among others the freq attribute containing the frequency table. There are print and plot methods for such objects. More sophisticated plots can be produced with the seqplot function.
对象的类stslist.freq。其实,这是一个状态序列对象(包含列表中的状态序列),添加的属性,其中包括freq属性包含的频率表。有print和plot这些对象的方法。 seqplot功能就可以生产出更复杂的图。
参考文献----------References----------
参见----------See Also----------
seqplot, plot.stslist.freq.
seqplot, plot.stslist.freq。
实例----------Examples----------
## Creating a sequence object from the actcal data set[#创建一个序列对象从该actcal的数据集]
data(actcal)
actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
actcal.seq <- seqdef(actcal, 13:24, labels=actcal.lab)
## 10 most frequent sequences in the data[10个最常见的序列中的数据]
seqtab(actcal.seq)
## With tlim=0, we get all distinct sequences in the data set[#TLIM = 0,我们得到的所有不重复的序列数据集]
## sorted in decreasing order of their frequency[#,其频率递减的顺序排序]
seqtab(actcal.seq, tlim=0)
## Example with weights[#示例重量]
## from biofam data set using weigths[#biofam数据使用weigths]
data(ex1)
ex1.seq <- seqdef(ex1, 1:13, weights=ex1$weights)
## Unweighted frequencies[#未加权的频率]
seqtab(ex1.seq, weighted=FALSE)
## Weighted frequencies[#加权频率]
seqtab(ex1.seq, weighted=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|