<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:FR-CH;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR-CH" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Jeremy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">You should also subset the dissimilarity matrix seq.om, and since the maximum distance in seq.om[clust1,clust1] is less than the maximum in the
 whole matrix you have to give explicitly the maximum distance. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">With:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">seqrplot(mvad.seq[clust1,], dist.matrix = seq.om[clust1,clust1], dmax=max(seq.om), border = NA)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">you get the same solution for the first cluster.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Gilbert<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> traminer-users-bounces@lists.r-forge.r-project.org [mailto:traminer-users-bounces@lists.r-forge.r-project.org]
<b>On Behalf Of </b>Jeremy Reynolds<br>
<b>Sent:</b> Monday, November 18, 2013 17:44<br>
<b>To:</b> traminer-users@lists.r-forge.r-project.org<br>
<b>Subject:</b> Re: [Traminer-users] Traminer-users Digest, Vol 35, Issue 2<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear Alexis and Chris,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thank you very much for your help with the special seqrplot plot.  I have an additional question that you or someone else on the list can probably answer easily.<br>
<br>
In experimenting with seqrplot, I have found that when I request plots for each cluster in a cluster solution I get a different result than when I try to get a single plot using only the data from one cluster.  I have included an example below.  Shouldn't these
 be the same? Am I doing something wrong when selecting the cases to use in the second sqrplot command?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thanks,<br>
<br>
Jeremy<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">P.S. Has anyone identified a color scheme for sequence index plots that works well when the plot has to be black & white or grey scale?<br>
<br>
############<o:p></o:p></p>
</div>
<p class="MsoNormal"># My example code<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">############<br>
data(mvad)<br>
mvad.labels <- c("employment", "further education", "higher education", "joblessness", "school", "training")<br>
mvad.scode <- c("EM", "FE", "HE", "JL", "SC", "TR")<br>
mvad.seq <- seqdef(mvad, 17:86, states = mvad.scode, labels = mvad.labels, xtstep = 6)<br>
ccost <- seqsubm(mvad.seq, method = "CONSTANT", cval = 2)<br>
<a href="http://seq.om">seq.om</a> <- seqdist(mvad.seq, method = "OM", sm = ccost)<br>
clusterward <- agnes(<a href="http://seq.om">seq.om</a>, diss = TRUE, method = "ward")<br>
cluster3 <- cutree(clusterward, k = 3)<br>
cluster3 <- factor(cluster3, labels = c("Type 1", "Type 2", "Type 3"))<br>
table(cluster3)<br>
<br>
#representative sequences for each cluster<br>
seqrplot(mvad.seq, group = cluster3, dist.matrix = <a href="http://seq.om">seq.om</a>, border = NA)<br>
<br>
#representative sequences for a particular cluster (here cluster 1)<br>
#why are the results not the same as when done by group in the previous seqrplot?   (# of sequences and coverage do not match output from above)<br>
clust1 <- which(cluster3=="Type 1")<br>
seqrplot(mvad.seq[clust1,], dist.matrix = <a href="http://seq.om">seq.om</a>, border = NA)<br>
<br>
<br>
############<br>
# The output<br>
############<br>
> #representative sequences for each cluster<br>
  > seqrplot(mvad.seq, group = cluster3, dist.matrix = <a href="http://seq.om">seq.om</a>, border = NA)<br>
[>] number of objects (sum of weights): 295<br>
[>] max. distance: 140<br>
[>] neighborhood radius: 14<br>
[>] 1 representative(s) selected, coverage=32% (threshold=25%)<br>
[>] 186 distinct sequence(s)<br>
[>] number of objects (sum of weights): 164<br>
[>] max. distance: 140<br>
[>] neighborhood radius: 14<br>
[>] 2 representative(s) selected, coverage=39% (threshold=25%)<br>
[>] 98 distinct sequence(s)<br>
[>] number of objects (sum of weights): 253<br>
[>] max. distance: 140<br>
[>] neighborhood radius: 14<br>
[>] 3 representative(s) selected, coverage=30% (threshold=25%)<br>
[>] 206 distinct sequence(s)<br>
> #representative sequences for a particular cluster (here cluster 1)<br>
  > #why are the results not the same as when done by group in the previous seqrplot?  (# of sequences and coverage do not match output from above)<br>
  > clust1 <- which(cluster3=="Type 1")<br>
