Applied Nonparametric Statistics-lec9
Ref:https://onlinecourses.science.psu.edu/stat464/print/book/export/html/12
前面我们考虑的情况是:response是连续的,variable是离散的。举例:如果打算检查GPA的中位数是否与学生坐在教室的位置有关,
那么GPA的中位数是连续的,是响应变量;学生坐的位置(前中后)是离散的,是解释变量。
现在考虑解释变量也是连续的情况,即检查两个连续变量之间的因果关系。其中,我们最关心的是关系的强弱和方向。
首先,我们考虑线性相关的情况,计算Pearson's correlation coefficient
计算Pearson's Correlation Coefficient
cor.test(x, y)
结果将给出系数cor,置信区间,p-value
计算斜率(最小二乘法拟合时)
> h=c(67, 62, 64, 65)
> w=c(120, 172, 167, 145)
> lm(w~h)
注意:这里使用的是y~x来拟合,应该是可以选用不同的公式的。结果里,斜率是-10.85
Spearman's Rank Correlation
使用两个变量的rank值,置换计算Pearson's,就是Spearman's
Kendall's Tau Rank Correlation
measuring association by counting the number of concordant and disconcordant pairs
concordant pairs
Bootstrap
The sample we get from sampling from the data with replacement is called the bootstrap sample
sample=sample(data, 10, replace=T)
Steps for Creating a Bootstrap Estimate of Correlation
1. Gather a bootstrap sample of size n (Think carefully how to do this).
2. Calculate the sample correlation, ri , from the bootstrap sample.
3. Repeat steps (1)-(2) B times. Typically want B to be larger than 100. I would say B = 1000 is a good number.
4. To find the (1-α)100\%CI for ρ, you would order the data and find the α/2 and 1-α/2 percentiles as the lower and upper bounds.
Applied Nonparametric Statistics-lec9的更多相关文章
- Applied Nonparametric Statistics-lec10
Ref:https://onlinecourses.science.psu.edu/stat464/print/book/export/html/14 估计CDF The Empirical CDF ...
- Applied Nonparametric Statistics-lec8
Ref:https://onlinecourses.science.psu.edu/stat464/print/book/export/html/11 additive model value = t ...
- Applied Nonparametric Statistics-lec7
Ref: https://onlinecourses.science.psu.edu/stat464/print/book/export/html/9 经过前面的步骤,我们已经可以判断几个样本之间是否 ...
- Applied Nonparametric Statistics-lec6
Ref: https://onlinecourses.science.psu.edu/stat464/print/book/export/html/8 前面都是对一两个样本的检查,现在考虑k个样本的情 ...
- Applied Nonparametric Statistics-lec5
今天继续two-sample test Ref: https://onlinecourses.science.psu.edu/stat464/print/book/export/html/6 Mann ...
- Applied Nonparametric Statistics-lec4
Ref: https://onlinecourses.science.psu.edu/stat464/print/book/export/html/5 Two sample test 直接使用R的t- ...
- Applied Nonparametric Statistics-lec3
Ref: https://onlinecourses.science.psu.edu/stat464/print/book/export/html/4 使用非参数方法的优势: 1. 对总体分布做的假设 ...
- Applied Nonparametric Statistics-lec2
Ref: https://onlinecourses.science.psu.edu/stat464/print/book/export/html/3 The Binomial Distributio ...
- Applied Nonparametric Statistics-lec1
参考网址: https://onlinecourses.science.psu.edu/stat464/node/2 Binomial Distribution Normal Distribution ...
随机推荐
- 爬虫(Xpath)——爬tieba.baidu.com
工具:python3 核心知识点: 1)lxml包不能用pip下载,因为里面有其他语言编写的文件 2)urlopen返回的请求是html文件,要使用 content = etree.HTML(html ...
- block size大小
1.用tune2fs查看block size大小: 1 2 tune2fs -l /dev/sda1 |grep "Block size" Block size: 1024 2.用 ...
- C#数据类型 值传递和引用传递
/// <summary> /// 电脑类 /// </summary> public class Computer { public string Type { get; s ...
- AJPFX深入理解之abstract class和interface的区别
含有abstract修饰符的class即为抽象类,abstract 类不能创建的实例对象.含有abstract方法的类必须定义为abstract class,abstract class类中的方法不必 ...
- Java并发(二):基础概念
并发编程的第二部分,先来谈谈发布(Publish)与逸出(Escape); 发布是指:对象能够在当前作用域之外的代码中使用,例如:将对象的引用传递到其他类的方法中,对象的引用保存在其他类可以访问的地方 ...
- MySql自动默认时间及更新时间
注意:5.7 才能用类型为datetime的字段实现 `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `modifie ...
- UVA 1442 Cave 洞穴 (贪心+扫描)
题意:有一个洞穴,每个位置有一个底的高度p[i],和对应顶的高度s[i],要往里面尽量放燃料,要求燃料不能碰到顶,可以无限接近. 题解:制约燃料储放的就是顶的高度了,分别求出设当前储放位置的向两边的延 ...
- Python-OpenCV中图像合并显示
在图像处理中,我们通常需要将原图像与处理后的图像放在同一个窗口显示,这样便于比较. 首先,需要介绍Numpy中的两个函数:hstack().vstack(). 函数原型:hstack(tup) ,参数 ...
- 用函数求lnx,lgx等
https://blog.csdn.net/liujian20150808/article/details/50628061
- iperf安装与使用
从官网下载相应版本. https://iperf.fr/iperf-download.php centos7 安装 rpm -i iperf3-3.1.3-1.fc24.x86_64.rpm ubun ...