O'Reilly logo

Nonparametric Hypothesis Testing: Rank and Permutation Methods with Applications in R by Luigi Salmaso, Marco Marozzi, Livio Corain, Stefano Bonnini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix D R functions and codes

This appendix includes all R codes used throughout the book. It is worth noting that we used and fully recognize the validity and authorship of R codes existing in R packages and produced as complementary material for other books. Among those we refer to the following websites:

Packages

Package stats (version 2.15.3)

  • ansari.test(x, y, alternative = c("two.sided", "less", "greater"), exact = NULL, conf.int = FALSE, conf.level = 0.95,…)

    It performs the Ansari–Bradley two-sample test for a difference in scale parameters.

  • binom.test(x, n, p = 0.5, alternative = c("two.sided", "less", "greater"), conf.level = 0.95)

    It performs an exact test on the proportion/probability of success in a Bernoulli experiment.

  • chisq.test(x, y = NULL, correct = TRUE, p = rep(1/length(x), length(x)), rescale.p = FALSE,simulate.p.value = FALSE, B = 2000)

    It performs the chi-square goodness-of-fit tests for comparisons of proportions/ probabilities and for independence of categorical variables.

  • cor(x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman"))

    It computes the correlation of x and y if these are vectors. If x and y are matrices then the covariances (or correlations) between the columns of x and the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required