> seqrplot(mvad.seq[clust1,], dist.matrix = <a href="http://seq.om">seq.om</a>, border = NA)<br>
[>] number of objects (sum of weights): 295<br>
[>] max. distance: 140<br>
[>] neighborhood radius: 14<br>
[>] 3 representative(s) selected, coverage=27% (threshold=25%)<br>
[>] 186 distinct sequence(s)<br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-line-height-alt:11.25pt"><br>
<br>
<span style="font-size:10.0pt;font-family:"Lucida Console";background:#E1E2E5"><o:p></o:p></span></p>
<pre><span style="font-family:"Lucida Console";background:#E1E2E5"><o:p> </o:p></span></pre>
<pre><span style="font-family:"Lucida Console";background:#E1E2E5"><o:p> </o:p></span></pre>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Today's Topics:<br>
<br>
   1. Plot of Representative Sequences (Jeremy Reynolds)<br>
   2. Re: Plot of Representative Sequences (Chris Cameron)<br>
   3. Re: Plot of Representative Sequences (Alexis Gabadinho)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 14 Nov 2013 16:15:49 -0500<br>
From: Jeremy Reynolds <<a href="mailto:jeremyr@uga.edu" target="_blank">jeremyr@uga.edu</a>><br>
To: <a href="mailto:traminer-users@lists.r-forge.r-project.org" target="_blank">traminer-users@lists.r-forge.r-project.org</a><br>
Subject: [Traminer-users] Plot of Representative Sequences<br>
Message-ID:<br>
        <CABicVB9xs7V33HQ=<a href="mailto:vFYYKjOxULd5fzZjgFBOZOeTmqkVYragQQ@mail.gmail.com" target="_blank">vFYYKjOxULd5fzZjgFBOZOeTmqkVYragQQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Dear TraMineR Users,<br>
<br>
Does anyone know how Gabadinho and Ritschard produced figure 5 of their<br>
paper (see link below)? For each group, it has one plot showing three<br>
different sequences: the sequence that is most frequent, the sequence with<br>
the highest neighborhood density, and the sequence that is most central.<br>
<br>
I can do a plot with one of the three sequences for each group, but I'm not<br>
sure how to combine the three into a single plot.<br>
<br>
Thanks,<br>
<br>
Jeremy<br>
<br>
Gabadinho A, Ritschard G (2013). "Searching for typical life trajectories<br>
applied to child birth histories", In R L?vy, E. Widmer (eds.), *Gendered<br>
Life Courses*, pp. 287-312. Vienna: LIT.<br>
<br>
<a href="http://mephisto.unige.ch/pub/publications/gr/GabadhinoRitschard-TypicalTrajectories2013.pdf" target="_blank">http://mephisto.unige.ch/pub/publications/gr/GabadhinoRitschard-TypicalTrajectories2013.pdf</a><br>
<br>
--<br>
********************<br>
Dr. Jeremy Reynolds<br>
Associate Professor<br>
Undergraduate Coordinator<br>
Department of Sociology<br>
116 Baldwin Hall<br>
University of Georgia<br>
Athens, GA 30602-1611<br>
Phone: <a href="tel:%28706%29%20583-8072" target="_blank">(706) 583-8072</a><br>
Web: <a href="http://uga.edu/soc/people/faculty/reynolds_jeremy.php" target="_blank">
http://uga.edu/soc/people/faculty/reynolds_jeremy.php</a><br>
Fax: <a href="tel:%28706%29%20542-4320" target="_blank">(706) 542-4320</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20131114/8906d0a6/attachment-0001.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20131114/8906d0a6/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 14 Nov 2013 16:35:43 -0500<br>
From: Chris Cameron <<a href="mailto:cjc73@cornell.edu" target="_blank">cjc73@cornell.edu</a>><br>
To: Users questions <<a href="mailto:traminer-users@r-forge.wu-wien.ac.at" target="_blank">traminer-users@r-forge.wu-wien.ac.at</a>><br>
Subject: Re: [Traminer-users] Plot of Representative Sequences<br>
Message-ID: <<a href="mailto:0996DFC3-86BB-4629-8F7C-9EC42255217A@cornell.edu" target="_blank">0996DFC3-86BB-4629-8F7C-9EC42255217A@cornell.edu</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Jeremy<br>
<br>
I think you would create a new input sequences set with only the desired sequences and then use seqiplot.<br>
You can also just plot particular values using indexing. Does this work for your case?<br>
<br>
seqiplot(morn.dss[c(1,6,10),])<br>
<br>
Chris Cameron<br>
PhD Candidate<br>
Dept of Sociology<br>
Cornell University<br>
<br>
<br>
On Nov 14, 2013, at 4:15 PM, Jeremy Reynolds <<a href="mailto:jeremyr@uga.edu" target="_blank">jeremyr@uga.edu</a>> wrote:<br>
<br>
> Dear TraMineR Users,<br>
><br>
> Does anyone know how Gabadinho and Ritschard produced figure 5 of their paper (see link below)? For each group, it has one plot showing three different sequences: the sequence that is most frequent, the sequence with the highest neighborhood density, and
 the sequence that is most central.<br>
