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 ...
随机推荐
- GUI的最终选择 Tkinter(七):菜单Menu组件、Menubutton组件、OptionMenu组件
Menu组件 今天说的Menu组件就是一些菜单组件,开始点点点... Tkinter提供了一个Menu组件,可以实现顶级菜单,下拉菜单和弹出菜单.由于底层是代码实现和优化的,所以不太建议通过按钮和其他 ...
- 简易的开发框架(微服务) Asp.Net Core 2.0
Asp.Net Core 2.0 + Mysql Orm + Ioc + Redis + AOP + RabbitMQ + Etcd + Autofac + Swagger 基础框架: https ...
- Spark Mllib里的本地矩阵概念、构成(图文详解)
不多说,直接上干货! Local matrix:本地矩阵 数组Array(1,2,3,4,5,6)被重组成一个新的2行3列的矩阵. testMatrix.scala package zhouls.bi ...
- [USACO15OPEN]回文的路径Palindromic Paths
[USACO15OPEN]回文的路径Palindromic Paths 题目描述 Farmer John's farm is in the shape of an N \times NN×N grid ...
- 值类型 VS 引用类型~
问 题 值 类 型 引 用 类 型 这个类型分配在哪里? 分配在栈上 分配在托管堆上 变量是怎么表示的? 值类型变量是局部复制 引用类型变量指向被分配得实例所占的内存 基类型是什么? 必须 ...
- ECharts3.0介绍、入门
ECharts 特性介绍 ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,S ...
- Mind must be master of the body, strong mind can separate the body from its suffering.
Mind must be master of the body, strong mind can separate the body from its suffering.意志是身体的主人,有顽强的意 ...
- UIButton 图片文字位置
在实际开发过程中经常在按钮上添加文字和图片,位置和图片的位置根据需求放置也是不一样的.下面实现了各种显示方式,如下图: UIButton+LSAdditions.h // // UIButton+LS ...
- HTTP 错误 500.0 - Internal Server Error
最近在二次开发一个APS.NET网站,将网站部署到IIS后,输入:http://localhost/upload/ 时,报错“HTTP 错误 500.0 - Internal Server Error ...
- Countup.js:vue-countup-v2(npm)数字滚动插件
1.官方地址:http://inorganik.github.io/countUp.js/ 2.官方demo: 3.参数说明: params——start(开始数字).end(结束数字).decima ...