simulate_2_state_tree: Tip state simulation for a 2 state model

Description Usage Arguments Value

View source: R/simulate_2_state_tree.R

Description

Creates a tree with tip states simulated from a 2 state model.

Usage

1
simulate_2_state_tree(101,atree,Q,pid2)

Arguments

seed

an integer

atree

a phylogenetic tree in the phytools format (a list). The tree contains the element, "mapnames", which must be added to the phylosim format. "mapnames" is a list of vectors. Each vector is composed of integers that are the names in phylosim's "maps" list. The "mapnames" list has a vector for each branch composed of the states visited along each branch (in order).

Q

a 2x2 rate matrix, the rows sum to zero

pid

a probability vector containing the prior probabilities that the root is in each state

Value

simulate_2_state_tree returns a tree in phylomap format with data at the tips simulated from a 2 state model.


vnminin/phylomap documentation built on May 3, 2019, 6:38 p.m.