output.tree {BPEC} | R Documentation |
Posterior output for the tree model.
output.tree(bpecout) ## S3 method for class 'bpec' output.tree(bpecout)
bpecout |
R object from |
clado |
The MAP adjacency matrix for the tree in vectorised format: this means that for two haplotypes i,j, the (i,j)th entry of the matrix is 1 if the haplotypes are connected in the network and 0 otherwise. |
levels |
Starting from the root (level 0) all the way to the tips, the discrete depth for the Maximum A Posteriori tree plot. |
edgeTotalProb |
Posterior probabilities of each edge being present, i.e. corresponding to a mutation which occurred. |
rootProbs |
The posterior probability per chain that each haplotype was the root of the tree. |
treeEdges |
The set of edges (from and to haplotypes) of the Maximum A Posteriori haplotype tree (could be used in another program if needed). |
rootLocProbs |
Vector of posterior probabilities of each sampling location being the ancestral location. |
migProbs |
The posterior probability of 0...maxMig migrations. |
Ioanna Manolopoulou & Axel Hille
## if you want to load the `mini' example Brown Frog dataset data(MacrocnemisRawSeqs) data(MacrocnemisCoordsLocsMini) rawSeqs <- MacrocnemisRawSeqs coordsLocs <- MacrocnemisCoordsLocsMini dims <- 3 #this is 2 if you only have geographical longitude/latitude. #(add 1 for each environmental or phenotypic covariate) maxMig <- 2 #you will need a higher maximum number of migrations, suggest 7 ds <- 0 #start with ds=0 and increase to 1 and then to 2 iter <- 1000 #you will need far more iterations for convergence, start with 100,000 postSamples <- 100 #you will need at least 100 saved posterior samples #run the Markov chain Monte Carlo sampler bpecout <- bpec.mcmc(rawSeqs,coordsLocs,maxMig,iter,ds,postSamples,dims) output.tree(bpecout)