View source: R/asr_diagnostics.R
searchRateModels | R Documentation |
iteratively searches for simpler rate models that still provide a good fit to the observed data at the tips of the tree
searchRateModels(
treesObj,
phenvals,
pthreshold = 0.05,
lthreshold = 4,
max_iterations = 2000,
...
)
treesObj |
the trees object returned by readTrees |
phenvals |
the named phenotype vector with names matching the tip labels in the trees object |
pthreshold |
the more complex model is considered significantly better when the p value is less than pthrehsold |
lthreshold |
the more compelx model is considered significantly better when the likelihood ratio is greater than the lthreshold, used when the more complex and simpler models are not nested |
max_iterations |
stops the algorithm if the number of iterations exceeds max_iterations even if it isn't done in order to avoid extremely long runtimes |
... |
additional parameters ot pass to fit_mk, the castor function used to fit a transition matrix given a rate model, phylogenetic tree, and phenotype data |
returns a list of the rate models generated during the iterative search for simpler rate models and a table of statistics including the likelihood ratios computed on each iteration
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.