><br>
> I can do a plot with one of the three sequences for each group, but I'm not sure how to combine the three into a single plot.<br>
><br>
> Thanks,<br>
><br>
> Jeremy<br>
><br>
> Gabadinho A, Ritschard G (2013). "Searching for typical life trajectories applied to child birth histories", In R L?vy, E. Widmer (eds.), Gendered Life Courses, pp. 287-312. Vienna: LIT.<br>
><br>
> <a href="http://mephisto.unige.ch/pub/publications/gr/GabadhinoRitschard-TypicalTrajectories2013.pdf" target="_blank">
http://mephisto.unige.ch/pub/publications/gr/GabadhinoRitschard-TypicalTrajectories2013.pdf</a><br>
><br>
><br>
> --<br>
> ********************<br>
> Dr. Jeremy Reynolds<br>
> Associate Professor<br>
> Undergraduate Coordinator<br>
> Department of Sociology<br>
> 116 Baldwin Hall<br>
> University of Georgia<br>
> Athens, GA 30602-1611<br>
> Phone: <a href="tel:%28706%29%20583-8072" target="_blank">(706) 583-8072</a><br>
> Web: <a href="http://uga.edu/soc/people/faculty/reynolds_jeremy.php" target="_blank">
http://uga.edu/soc/people/faculty/reynolds_jeremy.php</a><br>
> Fax: <a href="tel:%28706%29%20542-4320" target="_blank">(706) 542-4320</a><br>
> _______________________________________________<br>
> Traminer-users mailing list<br>
> <a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20131114/b2122592/attachment-0001.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20131114/b2122592/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 15 Nov 2013 11:04:45 +0100<br>
From: Alexis Gabadinho <<a href="mailto:alexis.gabadinho@unige.ch" target="_blank">alexis.gabadinho@unige.ch</a>><br>
To: <<a href="mailto:traminer-users@lists.r-forge.r-project.org" target="_blank">traminer-users@lists.r-forge.r-project.org</a>><br>
Subject: Re: [Traminer-users] Plot of Representative Sequences<br>
Message-ID: <<a href="mailto:5285F1BD.5090905@unige.ch" target="_blank">5285F1BD.5090905@unige.ch</a>><br>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br>
<br>
Dear Jeremry,<br>
<br>
The plot is created by using the seqrep function with all three<br>
criteria, then retrieving the index of the representatives and using<br>
them to select the sequences to plot in the whole set with the tlim<br>
argument.<br>
<br>
Here is a code example, where<br>
- "seq.object" is the sequence object,<br>
- "dist" is  the pairwise distance matrix<br>
- "max.dist" is the maximum theoretical distance between two sequences<br>
(it is provided because it is not sure wether the maximum observed<br>
distance equal the theoretical maximum)<br>
<br>
## Sequences representatives<br>
medoid <- seqrep(seq.object, criterion="dist", nrep=1, dist.matrix=dist,<br>
dmax=max.dist)<br>
freq <- seqrep(seq.object, criterion="freq", nrep=1, dist.matrix=dist,<br>
dmax=max.dist)<br>
density <- seqrep(seq.object, criterion="density", nrep=1,<br>
dist.matrix=dist, dmax=max.dist)<br>
<br>
rep.idx <- c(attr(freq,"Index")[1], attr(density,"Index")[1],<br>
     attr(medoid,"Index")[1])<br>
