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 ...
随机推荐
- spring tx:advice事务配置
http://blog.csdn.net/bao19901210/article/details/17226439 http://blog.csdn.net/rong_wz/article/detai ...
- Testlink设置
1. Testlink配置修改 1.1. config.inc.php 1.1.1. 日志路径配置 /** * @var string Path to store logs - *for securi ...
- mysql8.0数据库忘记密码时进行修改方法
最近安装mysql8.0数据库,用以前的修改mysql方法,没有成功,所以参考网上前辈的做法,自己重新整理了下忘记密码时进行修改方法 1.安装mysql8.0后发现,在安装目中,是没有my.ini 和 ...
- 爬虫(BeautifulSoup4)——安装
环境:python3 win10 安装这个心好累啊!网上找了很多办法都安装不成功,后来换了几个安装包,最后4.4.1版本的包终于能用了! https://blog.csdn.net/www520507 ...
- Unbuntu 自动重启MySQL
上个月,通过Unbuntu搭建了WordPress,一切运行良好. UBUNTU搭建WORDPRESS-MYSQL-APACHE 但是,最近几天,不知道啥情况,MySQL偶尔会出现Stop:影响了bl ...
- Author: Jan Odvarko, www.janodvarko.cz
/* * Author: Jan Odvarko, www.janodvarko.cz */ FBL.ns(function() { with (FBL) { function HelloWorld ...
- css简单动画
这几天公司需要更新一个移动端web的页面,因为任务简单,就交给作为菜鸟新人的我来做.第一次接触css还是在14年刚上大一的时候跟着html一起学习的,之后就再也没有接触过.所以只好一边学习,一边完成任 ...
- 使用OpenSSH远程管理Linux服务器
一.使用OpenSSH远程管理Linux服务器 sshd是OpenSSH的服务器端守护进程,与之对应的Windows下客户端软件有SecureCRT/Xshell/PuTTY等. OpenSSH一般为 ...
- so文件动态加载注意事项
动态加载是指将so文件存放于服务器,在需要用的时候,通过服务器下载到本地,然后加载. 需要注意的: 手机cpu架构,不同的架构运行不同的so 解决方法: 1,欺骗性: 如果so架构不全,就在apk打包 ...
- Array - Merge Sorted Array
/** * 将nums2中的值合并入nums1,使其仍然有序 * 可以任务nums1的长度>=m+n * @param nums1 已排序数组 * @param m nums1数组已初始化的数目 ...