add_asr_node_states {DAISIEprep} | R Documentation |
Fits a model of ancestral state reconstruction of island presence
Description
Fits a model of ancestral state reconstruction of island presence
Usage
add_asr_node_states(
phylod,
asr_method,
tie_preference = "island",
earliest_col = FALSE,
rate_model = NULL
)
Arguments
phylod |
A |
asr_method |
A character string, either "parsimony" or "mk" determines
whether a maximum parsimony or continuous-time markov model reconstructs the
ancestral states at each node. See documentation in
|
tie_preference |
Character string, either "island" or "mainland" to
choose the most probable state at each node using the |
earliest_col |
A boolean to determine whether to take the colonisation time as the most probable time (FALSE) or the earliest possible colonisation time (TRUE), where the probability of a species being on the island is non-zero. Default is FALSE. |
rate_model |
Rate model to be used for fitting the transition rate matrix. Can be "ER" (all rates equal), "SYM" (transition rate i–>j is equal to transition rate j–>i), "ARD" (all rates can be different), "SUEDE" (only stepwise transitions i–>i+1 and i–>i-1 allowed, all 'up' transitions are equal, all 'down' transitions are equal) or "SRD" (only stepwise transitions i–>i+1 and i–>i-1 allowed, and each rate can be different). Can also be an index matrix that maps entries of the transition matrix to the corresponding independent rate parameter to be fitted. Diagonal entries should map to 0, since diagonal entries are not treated as independent rate parameters but are calculated from the remaining entries in the transition matrix. All other entries that map to 0 represent a transition rate of zero. The format of this index matrix is similar to the format used by the |
Details
The rate_model
argument documentation is inherited from
castor::asr_mk_model()
, therefore, the last sentence about the
transition_matrix
argument does not apply to add_asr_node_states()
.
Value
An object of phylo4d
class with tip and node data