Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the operating techniques of R language?

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "what are the operating techniques of R language?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what are the operating techniques of R language" article.

1. W test (Shapiro-Wilk (Shapiro-Wicker) W statistics test)

Check whether the data conforms to the normal distribution, R function: shapiro.test ().

Result meaning: when the p value is less than a certain significant level α (for example, 0.05), it is considered to be

The sample does not come from the population of the normal distribution, otherwise it is recognized that the sample comes from the population of the normal distribution.

2. K test (Kolmogorov-Smirnov test of empirical distribution)

R function: ks.test (). If the value of P is very small, it rejects the original hypothesis and indicates that the data do not conform to the F (NMagne m) distribution.

3. Correlation test:

R function: cor.test ()

Cor.test (x, y)

Alternative = c ("two.sided", "less", "greater")

Method = c ("pearson", "kendall", "spearman")

Exact = NULL, conf.level = 0.95,...)

The meaning of the result: if the value of p is very small, the original hypothesis is rejected, and the original hypothesis is considered to be relevant. Otherwise, it is considered irrelevant.

4. T test

For normal population mean hypothesis test, single sample or double sample can be used.

T.test ()

T.test (x, y = NULL)

Alternative = c ("two.sided", "less", "greater")

Mu = 0, paired = FALSE, var.equal = FALSE

Conf.level = 0.95,...)

Results: when the P value was less than the significant level, the original hypothesis was rejected, otherwise, the original hypothesis was accepted. The specific hypothesis depends on whether you choose a bilateral hypothesis or a unilateral hypothesis (less than or greater than).

5. Normal population variance test

T.test (x, y = NULL)

Alternative = c ("two.sided", "less", "greater")

Mu = 0, paired = FALSE, var.equal = FALSE

Conf.level = 0.95,...)

The meaning of the results: when the P value is less than the significant level, reject the original hypothesis, otherwise, accept the original hypothesis. The specific hypothesis depends on whether you choose a bilateral hypothesis or a unilateral hypothesis (less than or greater than).

6. General hypothesis test of binomial distribution

Binom.test (x, n, p = 0.5)

Alternative = c ("two.sided", "less", "greater")

Conf.level = 0.95)

Original hypothesis: pauper, p0, and so on.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report