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

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

[复制链接]
发表于 2012-10-1 11:37:50 | 显示全部楼层 |阅读模式
seqecreate(TraMineR)
seqecreate()所属R语言包:TraMineR

                                        Create event sequence objects.
                                         创建事件序列对象。

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

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

Create an event sequence object either from time stamped events or from a state sequence object.
无论是从时间标记的事件或状态序列对象创建一个事件序列对象。


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


seqecreate(data = NULL, id = NULL, timestamp = NULL, event = NULL,
    endEvent = NULL, tevent =  "transition", use.labels=TRUE,
    weighted=TRUE)




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

参数:data
A state sequence object (see seqdef) or a data frame  
(见seqdef)或数据框的状态序列对象


参数:id
The sequence 'id' (integer) column when data are provided in TSE format (ignored if data argument is provided).
序列ID(整数)列数据时,在的TSE格式(如果data参数会被忽略)。


参数:timestamp
The event 'timestamp' (double) column when data are provided in TSE format, i.e., the time at which events occur (ignored if data argument is provided).
本次活动的时间戳(双)列数据时提供TSE格式,即事件发生时的时间(如果data参数会被忽略)。


参数:event
The 'event' column when data are provided in TSE format, i.e., the events occurring at the specified time stamps  (ignored if data argument is provided).
“事件”列数据时提供TSE格式,即事件发生在指定的时间邮票(忽略,如果data参数提供)。


参数:endEvent
If specified this event serves as a flag for the end of observation time (total length of event sequences).
如果指定此事件作为观察时间结束(总长度的事件序列)的一个标志。


参数:tevent
Either a transition matrix or a method to generate events from state sequences (see seqetm). Used only when data is a state sequence object.
无论是的过渡矩阵或方法产生的状态序列中的事件(见seqetm“)。仅可用于data是一个状态序列对象。


参数:use.labels
If TRUE, transitions names are built from long state labels rather than from the short state names of the alphabet.
如果TRUE,名是内置的术语状态的标签,而不是从短期的状态名称的字母转换。


参数:weighted
If TRUE and data is a state sequence object, use the weights specified in data (see seqdef)
如果TRUE和data是一个状态序列对象,使用指定的权重data(见seqdef)


Details

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

There are several ways to create an event sequence object. The first one is by providing the events in TSE format (see seqformat), i.e. by providing three paired lists: id, timestamp and event, such that each triplet (id, timestamp, event) defines the event that occurs at time timestamp for case id. Several events at the same time for a same id are allowed. The lists can be provided with the arguments id, timestamp and event. An alternative is by providing a data frame as data argument in which case the function takes the required information from the "id", "timestamp" and "event" columns of that data frame.
有几种方法来创建一个事件序列对象。第一个是在TSE中的格式(见seqformat),即通过提供三个配对列表:通过提供的事件的id,时间戳和事件,使得每个三重峰(身份证,时间戳,事件)定义的事件发生在案例ID的时间的时间戳。对于同一个ID在同一时间几个事件都是允许的。这份名单可以提供的参数id,timestamp和event。另一种方法是通过提供data参数在这种情况下,该函数采用的“身份证”,“时间戳”和“事件”列的数据框所需要的信息从一个数据框作为。

The other way is to pass a state sequence object (as data argument) and to perform an automatic state-to-event conversion. The simplest way to make a conversion is by means of a predefined method (see seqetm), such as "transition" (one distinct event per possible transition), "state" (a new event for each entering in a new state) and "period" (a pair of events, one start-state event and one end-state event for each found transition).  For a more customized conversion, you can specify a transition matrix in the same way as in seqformat. Function seqetm can help you in creating your transition matrix.
另一种方法是通过一个状态序列对象(data参数),执行自动状态对事件的转换。最简单的方法,使转换是通过一个预定义的方法(见seqetm),如"transition"(每一个不同的事件可能的过渡),"state"(一个新的事件的每个进入一个新的状态)和"period"(对事件,一开始状态的事件和一个结束状态的事件为每个发现的过渡)。更加个性化的转换,你可以指定一个转换矩阵,以同样的方式在seqformat。函数seqetm可以帮助您创建您的转换矩阵。

Event sequence objects as created by seqecreate are required by most other 'seqe' methods, such as seqefsub or seqeapplysub for example.
事件序列对象创建的seqecreate的最seqe的方法,如seqefsub或seqeapplysub例如所要求的。


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

seqformat for converting between sequence formats, seqefsub for searching frequent subsequences, seqecmpgroup to search for discriminant subsequences, seqeapplysub for counting subsequence occurrences, seqelength for information about length (observation time) of event sequences, seqdef to create a state sequence object.
seqformat序列格式之间的转换,seqefsub搜索频繁子序列的,seqecmpgroup来判别子序列搜索,seqeapplysub计数序列发生,seqelength的信息,有关长度(观测时间)的事件序列,seqdef创建一个状态序列对象。


实例----------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)

## Loading data[#数据载入中]
data(actcal.tse)
## Creating sequences[#创建序列]
actcal.seqe <- seqecreate(id=actcal.tse$id, timestamp=actcal.tse$time,
        event=actcal.tse$event)
##printing sequences[#打印序列]
actcal.seqe[1:10]
## Using the data argument[#使用的数据参数]
actcal.seqe <- seqecreate(data=actcal.tse)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-2 07:55 , Processed in 0.044984 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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