# [Traminer-users] theoretical maximum distance / groupe de séquence représentatives

Gilbert Ritschard Gilbert.Ritschard at unige.ch
Thu May 24 15:39:00 CEST 2012

```You probably mean the theoretical maximum distance. This is just the
maximum possible value of the distance and is, indeed, dependent on the
selected distance.

In the JSS paper about TraMineR p 29, you find the analytical
definitions of this maximum for optimal matching and some other
distances. Using the appropriate formula, you can compute the maximum
for the distance you selected and then pass this value as  "dmax="
argument to seqrep or seqrplot. When dmax=NULL (default), seqrep (or
seqrplot) uses the maximal observed distance instead.

Gilbert

PS: Thank you for posting your messages in English so that they can be
understood by all members of the list.

On 23-May-12 14:21, so.bellit wrote:
>
> Bonjour;
>
>  L'algorithme de recherche permettant de retrouver un groupe de
> séqsuences reprsentative s'appuie sur une mesure de dissimilarité
> théorique entre deux séquences. Comment cette dissimilarité théorique
> est calculée? Pourriez vous m'orienter vers un article?
>
> Bien cordialement
> Sonia
>
>
>
>
>
>     > Message du 03/05/12 23:19
>     > De : "Jane K. Ohgami"
>     > A : traminer-users at lists.r-forge.r-project.org
>     > Copie à :
>     > Objet : Re: [Traminer-users] Traminer-users Digest, Vol 21, Issue 2
>     >
>     > I appreciate the prompt reply and have tried the command. I'm
>     now getting the following error message when I try to group by
>     cluster and am a little unclear as to its meaning:
>     >
>     > For example:
>     > seqrep.grp(org.seq, group = c9.org, mdis=dist, ...
>     >
>     > Error: length(grp) not equal to number of sequences
>     > >
>     >
>     > However, I am able to group by other variables such as sex,
>     > seqrep.grp(org.seq, group = org\$sex, mdis=dist, ...
>     >
>     > Any advice would be appreciated. Thank you again for the help.
>     >
>     > -----Original Message-----
>     > From: traminer-users-bounces at lists.r-forge.r-project.org on
>     behalf of traminer-users-request at lists.r-forge.r-project.org
>     > Sent: Thu 5/3/2012 6:00 AM
>     > To: traminer-users at lists.r-forge.r-project.org
>     > Subject: Traminer-users Digest, Vol 21, Issue 2
>     >
>     > Send Traminer-users mailing list submissions to
>     > traminer-users at lists.r-forge.r-project.org
>     >
>     > To subscribe or unsubscribe via the World Wide Web, visit
>     >
>     https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
>     >
>     > or, via email, send a message with subject or body 'help' to
>     > traminer-users-request at lists.r-forge.r-project.org
>     >
>     > You can reach the person managing the list at
>     > traminer-users-owner at lists.r-forge.r-project.org
>     >
>     > than "Re: Contents of Traminer-users digest..."
>     >
>     >
>     > Today's Topics:
>     >
>     > 1. seqrep() options (Jane K. Ohgami)
>     > 2. Re: seqrep() options (Gilbert Ritschard)
>     >
>     >
>     >
>     ----------------------------------------------------------------------
>     >
>     > Message: 1
>     > Date: Thu, 3 May 2012 00:42:02 -0400
>     > From: "Jane K. Ohgami"
>     > To:
>     > Subject: [Traminer-users] seqrep() options
>     > Message-ID:
>     >
>     > Content-Type: text/plain; charset="iso-8859-1"
>     >
>     > This is a very basic question but I was wondering if seqrep has
>     a group option to calculate results for clusters. For example,
>     something similar to seqrplot:
>     >
>     > seqrplot(mvad.seq, dist.matrix = dist.om1, group = cl1.4fac,...
>     >
>     > I would like to generate statistics of the representative set
>     for each cluster not the entire data set.
>     > Thank you for your help.
>     > -------------- next part --------------
>     > An HTML attachment was scrubbed...
>     > URL:
>     >
>     > ------------------------------
>     >
>     > Message: 2
>     > Date: Thu, 03 May 2012 08:42:57 +0200
>     > From: Gilbert Ritschard
>     > To: Users questions
>     > Subject: Re: [Traminer-users] seqrep() options
>     > Message-ID: <4FA228F1.6060006 at unige.ch>
>     > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>     >
>     > Currently, seqrep doesn't have a group argument. But you can use
>     the
>     > seqrep.grp function from the TraMineRextras package which is
>     available
>     > from R-forge (https://r-forge.r-project.org/R/?group_id=743).
>     >
>     > To install TraMineRextras, use the command
>     >
>     > **|install.packages("TraMineRextras",
>     > repos="http://R-Forge.R-project.org")|**
>     >
>     > Be aware, however, that R-forge provides binaries only for the most
>     >
>     > Cheer,
>     > Gilbert
>     >
>     > On 03-May-12 6:42, Jane K. Ohgami wrote:
>     > >
>     > > This is a very basic question but I was wondering if seqrep has a
>     > > group option to calculate results for clusters. For example,
>     something
>     > > similar to seqrplot:
>     > >
>     > > seqrplot(mvad.seq, dist.matrix = dist.om1, group = cl1.4fac,...
>     > >
>     > > I would like to generate statistics of the representative set
>     for each
>     > > cluster not the entire data set.
>     > > Thank you for your help.
>     > >
>     > >
>     > >
>     > > _______________________________________________
>     > > 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
>     >
>     >
>     >
>     > ------------------------------
>     >
>     > _______________________________________________
>     > 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
>     >
>     > End of Traminer-users Digest, Vol 21, Issue 2
>     > *********************************************
>     >
>     > >
>     > [ winmail.dat (6.3 Ko) ]
>     > [ (pas de nom de fichier) (0.2 Ko) ]
>
>
>
> _______________________________________________
> 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
```