<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 12 (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:"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:11.0pt;
font-family:"Calibri","sans-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";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:947082263;
mso-list-type:hybrid;
mso-list-template-ids:-1942824910 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m doing a project with a set of criminal histories (ie. Lists of age-stamped offences). Here is an example: oftype is the type of crime, and sid is the subject ID:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5"> sid oftype age<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5">5556.1 5556 B&E 18<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5">5556.2 5556 motor vehicle 18<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5">5556.3 5556 motor vehicle 18<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5">5556.4 5556 B&E 22<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5">5556.5 5556 alcohol 24<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#E1E2E5">5556.6 5556 miscellaneous 29<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Since these are events, I’m using the event methods in TraMineR to analyse them. I’ve created a seqe object, and run a frequent sub-sequence analysis. Here is the top 10:<o:p></o:p></p>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5"> Subsequence Support Count<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">1 (assault) 0.6261261 417<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">2 (child molestation) 0.6246246 416<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">3 (rape) 0.5000000 333<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">4 (theft) 0.4429429 295<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">5 (B&E) 0.4159159 277<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">6 (noncontact SO) 0.3963964 264<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">7 (public order) 0.3858859 257<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">8 (alcohol) 0.3183183 212<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">9 (assault)-(assault) 0.3018018 201<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">10 (assault)-(rape) 0.2882883 192<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5"><o:p> </o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5">Computed on 666 event sequences<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5"> Constraint Value<o:p></o:p></span></pre>
<pre><span style="font-family:"Lucida Console";color:black;background:#E1E2E5"> countMethod COBJ<o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d like to compute clusters of sequences, either using agnes or pam algorithms, and then run a discriminating sequence analysis on the clusters (as demonstrated by Studer et al. 2010). However, I’m a bit stuck and I haven’t been able to
find any help in the documentation. I have a few questions:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Is there a function for computing dissimilarity measures, like seqdist, that works with event sequences? Something that I can feed into a clustering algorithm? I don’t know how Studer et al. did it because no code was provided.<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Is there a way to constrain frequent subsequences to be maximal, in the sense that if “(assault)-(assault)” is frequent then “(assault)” will not be listed, for example?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Is there a way to calculate association rules for sequences using a hazard ratio measure similar to that described in Muller et al. (2010)?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks in advance. Best wishes,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Mat<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Mat Weldon<o:p></o:p></p>
<p class="MsoNormal">Department of Mathematics and Statistics<o:p></o:p></p>
<p class="MsoNormal">Room B18, Fylde College <o:p></o:p></p>
<p class="MsoNormal">Lancaster University<o:p></o:p></p>
<p class="MsoNormal">Lancaster, LA1 4YF<o:p></o:p></p>
<p class="MsoNormal">Tel: 07929 310475<o:p></o:p></p>
<p class="MsoNormal">Email: m.weldon@lancaster.ac.uk<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>