View source: R/SelectionStrength.R
get_pwt_rates_BEAST2 | R Documentation |
Produces a data frame containing the results of 1-sample t-tests for the mean of posterior clock rates against each node's absolute clock rate.
get_pwt_rates_BEAST2(rate_table, posterior)
rate_table |
A data frame containing a single "value" column (for all rate values) and one column for the "clock" variable (indicating to which clock partition each rate values refers to), such as from the output of |
posterior |
A data frame of posterior parameter estimates including a "clockrate" column indicating the base of the clock rate estimate for each generation that will be used for pairwise t-tests. Such data frame can be imported using |
get_pwt_rates_BEAST2()
first transforms relative clock rates to absolute rate values for each node and each clock, by multiplying these by the mean posterior clock rate base value. Then, for each node and clock, a one-sample t-test is performed with the null hypothesis that the mean of the posterior clockrates is equal to that node and clock's absolute clock rate.
A long data frame with one row per node per clock and the following columns:
clade |
The name of the clade, taken from the "clade" column of |
nodes |
The node number, taken from the "node" column of |
clock |
The clock partition number |
background.rate(mean) |
The absolute background clock rate (mean clock rate for the whole tree) sampled from the posterior log file |
relative.rate(mean) |
The relative mean clock rate per branch, taken from the "rates" columns of |
absolute.rate(mean) |
The absolute mean clock rate per branch; the relative clock rate multiplied by the mean of the posterior clock rates |
p.value |
The p-value of the test comparing the mean ofthe posterior clockrates to each absolute clockrate |
vignette("rates-selection")
for the use of this function as part of an analysis pipeline.
## Not run: # See vignette("rates-selection") for how to use this # function as part of an analysis pipeline # Load example rate table and posterior data sets RateTable_Means_Clades <- system.file("extdata", "RateTable_Means_Clades.csv", package = "EvoPhylo") RateTable_Means_Clades <- read.csv(RateTable_Means_Clades, header = TRUE) posterior <- system.file("extdata", "Penguins_log.log", package = "EvoPhylo") posterior <- read.table(posterior, header = TRUE) get_pwt_rates_BEAST2(RateTable_Means_Clades, posterior) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.