View source: R/compare.summStat.R
pvalue_arbutus | R Documentation |
Utility function for extracting p-values from the output
of compare_pic_stat
pvalue_arbutus(x)
x |
an |
a named vector of two-tailed p-values
compare_pic_stat
data(finch) phy <- finch$phy dat <- finch$data[,"wingL"] unit.tree <- make_unit_tree(phy, data=dat) ## calculate default test stats on observed data obs <- calculate_pic_stat(unit.tree, stats=NULL) ## simulate data on unit.tree sim.dat <- simulate_char_unit(unit.tree, nsim=10) ## calculate default test stats on simulated data sim <- calculate_pic_stat(sim.dat, stats=NULL) ## compare simulated to observed test statistics res <- compare_pic_stat(obs, sim) ## get p-values pvalue_arbutus(res) ## note these are returned by default with print.arbutus res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.