R-quantile()
来源:互联网 发布:切纸机无刀后数据 编辑:程序博客网 时间:2024/05/20 06:22
R中取百分位比用quantile()
1. 求某个百分位比
> x<-rnorm(200)
> quantile(x,0.9)
90%
1.377796
> quantile(x,c(0.1,0.9))
10% 90%
-1.317574 1.377796
2. 产生一序列百分位比值
> quantile(x,seq(0.1,1,0.1))
10% 20% 30% 40% 50% 60% 70% 80% 90%
-1.31757448 -0.94861519 -0.67421389 -0.33618527 -0.03578113 0.24425065 0.50656752 0.99848083 1.37779613
100%
3.83505973
2. 只取数值:unname()
> y<-quantile(x,0.9)
> y
90%
1.377796
> y-1
90%
0.3777961
会带着百分值,只取
举例:
upbound.p[i]<-unname(quantile(x$spread_positive[(i-n):(i-1)],upbound,na.rm=T))
> y<-unname(quantile(x,0.9))
> y
[1] 1.377796
- R-quantile()
- 基于R语言的分位数回归(quantile regression)
- Quantile-Quantile Plot
- QQPlot/Quantile-Quantile Plot
- R语言 quantile()和fivenum()的差别在于——加权平均与算术平均(转载)
- pandas.Series.quantile
- 分位数(quantile)
- quantile-quantile plot (qqplot) of the p-values
- 分位数(quantile)与分位函数(quantile function)
- 利用Python的科学计算包scipy画Quantile-Quantile图
- 【语言转换】matlab quantile (matrix(:),value) 形式idl实现
- GK Summay算法(ϵ−approximate ϕ−quantile)
- r
- r
- R
- r
- r
- r
- C++ 用set容器过滤插入到map容器中的元素
- 递归
- Myeclipse中相同变量高亮显示
- autocomplete 参数说明
- 一个MongoAlchemy的例子
- R-quantile()
- 很幽默的讲解六种Socket IO模型(转)
- Android开发学习笔记:浅谈WebView
- 我对嵌入式底层开发学习的一点看法
- 联系人API 的各种表结构
- visual studio 2010工具栏中设置常规需要的工具栏
- 自己实现的JDBC工具类
- phpcms 模板页面使用的标签和功能
- Lucky Number