I am using seqecreate
to specify an event sequence object using TraMineR
.
The dataset has 1271 rows and 4 columns, an id, timestamp (timed), and 2 event variables (one numeric and one string). Most of the data have only 1 event per id. I've done other analyses with these data in SAS without issues. When I run seqecreate
the procedure stops at id 425 with an error message:
> etv.ev <- seqecreate(id=etvev$id, timestamp=etvev$timed, event=etvev$event2, use.labels=FALSE)
Warning message:
In seqecreate.internal(data = data, id = id, timestamp = timestamp, :
NAs introduced by coercion
The offending data in this part of the dataframe look ok (row 535 is the last before the error):
row id event2 timed event1
534 2144155702 xETV 0 1
535 2149998801 xETV 0 1
536 2150098301 xETV 0 1
537 2150098301 ETV2 27 2
538 2152463101 xETV 0 1
This error occurs with both event variables. I'd like to understand the problem and how to fix it.