View source: R/plotting-fxns.R
pic_stat_dcdf_plot | R Documentation |
Plot the empirical cumulative distribution of the contrats derived from a rescaled 'unit.tree' against the ecdf of a normal distribution with mean 0 and sd of the observed contrasts.
pic_stat_dcdf_plot( x, xlab = "Sample quantiles", ylab = expression(hat(F)[n](x)), col = NA, las = 1, lwd = 2, legend = TRUE, legend.obs = "Contrasts", legend.norm = "Normal", cex = 1, ... )
x |
a |
xlab |
x-axis label. Defaults to "Sample quantiles". |
ylab |
y-axis label. Defaults to "expression(hat(F)[n](x))". |
col |
plot colours. The first colour is the colour of the cdf of the contrats and the second is that of the normal distribution. If no argument, uses default colours. |
las |
plot parameter (see |
lwd |
plot parameter (see |
legend |
logical, whether legend should be plotted. |
legend.obs |
legend label for distribution of contrasts. Defaults to "Contrats" |
legend.norm |
legend label for normal distribution. Defaults to "Normal" |
cex |
plot parameter for legend (see |
... |
additional arguments to be passed to |
This function plots the empirical cumulative distribution function of the contrasts computed on the unit tree against that of a normal distribution. The empirical sd of the contrasts is used rather than the expected (i.e., 1) to distinguish non-normailty vs. inflated/deflated variance.
The D-statistics from the KS test (used in pic_stat_dcdf
) is
the maximum distance between the two curves. This is a default test
test statistic in calculate_pic_stat
.
If the model is adequate, the two curves should line up.
The function can currently only take a single unit.tree (does not integrate across unit.trees)
make_unit_tree
, calculate_pic_stat
,
pic_stat_dcdf
## finch data data(finch) phy <- finch$phy data <- finch$data[,1] u <- make_unit_tree(phy, data=data) pic_stat_dcdf_plot(u)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.