View source: R/plotting-fxns.R
pic_stat_sasr_plot | R Documentation |
Plot the contrasts derived from a rescaled 'unit.tree' against their inferred ancestral state.
pic_stat_sasr_plot( x, xlab = "Ancestral state", ylab = "Contrast", las = 1, col = NA, pch = 19, cex = 1, lwd = 2, ... )
x |
a |
xlab |
x-axis label. Defaults to "Ancestral state". |
ylab |
y-axis label. Defaults to "Contrast". |
las |
plot parameter (see |
col |
plot colours. The first colour is the colour of the points, the second, the colour of the regression line. If no argument, uses default colours. |
pch |
plot parameter (see |
cex |
plot parameter (see |
lwd |
plot parameter (see |
... |
additional arguments to be passed to |
This function generates a plot of the observed contrasts versus their
inferred ancestral state (see pic
, ace
).
Note that the ancestral states are estimated using the 'pic' method, which
differs somewhat from the ML estimate of the ancestral states.
The slope of this plot is equal to
the test statistic pic_stat_sasr
and is used as a default test statistic in
calculate_pic_stat
.
If the model is a good fit to the data (i.e. an adequate model), the slope ~ 0. The purpose of the plot is to get a quick visual glance at the data and to assess whether or not the model inadequacy may be driven by outliers.
The function can currently only take a single unit.tree (does not integrate across multiple trees).
make_unit_tree
, calculate_pic_stat
,
pic_stat_sasr
## finch data data(finch) phy <- finch$phy data <- finch$data[,"wingL"] u <- make_unit_tree(phy, data=data) pic_stat_sasr_plot(u)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.