[Traminer-users] Using transition rates as substitution costs

Alexis Gabadinho Alexis.Gabadinho at unige.ch
Tue Jan 11 16:15:42 CET 2011

Hi Antoine,

While the TRANSITION RATE between state A and B can be different than 
the transition rate between state B and A, the SUBSTITUTION COST sc(A,B) 
between the two states is computed so as to be symmetric using the formula:

sc(A,B)=sc(B,A)= 2 - p(A | B) - p( B | A)

where p(A | B) is the TRANSITION RATE between A and B and p(B | A)  is 
the TRANSITION RATE between B and A. Hence, the substitution costs are 
the same.

I hope this answers your question ?


Jacques-Antoine Gauthier a écrit :
> Dear TraMineR,
> I have a small question regrading the use of transitions rates as 
> substitution cost.
> In the TraMineR 1.4 user's guide, p. 70 you state that:"
> Notice that the matrix is not symmetrical. The transition rate between 
> states A and B is 0.005
> (0.5%), while the transition rate from B to A is 0.01 (1%). As claimed 
> above, the sum of the
> transition rates from one state to all other states (including the 
> transition rate between the state
> and itself) should equal 1. But we don’t trust anybody and we want to 
> check it. We therefore
> apply the rowSums() function, which returns the sum of the rows, to 
> the tr object containing the
> transition rates".
> Now, if I want to compute the distance between two sequences x = {AAA} 
> and y={BBB} using the transition rates cost matrix given in the 
> example in a regular OM analysis:
> - Does it mean that aligning x against y OR aligning y against x will 
> produce different distance? This should be the case given that the 
> cost for substituing A for B is different from that of substituing B 
> for A.
> - If it is the case the order of the sequences in the dataset may 
> influence the final distance matrice (e.g. if seq x comes before or 
> after seq y).
> - If it is not the case, how does TraMineR "choose" between 
> substCost(A,B) vs substCost(B,A) when it come to substitute A and B.
> - Of course, I may also confuse myself ...
> Many thanks in advance,
> Best regards,
> Jacques-Antoine

More information about the Traminer-users mailing list