phen.sim: Short one-phrase description.

View source: R/phen.sim.R

phen.simR Documentation

Short one-phrase description.

Description

The parameter n.subs controls the simulation of the phenotype by specifying the expected value of the number of phenotypic substitions to occur on the tree provided. The true number of phenotypic substitions is drawn from a Poisson distribution with parameter n.subs.

Usage

phen.sim(tree, n.subs = 15, grp.min = 0.2, n.subs.var = TRUE, seed = NULL)

Arguments

tree

An phylo object.

n.subs

An integer controlling the phenotypic substition rate (see details).

grp.min

An optional numeric value < 0.5 specifying the minimum accepted proportion of terminal nodes to be in the minor phenotypic group. It may be useful to specify a grp.min of, for example, 0.2 (the default) to prevent excessive imbalance in the phenotypic group sizes. However, it is important to note that (at least for the time being) grp.min values closer to 0.5 are likely to cause the computational time of phen.sim to increase substantially, as the function will run until acceptable group sizes are randomly generated.

seed

An optional integer used to set the seed and control the pseudo-random process used in phen.sim, enabling the repeatable regeneration of identical output.

Details

Longer proper discription of function...

Author(s)

Caitlin Collins caitiecollins@gmail.com

Examples


## basic use of fn
tree <- coalescent.tree.sim(n.ind = 100, seed = 1)

## plot output
plot(tree)


caitiecollins/treeWAS documentation built on March 9, 2024, 3:15 p.m.