strEM: Structural EM function

Description Usage Arguments Examples

Description

This is the main function that performs the structural EM algorithm.

Usage

1
strEM(dat, T0, tol = 1e-07)

Arguments

dat

The data matrix.

T0

the tree of class phylo (together with edge lengths) used as the starting point

tol

absolute tolerance for convergence

Examples

 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)

pzwiernik/StructuralEM documentation built on May 26, 2019, 11:35 a.m.