R t-test cor.test
a = c(175, 168, 168, 190, 156, 181, 182, 175, 174, 179)
b = c(185, 169, 173, 173, 188, 186, 175, 174, 179, 180)
x<-t.test(a,b)
str(x)
class(x)
> str(x)
List of 9
$ statistic : Named num -0.947
..- attr(*, "names")= chr "t"
$ parameter : Named num 16
..- attr(*, "names")= chr "df"
$ p.value : num 0.358
$ conf.int : num [1:2] -11.01 4.21
..- attr(*, "conf.level")= num 0.95
$ estimate : Named num [1:2] 175 178
..- attr(*, "names")= chr [1:2] "mean of x" "mean of y"
$ null.value : Named num 0
..- attr(*, "names")= chr "difference in means"
$ alternative: chr "two.sided"
$ method : chr "Welch Two Sample t-test"
$ data.name : chr "a and b"
- attr(*, "class")= chr "htest"
> class(x)
[1] "htest"
> x$p.value
[1] 0.3575549
> x$estimate
mean of x mean of y
174.8 178.2
> x$estimate[1]
mean of x
174.8
> x$estimate[2]
mean of y
178.2
>
========================
> x<-cor.test(a,b)
> str(x)
List of 9
$ statistic : Named num -0.714
..- attr(*, "names")= chr "t"
$ parameter : Named int 8
..- attr(*, "names")= chr "df"
$ p.value : num 0.496
$ estimate : Named num -0.245
..- attr(*, "names")= chr "cor"
$ null.value : Named num 0
..- attr(*, "names")= chr "correlation"
$ alternative: chr "two.sided"
$ method : chr "Pearson's product-moment correlation"
$ data.name : chr "a and b"
$ conf.int : num [1:2] -0.758 0.455
..- attr(*, "conf.level")= num 0.95
- attr(*, "class")= chr "htest"
> x$p.value
[1] 0.4955273
> x$estimate
cor
-0.2447594
>
R t-test cor.test的更多相关文章
- R语言矩阵相关性计算及其可视化?
目录 1. 矩阵相关性计算方法 base::cor/cor.test psych::corr.test Hmisc::rcorr 其他工具 2. 相关性矩阵转化为两两相关 3. 可视化 corrplo ...
- AT2364 Colorful Balls
AT2364 Colorful Balls 题意翻译 N个球排成一排,第i个球有颜色ci和重量wi. Snuke每次可以选择两个颜色相同,且重量之和不超过X的球,交换他们的位置. Snuke每次可以选 ...
- codeforces631B
Print Check CodeForces - 631B Kris works in a large company "Blake Technologies". As a bes ...
- HDU 1542 矩形面积并【离散化+线段树+扫描线】
<题目链接> 题目大意: 给你n个矩形,求出它们面积的并. 解题分析: 此题主要用到了扫描线的思想,现将各个矩形的横坐标离散化,然后用它们离散化后的横坐标(相当于将矩形的每条竖线投影在x轴 ...
- bzoj 4695: 最假女选手 && Gorgeous Sequence HDU - 5306 && (bzoj5312 冒险 || 小B的序列) && bzoj4355: Play with sequence
算导: 核算法 给每种操作一个摊还代价(是手工定义的),给数据结构中某些东西一个“信用”值(不是手动定义的,是被动产生的),摊还代价等于实际代价+信用变化量. 当实际代价小于摊还代价时,增加等于差额的 ...
- 2015.03.12,外语,读书笔记-《Word Power Made Easy》 10 “如何讨论交谈习惯”学习笔记 SESSION 25
1.about keeping one's mouth shut taciturn,名词形式taciturnity,沉默寡言. 美国第30任总统库里奇,以沉默寡言著称.他来自新英格兰,那里视tacit ...
- codeforces269B
Greenhouse Effect CodeForces - 269B Emuskald is an avid horticulturist and owns the world's longest ...
- [原]CentOS7安装Rancher2.1并部署kubernetes (二)---部署kubernetes
################## Rancher v2.1.7 + Kubernetes 1.13.4 ################ ##################### ...
- 利用python进行数据分析2_数据采集与操作
txt_filename = './files/python_baidu.txt' # 打开文件 file_obj = open(txt_filename, 'r', encoding='utf-8' ...
- Django项目:CRM(客户关系管理系统)--81--71PerfectCRM实现CRM项目首页
{#portal.html#} {## ————————46PerfectCRM实现登陆后页面才能访问————————#} {#{% extends 'king_admin/table_index.h ...
随机推荐
- Sql server 存储过程批量插入若干数据。
测试时,经常需要生成大量数据来测试系统性能,此功能可以用存储过程快速生成. 1. 随机生成日期 DECLARE @Date_start datetime DECLARE @Date_end datet ...
- skynet对Windows环境支持的版本:Windows版skynet
https://github.com/sanikoyes/skynet.git Skynet Skynet is a lightweight online game framework, and it ...
- 【2017-03-23】CSS基础:内联样式
CSS:层叠式样式表 1.对层标签整体进行操作 <div style="width:200px;height:200px;background-color:blue"> ...
- Linux基础命令---显示登录用户logname
logname 显示当前登录的用户名称.此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS.SUSE.openSUSE.Fedora. 1.语法 logname 2 ...
- Linux服务器配置---安装nfs
安装nfs NFS是Network File System的缩写,即网络文件系统.客户端通过挂载的方式将NFS服务器端共享的数据目录挂载到本地目录下. 由于NFS支持的功能很多,不同功能会使用不同程序 ...
- sqlyog连接Linux上的mysql报错误号码2013,错误号码1130的解决办法
sqlyog连接Linux上的mysql报错误号码2013,错误号码1130的解决办法 1.报错误号码2013,可能是端口号不是默认的3306,需要改成对应的,检查命令是: [root@host et ...
- Codeforces 268B - Buttons
Manao is trying to open a rather challenging lock. The lock has n buttons on it and to open it, you ...
- 5、CentOS 6.5系统安装配置Nginx-1.2.7+PHP-5.3.22环境
一,操作系统 以最小服务器形式安装系统,并添加开发工具库,便于后期编译使用. 此处基本都是下一步,下一步,不再废话. 安装完成,进入系统,调通网络,关闭防火墙或打开相应的WEB端口. 以下安装操作默认 ...
- [转载]Oracle修改用户表所属表空间的步骤
1 .修改表的空间alter table TABLE_NAME move tablespace TABLESPACENAME 查询当前用户下的所有表选择'alter table'|| table_na ...
- CI(CodeIgniter)框架下使用非自带类库实现邮件发送
在项目开发过程中,需要到了邮件提醒功能.首先想到的是CI自身带不带邮件发送类,查看帖子,发现CI本身自带,然后试着利用CI自身带的类库来实现,经过搜搜很多帖子,不少开发者反馈CI自身的Email类有问 ...