当前位置:网站首页>R descriptive statistics and hypothesis testing
R descriptive statistics and hypothesis testing
2022-07-07 04:50:00 【Mrrunsen】
Descriptive statistics and hypothesis testing , First, let's introduce the factors , Then it introduces how to calculate common descriptive statistics 、 skewness 、 kurtosis 、 Correlation coefficient and contingency table , The hypothesis test part introduces the normality distribution test in turn 、 Homogeneity test of variance 、t test 、 Analysis of variance and commonly used nonparametric tests .
######################################################
# factor
set.seed(42)
l3 <-sample(letters[1:3], 10, replace = T)
l3
as.factor(l3)
factor(l3)
# factor()
# Descriptive statistics
set.seed(432)
d3 <- data.frame(
ind = 1:1000,
rn = rnorm(1000),
rn2 = rnorm(1000, mean = 2, sd = 3),
rt = rt(1000, df=5),
rs1 = as.factor(sample(letters[1:3], 1000, replace = T)),
rs2 = as.factor(sample(LETTERS[21:22], 1000, replace = T))
)
# Descriptive statistics
summary(d3)
library(skimr)
skim(d3)
# skewness
e1071::skewness(d3$rn)
# kurtosis
e1071::kurtosis(d3$rn2)
# The correlation coefficient
cor(d3$rn, d3$rt)
cor(d3[,2:4])
# Correlation test
cor.test(d3$rn, d3$rt)
library(psych)
corr.test(d3[,1:3])
# Contingency table
table(d3$rs1)
prop.table(table(d3$rs1))
######################################################
# Hypothesis testing
# Normal distribution test
# shapiro.test()
library(rstatix)
head(ToothGrowth)边栏推荐
- 广告归因:买量如何做价值衡量?
- JS form get form & get form elements
- 深入解析Kubebuilder
- How to package the parsed Excel data into objects and write this object set into the database?
- 九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3
- How to conduct website testing of software testing? Test strategy let's go!
- JS also exports Excel
- [team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
- ACL2022 | 分解的元学习小样本命名实体识别
- 【实践出真理】import和require的引入方式真的和网上说的一样吗
猜你喜欢
![[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp](/img/eb/9aed3bbbd5b6ec044ec5542297f3c6.jpg)
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp

Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry

C # use Siemens S7 protocol to read and write PLC DB block

How does vscade use the built-in browser?

Win11图片打不开怎么办?Win11无法打开图片的修复方法

Network Security Learning - Information Collection

图灵诞辰110周年,智能机器预言成真了吗?

Video fusion cloud platform easycvr video Plaza left column list style optimization

In depth analysis of kubebuilder

acwing 843. N-queen problem
随机推荐
程序员上班摸鱼,这么玩才高端!
Fiance donated 500million dollars to female PI, so that she didn't need to apply for projects, recruited 150 scientists, and did scientific research at ease!
Can I specify a path in an attribute to map a property in my class to a child property in my JSON?
Digital chemical plants realize the coexistence of advantages of high quality, low cost and fast efficiency
Two divs are on the same line, and the two divs do not wrap "recommended collection"
计数排序基础思路
Camera calibration (I): robot hand eye calibration
JS form get form & get form elements
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
Vscode automatically adds a semicolon and jumps to the next line
Win11截图键无法使用怎么办?Win11截图键无法使用的解决方法
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
Nanopineo use development process record
【數模】Matlab allcycles()函數的源代碼(2021a之前版本沒有)
Deeply cultivate the developer ecosystem, accelerate the innovation and development of AI industry, and Intel brings many partners together
A picture to understand! Why did the school teach you coding but still not
Some understandings about 01 backpacker
Video fusion cloud platform easycvr video Plaza left column list style optimization
组织实战攻防演练的5个阶段
leetcode 53. Maximum Subarray 最大子数组和(中等)