[Traminer-users] The substitution cost matrix is not symmetric

Alexis Gabadinho Alexis.Gabadinho at unige.ch
Mon Apr 18 13:54:12 CEST 2011


Hi Alexandre,

Regarding your second question, you have indeed missing values in your 
data, since we can see in the output of seqdist that the length of your 
sequences vary from 1 to 12.

The way missing values (supposed to be NA's by default) are handled is 
set in seqdef with the arguments "gaps", "left" and "right". By 
default,  missing values found after the last valid state in a sequence 
are coded as void elements, meaning that your sequence is supposed to 
end with the last valid state. Thus if you have sequences of unequal 
length, ending with NA'S , this is the way your sequences are prepared. 
See user's guide for more information.

To locate missing values in your data you can do for example:

count.miss <- rowSums(is.na(contact[,2:15]))

This counts the number of missing values in each row of your original data.

To display the rows containing at least one missing value:

contact[count.miss>0, 2:15]

Best regards,
Alexis.

Alexandre Pollien a écrit :
> Hello,
>
> When I use seqsubm, now I get this message:
>
>>  contact.om<- 
> seqdist(contact.seq,method="OM",indel=2,sm=cout,with.missing=FALSE, 
> full.matrix=TRUE)
> [>] 5764 sequences with 9 distinct events/states
> [>] 496 distinct sequences
> [>] min/max sequence length: 1/12
> [>] computing distances using OM metric
> [>] total time: 1.25 secs
> Message d'avis :
> The substitution cost matrix is not symmetric.
>
> cout is computed with seqsubm (method="TRATE")
>
>
> A surprising aspect is that it is not systematic (3 / 4)
>
> I thought of a problem of missing value
>
>
> Another amazing prompt is that seqdef shows this message:
>>  contact.seq <- seqdef(contact, 2:15, states = contact.shortlab,labels 
> = contact.lab)
> [>] found missing values ('NA') in sequence data
>
> ...even when there is no missing in my data! (How can I seethe 
> sequence containing the missing data?)
>
>
> Does anyone have a idea?
>
> Thank you very much
>
> Best regards and good weekend
>
> Alexandre
>
>
>
> _______________________________________________
> Traminer-users mailing list
> Traminer-users at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
>   



More information about the Traminer-users mailing list