Outlines:
- Goals and strategy
- The simple condition
- The complex condition
Goals and strategy
Goals:
- Estimate the distribution of the test statistic(
T
) under the null hypothesis, thus the p-value of the observed test statistic(Tobs) is easy to get.
-
- When there are multiple tests, permutation test could account for the correcton for multiple testing;
Strategy:
- Rearrange the labels on the observed data points;
- This is on condition that: If the labels are exchangeable under the null hypothesis, then the resulting tests yield exact significance levels.
The simple condition[@wiki_Permutation_tests]
Questions:
See if the mean values of group A and B differ or not.(We don’t know the distribution of A and B)
Notations
sample size
nA,nB
,mean value
x¯A,x¯B
;
## $A
## [1] -0.34998424 0.79496994 0.16626749 0.62345697 0.31640182
## [6] 0.06934537 -0.26458933 0.23255516 1.59808657 -1.84554150
## [11] 0.40214946 0.97689181
##
## $B
## [1] 2.6513936 3.6293449 3.2774724 0.1550930 0.8845866 0.4786718 1.7699035
## [8] 1.4825841 1.3901246 2.3369900 3.4759334 1.9347075 2.2098590 0.3936378
## [15] 3.1333022
Algorithm of permutation test under the simple condition
- Calculate the observed value of
Tobs=x¯A−x¯B
using the original data;
- Pool the data,randomly pick
nA
samples for group A and
nB
for group B, calculate
T
;
- Repeat 2 for I times , thus get statistic
T1,...,TI
;
- p-value:
pobs=#{i:Ti>Tobs}I
;
Remarks:
-
I
is called the resolution of p-value, thus the bigger the better;
The complex condition
![fig](http://www.nature.com/nrg/journal/v6/n2/images/nrg1521-i1.gif)
This figure is abstracted from the GWAS[@hirschhorn2005genome], intending to correct for multiple testing.
Notations
notation |
meaning |
i
i
’th sample |
j
j
’th test |
yi response variable for individual
i
:case=1,control=0 |
xi1,..,xiJ
J
predictor variables for individual i,respectively
m,n
number of cases and controls,respectively Data at location
j
group |
response variable |
predictors |
case |
y1=1
x11,..,x1J
… … … case
ym=1
xm1,..,xmJ
control
y(m+1)=0
x(m+1)1,..,x(m+1)J
… … … control
y(m+n)=0
x(m+n)1,..,x(m+n)J
Remarks: Those
xij
could be either scaler or vector; Algorithm of permutation test under the complex condition
- Calculate the observed value of
T˜∗={T∗1,T∗2,...,T∗J}
for
J
tests with the original data;
- Randomly shuffle yi,get permutation data
D
and calculate
T˜
;
- Repeat 2 for
I
times , thus get data D1,...,DI and corresponding statistic
T˜1,...,T˜I
;
- p-value for
j
’th test correcting for multiple test:
pj=#{i:Tij>T∗j}I; References
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)
-
假设我们有元素 0 和 1 它们可以出现多次 就像00 00 11 00 00 11 11 or 01 11 为了更好的可读性分成 2 组 我已经有一个函数来生成所有独特的排列 class UniqueElement constructor
-
这个答案 https stackoverflow com a 36818947 2642059通过比较两个字符串的内容来确定它们是否是排列 如果它们包含相同数量的每个字符 那么它们显然是排列 这是在O N time 但我不喜欢这个答案 因为
-
我有一个看起来像这样的 df code 1 code 2 code 3 code 4 1 82 93 NA NA 2 15 85 93 NA 3 93 89 NA NA 4 81 NA NA NA 我想生成一个新的 df 它包含所有可能的列
-
今天在实验室会议上有人问我这个问题 我们可以想象一个包含元素 1 N 1 长度为 N 的向量 是否存在生成向量中元素的所有排列或顺序的算法 系统 方法 一种建议的方法是交换随机元素 显然 如果存储所有先前生成的排列以供将来参考 那么这将起作
-
我知道你可以使用列表生成所有排列glob http perldoc perl org functions glob html or 算法 置换 http search cpan org dist Algorithm Permute例如 但如
-
在 C 中想要对很长的 2 20 实数向量 显然sort 就可以了 在我习惯了 R 的优点之前就已经使用过 Rorder 函数产生导致排序向量的排列 Example x 24 55 22 1 然后是排列 perm 3 2 0 1 贴出原图x
-
我知道一种算法 可以在网上找到 对排列进行排名 即给定一个排列 将整数索引返回到按字典顺序排序的排列列表中 但我不知道unrank执行相反操作的算法 给定索引 i 返回按字典顺序排列的第 i 个排列 由于我找不到任何内容 有人可以透露一些信
-
最近开始解答网上评委的问题 我被困在SPOJ 中的这个问题 http www spoj pl problems CODESPTC 下面是洗 N 张牌的算法 这些牌被分成 K 个相等的牌堆 其中 K 是 N 的因数 底部的 N K 张牌按相同
-
我想按照给定长度的字典顺序对一个周期的排列进行排名和取消排名 具有一个循环的排列是您可以在此循环中访问每个元素的位置 p 2 3 1 是一个循环的排列 排名1 p 3 1 2 也有 1 个循环 但等级为 2 因为排列在字典顺序上比第一个大
-
Closed 这个问题需要细节或清晰度 help closed questions 目前不接受答案 我需要根据非常具体的配方构建一个非图解算器 对于每一行 我需要计算所有可能的突变 然后检查该行是否仍然使谜题有效 对于那些不知道非图的人 这
-
我正在寻找 CUDA 上的排序算法 它可以对元素数组 A 双精度 进行排序 并返回该数组 A 的键 B 数组 我知道sort by keyThrust 库中的函数 但我希望元素数组 A 保持不变 我能做些什么 我的代码是 void sort
-
Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 Wiki http en wikipedia org wiki Mathematics of Sudoku http en wikiped
-
我正在学习回溯和递归 并且我陷入了打印字符串所有排列的算法 我用以下方法解决了它贝尔算法 http programminggeeks com bell algorithm for permutation 用于排列 但我无法理解递归方法 我在
-
我一直在审查实践算法 目前正在研究一种我非常喜欢的排列算法 void permute char set int begin int end int range end begin if range 1 cout lt lt set lt l
-
index List Idx Predicate will get List with permutation and I want to know index of permutation For example index 4 1 3
-
给定一个字符串 我想生成所有可能的组合 换句话说 在字符串中的某处放置逗号的所有可能方法 例如 input abcd output abcd abc d ab cd ab c d a bc d a b cd a bcd a b c d 我对
-
The 循环引导迭代算法 http www geeksforgeeks org an in place algorithm for string transformation 是一种通过将所有偶数项移至前面并将所有奇数项移至后面同时保留其相
-
我的问题是 给定一个长度为 n 的列表 L 和一个整数 i 使得 0 对于任意 i 和任意 2 个列表 A 和 B perm A i 和 perm B i 都必须将 A 和 B 的第 j 个元素映射到 A 和 B 相同位置的元素 对于任何输
-
这个问题在这里已经有答案了 我是 R 新手 有点困惑 假设我有一个向量 c 1 2 3 4 5 6 我想生成具有四个元素的排列 每个排列应涉及 1 和 5 谢谢 您可以使用permutations https www rdocumentat
-
我正在处理一个 Excel 工作表 需要确定大小数字的垂直数组的奇偶校验N 该数组包含来自的每个数字1 to N每一次正好一次 在这种情况下 奇偶校验被定义为将加扰数组转换为从小到大排序的数组所需的交换次数 例如 数组 3 1 2 4 具有
-
前几天回校调试基于407的程序 xff0c 以前都是在别人的程序基础上面改写只要能实现想要的功能不会管其他的 xff0c 结果基本就没用用过硬件JLINK的硬件仿真 xff0c 那晚蔡师姐帮忙一直弄到夜里12点多 xff0c 真的很感谢她
-
楼主后知后觉 xff0c 今天打开一个工程文件 xff0c 发现不能在其中的文件 xff08 含有 xff09 里添加注释和修改 几经周折后 xff0c 发现这个问题与Keil没有关系 xff0c 这个带有锁的文件属性是 xff1a 只读
-
1 点击图中菜单栏中的高亮部分 43 43 43 43 43 2 点进去后 xff0c 选择 Set snap Grid xff0c 最小设置为1mil 完成
-
原文地址 xff1a http www jianshu com p f8224779ca63 开发App时会遇到各种坑 xff0c 本文分享我们在iOS Android系统中定位和地图中遇到的坑 xff0c 以及携程App的解决方案 定位
-
VMware Workstation 12安装windows server 2003 无法显示图形界面报N多错问题 问题描述 xff1a 在VMware Workstation 12 xff08 下文简称VM 12 xff09 安装wind
-
如果你遇到 python或 pip 不是内部或外部命令 可能是你的 Path环境变量格式输入有误 xff01 一步错 xff0c 步步错 xff01 很多人可能在安装配置 Python环境时被 python 不是内部或外部命令 也不是可运行
-
05 第二个重复出现的数 总时间限制 1000ms 内存限制 65536kB 描述 给定一个正整数数组 xff08 元素的值都大于零 xff09 xff0c 输出数组中第二个重复出现的正整数 xff0c 如果没有 xff0c 则输出字符串
-
问题描述 操作系统 xff1a Ubuntu18 04 今天在执行以下指令时 xff1a sudo apt upgrade 出现了以下错误 xff1a E 无法获得锁 var lib dpkg lock frontend open 11 资
-
中缀转后缀 xff1a 从左到右依次扫描中缀表达式 xff0c 遇到操作数就直接写出来 xff08 顺序是从前往后写 xff09 xff0c 遇到运算符时 xff0c 判断当前运算符与栈顶运算符的优先级 xff0c 如果当前运算符的优先级小
-
Collection View Basics xff08 集合视图基础 xff09 To present its content onscreen a collection view cooperates with many differe
-
初次搭建虚拟机时的几大头痛的问题 xff1a 虚拟机连不了网虚拟机连不上主机主机连不上虚拟机 看完这篇 xff0c 你就能解决大部分虚拟网络问题 xff01 前言 搭建虚拟机的目的之一是尝试局域网的搭建 xff0c 因此虚拟机的网络设置非常
-
实测成功配置信息1 xff1a Windows10 xff0c GT755m Capability 3 0 Ana Mini conda管理 xff0c 环境 Python 3 6 13 Cuda 61 9 0 Cudnn 61 7 0 T
-
目录 EXE HelloWorld 设置运行环境 编写 amp 运行 免设置运行环境的方法 LIB 加法函数 Add C语言LIB 编译 xff1a 命令行 task 测试Add lib DLL 乘法函数 Mul C语言DLL 编译DLL
-
字符串读入 xff1a C语言 xff1a 包含头文件 43 定义 xff1a include lt cstring gt typedef span class hljs value char span ch span class hljs
-
c 43 43 对象模型 例子 xff1a Base h文件 pragma once include lt string gt include lt iostream gt using namespace std class Base pu
-
C语言是门经典的高级语言 xff0c 只可惜大学学的不够好 xff0c 工作后也没怎么用到 xff0c 快把学的还给老师了 xff0c 最近无聊之余 xff0c 把C语言相关知识看了 xff0c 编程还是在于多练和多思考 xff0c 实践加
-
Python之 可变 的tuple 前面我们看到了tuple一旦创建就不能修改 现在 xff0c 我们来看一个 可变 的tuple xff1a t 61 a b A B 注意到 t 有 3 个元素 xff1a a xff0c b 和一个li
-
JSP 四种属性范围 A 设置属性 public abstract voidsetAttribute java lang String name Object value B 取得属性 public Object getAttribte S
-
usr bin python3 import smtplib from email mime text import MIMEText from email mime multipart import MIMEMultipart from
-
Outlines Goals and strategyThe simple conditionThe complex condition Goals and strategy Goals Estimate the distribution
| |