[Traminer-users] Variance of a sequence

Niek Frans N.Frans at student.rug.nl
Thu Jan 23 13:42:49 CET 2014


Thanks Alexis,

I think I understand it now. What messed me up were the numbers in table 5
of the article by Elzinga (2010)
http://smr.sagepub.com/content/38/3/463.full.pdf. These still don't add up
using the formula you described, but perhaps Elzinga switched the first two
numbers the wrong way around.
Anyway thanks for the quick and clear response.

Best regards,


Niek


On Thu, Jan 23, 2014 at 12:44 PM, Alexis Gabadinho <
alexis.gabadinho at unige.ch> wrote:

>  Hi Niek,
>
> The variance is computed using the outcome of the seqdur function:
>
> s1 <- seqdef("A-A-B-B-C-C-A-A-A-A")
> x <- seqdur(s1)
> x
>
> n <- sum(!is.na(x))
> var <- 1/n * sum((x - mean(x, na.rm = TRUE))^2, na.rm = TRUE)
> var
>
> Best regards,
> Alexis
>
> Le 23/01/2014 12:23, Niek Frans a écrit :
>
>    Hello everyone,
>
>  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.
>
>  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.
>
>  Kind regards,
>
>
>  Niek
>
>
> _______________________________________________
> Traminer-users mailing listTraminer-users at lists.r-forge.r-project.orghttps://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
>
>
>
> _______________________________________________
> Traminer-users mailing list
> Traminer-users at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20140123/dd6c0925/attachment.html>


More information about the Traminer-users mailing list