simulateSites: Simulate data

Description Usage Arguments Value

View source: R/simulateSites.R

Description

Simulates data without an error model

Usage

1
2
3
simulateSites(tr, covariateTable, rateFormula, rateParams = NULL,
  piFormula = NULL, piParams = NULL, lineageTable = NULL,
  rateBounds = c(10^-4, 5))

Arguments

tr

tree

covariateTable

a data.frame where each column is a covariate and each row is a site (columns have covariate names)

rateFormula

a formula object specifying how covariates are combined to compute the rate

rateParams

a matrix of parameters where the columns correspond to the covariate label and the rows are the edgeGroup from the lineage table

piFormula

a formula object specifying how covariates are combined to compute the stationary distribution

piParams

a matrix of parameters where the columns correspond to the covariate label and the rows are each seperate alleles (note nAlleles = nrow(piParams)+1)

lineageTable

a data.frame with three columns, parent, child, and edgeGroup. Can be used to specify different rate parameters for different edges

rateBounds

two element numeric vector which gives upper and lower bounds for rate

Value

list with the simulated data and the number of alleles


ndukler/phyloGLM documentation built on Sept. 25, 2019, 9:17 p.m.