View source: R/summary-stats.R
pic_stat_dcdf | R Documentation |
Performs Kolmogorov-Smirnov test comparing distribution of contrasts with that of a normal distribution with mean 0 and variance equal to the square root of the mean of squared contrasts
pic_stat_dcdf(unit.tree)
unit.tree |
a |
This test statistics is used to evaluate whether the assumption of multivariate normailty
is appropriate. If the model which generated the data is the fitted model, we expect the
square root ofthe mean of squared contrasts to be equal to 1. The empirical estimate is used
rather than assume a variance of 1 to reduce the overlap between this test statistic and the
REML estimate of sigma2 (see pic_stat_msig
). The Kolmogorov-Smirnov (KS) test is a
non-parameteric test which computes the maximum distance D between two cumulative distribution functions.
Running the test multiple times on the same data will produce slightly different values due to the fact
that the null distribution is produced by randomly drawing from a normal distribution.
The KS-D statistic is included as a default test statistic
in the function calculate_pic_stat
.
The test statistic computed from a single unit.tree
can be visualized
with the function pic_stat_dcdf_plot
.
d.cdf
the D-statistic from a KS-test
calculate_pic_stat
, default_pic_stat
, ks.test
data(finch) phy <- finch$phy dat <- finch$data[,"wingL"] unit.tree <- make_unit_tree(phy, data=dat) ## KS-D statistic pic_stat_dcdf(unit.tree) ## Visualization pic_stat_dcdf_plot(unit.tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.