Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the operating techniques of R language?

Shulou Source: shulou.com Published: 2022-05-31 14:02:47 10月01日 Update

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.

Tags: Test content population result saliency sample level technology language function meaning data normal distribution bilateral article knowledge article or selection precision Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux vpn Microsoft NVidia Redmi