Description Usage Arguments Examples
This is the main function that performs the structural EM algorithm.
1 | strEM(dat, T0, tol = 1e-07)
|
dat |
The data matrix. |
T0 |
the tree of class phylo (together with edge lengths) used as the starting point |
tol |
absolute tolerance for convergence |
1 2 3 4 5 6 7 8 9 10 11 | m <- 5 # number of leaves
N <- 30 # sample size
Ttr <- rtree(m,rooted=FALSE,br=rep(-log(.6),7))
Ttr$tip.label <- 1:m # label leaves by 1:m
Str <- get.corr0(Ttr)
Rtr <- Str[1:m,1:m]
dat <- mvrnorm(N, rep(0,m), Rtr)
D <- get.dist(cor(dat))
T0 <- fastme.bal(D)
T0$edge.length <- (T0$edge.length>0)*T0$edge.length
res <- strEM(dat,T0,tol=1e-6)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.