seqiplot(seq.object, tlim=rep.idx, withlegend=FALSE, title="Title",<br>
border=NA)<br>
<br>
Best regards,<br>
Alexis<br>
<br>
<br>
Le 14. 11. 13 22:15, Jeremy Reynolds a ?crit :<br>
> Dear TraMineR Users,<br>
><br>
> Does anyone know how Gabadinho and Ritschard produced figure 5 of<br>
> their paper (see link below)? For each group, it has one plot showing<br>
> three different sequences: the sequence that is most frequent, the<br>
> sequence with the highest neighborhood density, and the sequence that<br>
> is most central.<br>
><br>
> I can do a plot with one of the three sequences for each group, but<br>
> I'm not sure how to combine the three into a single plot.<br>
><br>
> Thanks,<br>
><br>
> Jeremy<br>
><br>
> Gabadinho A, Ritschard G (2013). "Searching for typical life<br>
> trajectories applied to child birth histories", In R L?vy, E. Widmer<br>
> (eds.),/Gendered Life Courses/, pp. 287-312. Vienna: LIT.<br>
><br>
> <a href="http://mephisto.unige.ch/pub/publications/gr/GabadhinoRitschard-TypicalTrajectories2013.pdf" target="_blank">
http://mephisto.unige.ch/pub/publications/gr/GabadhinoRitschard-TypicalTrajectories2013.pdf</a><br>
><br>
><br>
> --<br>
> ********************<br>
> Dr. Jeremy Reynolds<br>
> Associate Professor<br>
> Undergraduate Coordinator<br>
> Department of Sociology<br>
> 116 Baldwin Hall<br>
> University of Georgia<br>
> Athens, GA 30602-1611<br>
> Phone: <a href="tel:%28706%29%20583-8072" target="_blank">(706) 583-8072</a><br>
> Web: <a href="http://uga.edu/soc/people/faculty/reynolds_jeremy.php" target="_blank">
http://uga.edu/soc/people/faculty/reynolds_jeremy.php</a><br>
> Fax: <a href="tel:%28706%29%20542-4320" target="_blank">(706) 542-4320</a><br>
><br>
><br>
> _______________________________________________<br>
> Traminer-users mailing list<br>
> <a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20131115/cd9d3890/attachment-0001.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20131115/cd9d3890/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Traminer-users mailing list<br>
<a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><br>
<br>
End of Traminer-users Digest, Vol 35, Issue 2<br>
*********************************************<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<p class="MsoNormal">********************<br>
Dr. Jeremy Reynolds<br>
Associate Professor<br>
Undergraduate Coordinator<br>
Department of Sociology<br>
116 Baldwin Hall<br>
University of Georgia<br>
Athens, GA 30602-1611<br>
Phone: <a href="tel:%28706%29%20583-8072" target="_blank">(706) 583-8072</a><br>
Web: <a href="http://uga.edu/soc/people/faculty/reynolds_jeremy.php" target="_blank">
http://uga.edu/soc/people/faculty/reynolds_jeremy.php</a><br>
Fax: <a href="tel:%28706%29%20542-4320" target="_blank">(706) 542-4320</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>