<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Niek,<br>
      <br>
      The variance is computed using the outcome of the seqdur function:
      <br>
      <br>
      <tt>s1 <- seqdef("A-A-B-B-C-C-A-A-A-A")</tt><tt><br>
      </tt><tt>x <- seqdur(s1)</tt><tt><br>
      </tt><tt>x</tt><tt><br>
      </tt><tt><br>
        n <- sum(!is.na(x))<br>
      </tt><tt>var <- 1/n * sum((x - mean(x, na.rm = TRUE))^2, na.rm
        = TRUE)</tt><tt><br>
      </tt><tt>var<br>
      </tt><br>
      Best regards,<br>
      Alexis<br>
      <br>
      Le 23/01/2014 12:23, Niek Frans a écrit :<br>
    </div>
    <blockquote
cite="mid:CA+LR1+Ht9DM6K9aqNz-Bt+h=0BW+Vhb445cASLWq_Eb9wh1mTQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hello everyone,<br>
                  <br>
                </div>
                This is probably a very simple question, but I've spend
                a couple of hours trying to find the answer without any
                luck, so I thought it try it here.<br>
                <br>
              </div>
              I'm trying to explain the Turbulence measure by Elzinga,
              but I'm stuck trying to compute the variance of the
              state-duration for the sequence. Could anyone explain how
              the variance of a sequence is calculated? I know it has
              something to do with the sequence length and the
              consecutive length of remaining in one state, but I can't
              find the exact formula anywhere.<br>
            </div>
            <br>
          </div>
          Kind regards,<br>
          <br>
          <br>
        </div>
        Niek<br>
      </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>
    <br>
  </body>
</html>