当前位置:网站首页>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)边栏推荐
- In depth analysis of kubebuilder
- Web3 社区中使用的术语
- Analyse approfondie de kubebuilder
- leetcode 53. Maximum subarray maximum subarray sum (medium)
- Unit test asp Net MVC 4 Application - unit testing asp Net MVC 4 apps thoroughly
- Data security -- 12 -- Analysis of privacy protection
- A detailed explanation of head pose estimation [collect good articles]
- Gpt-3 is a peer review online when it has been submitted for its own research
- What work items do programmers hate most in their daily work?
- 軟件測試之網站測試如何進行?測試小攻略走起!
猜你喜欢

Introduction to namespace Basics

mpf2_ Linear programming_ CAPM_ sharpe_ Arbitrage Pricin_ Inversion Gauss Jordan_ Statsmodel_ Pulp_ pLU_ Cholesky_ QR_ Jacobi

Have you got the same "artifact" of cross architecture development praised by various industry leaders?

NTU notes 6422quiz review (1-3 sections)

案例大赏:英特尔携众多合作伙伴推动多领域AI产业创新发展

mpf2_线性规划_CAPM_sharpe_Arbitrage Pricin_Inversion Gauss Jordan_Statsmodel_Pulp_pLU_Cholesky_QR_Jacobi

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」

Mathematical analysis_ Notes_ Chapter 10: integral with parameters

Oracle -- 视图与序列

This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
随机推荐
过气光刻机也不能卖给中国!美国无理施压荷兰ASML,国产芯片再遭打压
计数排序基础思路
ESG Global Leaders Summit | Intel Wang Rui: coping with global climate challenges with the power of science and technology
论文上岸攻略 | 如何快速入门学术论文写作
GPT-3当一作自己研究自己,已投稿,在线蹲一个同行评议
英特尔与信步科技共同打造机器视觉开发套件,协力推动工业智能化转型
深耕开发者生态,加速AI产业创新发展 英特尔携众多合作伙伴共聚
A detailed explanation of head pose estimation [collect good articles]
Win11截图键无法使用怎么办?Win11截图键无法使用的解决方法
Poor math students who once dropped out of school won the fields award this year
C # use Siemens S7 protocol to read and write PLC DB block
Win11 control panel shortcut key win11 multiple methods to open the control panel
JS form get form & get form elements
Master the secrets of software security testing methods, and pinch the security test report with your hands
每人每年最高500万经费!选人不选项目,专注基础科研,科学家主导腾讯出资的「新基石」启动申报
Read of shell internal value command
mpf2_线性规划_CAPM_sharpe_Arbitrage Pricin_Inversion Gauss Jordan_Statsmodel_Pulp_pLU_Cholesky_QR_Jacobi
Network Security Learning - Information Collection
窗口可不是什么便宜的东西
[team learning] [34 issues] scratch (Level 2)