Applied Nonparametric STATISTICS-LEC6

Source: Internet
Author: User

Ref:https://onlinecourses.science.psu.edu/stat464/print/book/export/html/8

In front of the one or two samples are examined, now consider the case of k samples, our hypothesis is:

    • Analysis of Variance (ANOVA)

Assumptions is:

    1. Groups is independent
    2. Distributions is normally distributed
    3. Groups have equal variances

Then our hypothesis is:

h0: Μ1=μ2= μ3
H1: atleast One not Equal

R uses the ANOVA function, which can be found in the previous code. (Calculates Simpson index in the Alpha Diversity index)

Simpsonbox = read.csv ("simpsonindex1.csv") Group = Factor (C (Rep (1,21), Rep (22,21), Rep (43,20)), labels = c ("A", "B", "C")) Simpsondata = data.frame (Simpsonindex = simpsonbox$x, group = group) # nonparametric test, check if variance is the same fligner.test (shannonindex ~ Group, DA Ta = shannondata) # Normal distribution data, check if variance is the same bartlett.test (simpsonindex ~ Group, data = simpsondata) # Anovasimpsonaov <-AoV (sim Psonindex ~ Group, data = simpsondata) Summary (SIMPSONAOV)

  

    • The non-parametric method is the Kruskal test

Kruskal.test

After the ANOVA analysis above, if we reject the original hypothesis and know that the mean values of several groups are different, what is the significance of the differences between the 22 groups?

Just like the TUKEYHSD (which requires a normal distribution of data ), we can also do

    • Bonferroni Adjustment

The Bonferroni adjustment simply divides the Type I error rate (. ") by the number of tests (in this case, three).

Pairwise.t.test (simpsondata$simpsonindex,simpsondata$group,p.adjust= "Bonferroni")

We can compare the difference between it and TUKEYHSD in the results:

In fact, the results are consistent, which shows that the difference between Group C and group A is significant. Bonferroni is generally considered more conservative. The functions we use can be referenced by:

Https://stat.ethz.ch/R-manual/R-devel/library/stats/html/pairwise.t.test.html

    • Holm Adjustment

This article points out that Holm adjustment is better than Bonferroni and also uses the Pairwise.t.test function.

Ref:http://rtutorialseries.blogspot.jp/2011/03/r-tutorial-series-anova-pairwise.html

    • The Fisher Least significant Difference (LSD) method essentially does not correct for the Type I error rate

For multiple comparisons and are generally not recommended relative to other options.

Library (Agricolae) lsd.test ()

Applied Nonparametric STATISTICS-LEC6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.