Using pdist()
in the PST package
, two probabilistic suffix trees (PSTs) can be compared to each other. The function will output a value for the degree of divergence between two fitted PSTs. However, how can this value be tested for statistical significance, to see whether it comes from a population where the value is greater than 0?
library(TraMineR)
library(PST)
a <- seqdef("A-A-A-B-B-C")
b <- seqdef("C-C-C-B-B-A")
a_pst <- pstree(a, ymin = 0.001, lik = FALSE, with.missing = FALSE)
b_pst <- pstree(b, ymin = 0.001, lik = FALSE, with.missing = FALSE)
pdist(a_pst, b_pst, l = 10, ns = 1000, symetric = TRUE, output = "mean")
Would it be sufficient to do:
output <- pdist(a_pst, b_pst, l = 10, ns = 1000, symetric = TRUE, output = "all")
t.test(output)
?