Determine best model for ancestral state reconstruction
Source:R/find_best_asr_model.R
find_best_asr_model.Rd
Function to find best model for ancestral state reconstruction using corHMM.
Usage
find_best_asr_model(
df,
tr,
tip_name_variable,
trait,
node_states = "joint",
upper_bound = 1e+50,
lower_bound = 1e-09
)
Arguments
- df
Dataframe with tip name (e.g., tip_name_variable) and phenotype/trait (e.g., trait) variables
- tr
Phylogeny object of class "phylo"
- tip_name_variable
Name of variable containing tip names in the dataframe (df). Tip name variable must correspond to tip names in the tree.
- trait
Name of phenotype/trait variable in the dataframe (df).
- node_states
Perform "joint" or "marginal" reconstruction. Default: joint
- upper_bound
Upper bound for likelihood search. Default: 1e50
- lower_bound
Lower bound for likelihood search. Default: 1e-9