| anova_test | R Documentation | 
This function carries out an hypothesis test in which the null hypothesis is that K samples are governed by the same underlying generative probability distribution against the alternative hypothesis that they are governed by different generative probability distributions.
anova_test(
  data,
  memberships,
  stats = list(stat_anova_f_ip),
  B = 1000L,
  M = NULL,
  alternative = "right_tail",
  combine_with = "tippett",
  type = "exact",
  seed = NULL,
  ...
)
| data | A numeric vector or a numeric matrix or a list specifying the
pooled data points. Alternatively, it can be a distance matrix stored as an
object of class  | 
| memberships | An integer vector specifying the original membership of each data point. | 
| stats | A list of functions produced by  | 
| B | The number of sampled permutations. Default is  | 
| M | The total number of possible permutations. Defaults to  | 
| alternative | A single string or a character vector specifying whether
the p-value is right-tailed, left-tailed or two-tailed. Choices are
 | 
| combine_with | A string specifying the combining function to be used to
compute the single test statistic value from the set of p-value estimates
obtained during the non-parametric combination testing procedure. For now,
choices are either  | 
| type | A string specifying which formula should be used to compute the
p-value. Choices are  | 
| seed | An integer specifying the seed of the random generator useful for
result reproducibility or method comparisons. Default is  | 
| ... | Extra parameters specific to some statistics. | 
A base::list with 4 components:
observed: the value of the (possible combined) test statistic(s) using
the original memberhips of data points;
pvalue: the permutation p-value;
null_distribution: the values of the (possible combined) test statistic(s)
using the permuted memberhips of data points;
permutations: the permutations that were effectively sampled to produce
the null distribution.
A user-specified function should have at least two arguments:
 the first argument should be either a list of the n pooled data points or
a dissimilarity matrix stored as a stats::dist object.
the second argument shoud be an integer vector specifying the (possibly permuted) membership of each data point.
See the stat_anova_f() function for an example.
out1 <- anova_test(
  data = dist(chickwts$weight),
  memberships = chickwts$feed,
  stats = list(stat_anova_f_ip)
)
out1$pvalue
out2 <- anova_test(
  data = chickwts$weight,
  memberships = chickwts$feed,
  stats = list(stat_anova_f)
)
out2$pvalue
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.