<div dir="ltr"><div><div><div>Thanks Alexis,<br><br></div>I think I understand it now. What messed me up were the numbers in table 5 of the article by Elzinga (2010) <a href="http://smr.sagepub.com/content/38/3/463.full.pdf">http://smr.sagepub.com/content/38/3/463.full.pdf</a>. These still don't add up using the formula you described, but perhaps Elzinga switched the first two numbers the wrong way around.<br>
</div>Anyway thanks for the quick and clear response.<br><br></div><div>Best regards,<br><br><br></div>Niek<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 12:44 PM, Alexis Gabadinho <span dir="ltr"><<a href="mailto:alexis.gabadinho@unige.ch" target="_blank">alexis.gabadinho@unige.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>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(!<a href="http://is.na" target="_blank">is.na</a>(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 type="cite"><div><div class="h5">
      
      <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></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Traminer-users mailing list
<a href="mailto:Traminer-users@lists.r-forge.r-project.org" target="_blank">Traminer-users@lists.r-forge.r-project.org</a>
<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></pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Traminer-users mailing list<br>
<a href="mailto:Traminer-users@lists.r-forge.r-project.org">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></blockquote></div><br></div>