[Traminer-users] refseq in multichannel distance

Matthias Studer Matthias.Studer at unige.ch
Fri Mar 4 09:30:40 CET 2011


Dear Nicola Barban,

Actually, this feature is not available in TraMineR, but I have added it 
to our todo list 
(https://r-forge.r-project.org/tracker/?func=browse&group_id=743&atid=2974). 
Please feel free to comment it or add something else if you have other 
feature requests.

There is a workaround if your reference sequence is an index of a 
multichannel sequence, you can recover the distance by using the 
corresponding row in the distance matrix.

For instance, to compute the distance to the 5th individual:

  data(biofam)
## Building one channel per type of event left, children or married
bf<- as.matrix(biofam[, 10:25])
children<-  bf==4 | bf==5 | bf==6
married<- bf == 2 | bf== 3 | bf==6
left<- bf==1 | bf==3 | bf==5 | bf==6
## Building sequence objects
child.seq<- seqdef(children)
marr.seq<- seqdef(married)
left.seq<- seqdef(left)
## Using transition rates to compute substitution costs on each channel
mcdist<- seqdistmc(channels=list(child.seq, marr.seq, left.seq),
  	method="OM", sm =list("TRATE", "TRATE", "TRATE"))

distto5<- mcdist[5,]

Hope this helps,

Matthias Studer

Le 26.02.2011 09:34, Nicola Barban a écrit :
> Dear TraMineR users,
>
> I am using the multichannel distance and I wonder if one can compute MC distance to a reference sequence as in the seqdist function.
> Thanks,
>
> Nicola Barban
>
>
> --
> Nicola Barban
> DONDENA-Centre for Research on Social Dynamics
> Bocconi University
> via G. Röntgen n. 1
> 4th floor, Room A2-13
> 20136 Milan  (Italy)
> tel. +39.02.58362714
> fax +39.02.58362798
> email: nicola.barban at unibocconi.it
> http://sites.google.com/site/nicolabarban/
>
> _______________________________________________
> 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