seqeweight(TraMineR)
seqeweight()所属R语言包:TraMineR
Setting or retrieving weights of an event sequence object.
设置或检索的事件序列对象的权重。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Event sequence objects can be weighted. Weights may be used by other functions such as seqefsub or seqecmpgroup to compute weighted statistics.
事件序列对象可以进行加权。权重可以使用其它功能,如seqefsub或seqecmpgroup计算加权统计。
用法----------Usage----------
seqeweight(s)
seqeweight(s) <- value
参数----------Arguments----------
参数:s
A list of event sequences
列表的事件序列
参数:value
Numerical vector containing weights
数值向量重量
值----------Value----------
seqeweight returns a numerical vector containing the weights associated to each event sequence.
seqeweight返回一个数值向量中的权重相关的每一个事件序列。
实例----------Examples----------
##Starting with states sequences[#从状态序列]
##Loading data[#数据载入中]
data(biofam)
## Creating state sequences[#创建状态序列]
biofam.seq <- seqdef(biofam,10:25,informat='STS')
## Creating event sequences from biofam[#创建事件序列biofam]
biofam.seqe <- seqecreate(biofam.seq, weighted=FALSE)
## Using the weights[#使用权重]
seqeweight(biofam.seqe) <- biofam$wp00tbgs
## Now seqefsub accoounts for weights unless weighted is set to FALSE[#现在seqefsub除非加权accoounts为权重设置为FALSE]
fsubseq <- seqefsub(biofam.seqe, pMinSupport=0.01)
## Searching for weighted susbsequences which best [#加权susbsequences最好的搜索]
## discriminate the birth cohort[#歧视的出生队列]
discr <- seqecmpgroup(fsubseq, group=biofam$birthyr>=1940)
plot(discr[1:15])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|