<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <link href="chrome://translator/skin/floatingPanel.css"
      type="text/css" rel="stylesheet">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear Juan Zuluaga,<br>
    <br>
    Sorry, for the delay. Ok, I didn't understood that your question was
    more theoretical. I do not have a good answer to your question. We
    did not have an in-depth look at these methods or others that allow
    to include directly a quantitative covariate. I haven't thought
    about it before but the Mantel test may be meaningful in this
    context. The main problem I would see is about how to interpret the
    results.<br>
    <br>
    All the best,<br>
    Matthias Studer<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    Le 05.11.2011 00:25, Zuluaga, Juan a &eacute;crit&nbsp;:
    <blockquote
cite="mid:4B236621C4E4E943B7BB21F73014CD941F66E5D8@SCSU83A.campus.stcloudstate.edu"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
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:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Say,
            would a Mantel (1967) test work? The quantitative covariate
            can be turned into a distance matrix. &nbsp;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
                Zuluaga, Juan
                <br>
                <b>Sent:</b> Monday, October 31, 2011 9:16 AM<br>
                <b>To:</b> Users questions<br>
                <b>Subject:</b> RE: [Traminer-users] quantitative
                explanatory variables?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Mr.
            Studer, thank you very much for the code, it makes sense.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">However,
            are you implying that this is an open question? &nbsp;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">The
            fact that you are seem to be satisfied with MJ Anderson
            approach for categorical explanatory variables and have
            implement it in dissassoc(), while you have no equivalent
            routine for quantitative, does is it mean that you are not
            satisfied with existing approaches for quantitative
            explanatory variables? &nbsp;May I ask you what have you
            considered (and perhaps rejected)?
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">-j<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
                <a class="moz-txt-link-abbreviated" href="mailto:traminer-users-bounces@r-forge.wu-wien.ac.at">traminer-users-bounces@r-forge.wu-wien.ac.at</a>
                [<a class="moz-txt-link-freetext" href="mailto:traminer-users-bounces@r-forge.wu-wien.ac.at">mailto:traminer-users-bounces@r-forge.wu-wien.ac.at</a>]
                <b>On Behalf Of </b>Matthias Studer<br>
                <b>Sent:</b> Monday, October 31, 2011 2:57 AM<br>
                <b>To:</b> Users questions<br>
                <b>Subject:</b> Re: [Traminer-users] quantitative
                explanatory variables?<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">Dear Juan Zuluaga,<br>
          <br>
          I agree with you. Our example dataset lacks an example with a
          quantitative covariate.
          <br>
          <br>
          There are two solutions to analyse the link with a
          quantitative covariate. The first one is to discretize the
          variable before using it (an example is given below). The
          second solution is to use the tree procedure. This procedure
          automatically finds the best cutting points by testing all
          possible binary splits.&nbsp; This will also work with ordinal
          covariates.<br>
          <br>
          An example of both solutions is given below using the biofam
          dataset (Swiss family life sequences between 15 and 30 years
          old).<br>
          <br>
          ## Loading TraMineR<br>
          library(TraMineR)<br>
          ## Loading the biofam dataset<br>
          data(biofam)<br>
          <br>
          ## States labels<br>
          bf.labels &lt;- c("Parent", "Left", "Married",
          "Left/Married",&nbsp; "Child", <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Left/Child", "Left/Married/Child",
          "Divorced")<br>
          ## States short labels for the sequences<br>
          bf.shortlab &lt;- c("P","L","M","LM","C","LC", "LMC", "D")<br>
          ## Building the sequence object<br>
          biofam.seq &lt;- seqdef(biofam[,10:25], states=bf.shortlab,
          labels=bf.labels)<br>
          ## Computing distance using Optimal matching with transition
          based substitution costs.<br>
          biodist &lt;- seqdist(biofam.seq, method="OM", sm="TRATE",
          indel=1)<br>
          <br>
          ## First solution : Use a discretized variable<br>
          ## The "cut" function creates a factor using the given cutting
          points<br>
          biofam$cohort &lt;- cut(biofam$birthyr, c(1900, 1930, 1940,
          1950, 1960), right=FALSE,
          <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; labels=c("1900-1929", "1930-1939",
          "1940-1949", "1950-1959"))<br>
          ## Compute the association with this new variable<br>
          da &lt;- dissassoc(biodist, biofam$cohort, R=1000)<br>
          ## Printing results<br>
          ## Differences are highly significant <br>
          print(da)<br>
          <br>
          <br>
          ## Second solution : Use the tree procedure<br>
          ## It will automatically find the best binary splits<br>
          biotree &lt;- seqtree(biofam.seq~birthyr, data=biofam,
          diss=biodist)<br>
          <br>
          ##Printing the tree<br>
          print(biotree)<br>
          ## Displaying the tree (adjusting legend fontsize otherwise
          it's too big)<br>
          ## You will need to install GraphViz for this<br>
          seqtreedisplay(biotree, type="d", legend.fontsize=2)<br>
          <br>
          <br>
          ## Creating a new cohort covariate according to the splitting
          points found with the tree procedure<br>
          biofam$cohort2 &lt;- cut(biofam$birthyr, c(1900, 1929, 1941,
          1947, 1951, 1970), right=FALSE,
          <br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; labels=c("&lt;=1928", "1929-1940",
          "1941-1946", "1947-1950", "1951+"))<br>
          <br>
          ## Computing association with this new variable<br>
          da2 &lt;- dissassoc(biodist, biofam$cohort2, R=1000)<br>
          ## Printing results<br>
          ## Pseudo R2 is slightly higher than before<br>
          print(da2)<br>
          <br>
          Hope this helps.<br>
          <br>
          Matthias Studer<br>
          <br>
          <br>
          <br>
          Le 30.10.2011 02:04, Zuluaga, Juan a &eacute;crit&nbsp;: <o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hello
            Traminer people,
          </span><o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I
            read your Sociological Methods and Research paper. &nbsp;The
            McVicar and Anyadike-Danes (2002) dataset that you used has
            categorical covariates.
          </span><o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">How
            do you deal with quantitative variates? &nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thank
            you!</span><o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">-juan
            zuluaga</span><o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
          <br>
          <o:p></o:p></p>
        <pre>_______________________________________________<o:p></o:p></pre>
        <pre>Traminer-users mailing list<o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a><o:p></o:p></pre>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Traminer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Traminer-users@lists.r-forge.r-project.org">Traminer-users@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users</a>
</pre>
    </blockquote>
    <div style="bottom: auto; left: 9px; right: auto; top: 0px; display:
      none;" class="translator-theme-default"
      id="translator-floating-panel">
      <div title="Cliquer pour traduire"
        id="translator-floating-panel-button"></div>
    </div>
  </body>
</html>