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
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(使用前将#替换为@)
-
我想迭代一个的所有顶点n尺寸为 1 的维度立方体 我知道我可以做到这一点itertools product如下 gt gt gt n 3 gt gt gt for j in it product 0 1 repeat n print j 0
-
我有以下递归函数用于输出部分组合 void comb string sofar string rest int n string substring if n 0 cout lt lt sofar lt lt endl else for s
-
我正在寻找一种可以将数字映射到序列的唯一排列的算法 由于类似的问题 我发现了莱默代码和阶乘系统 快速排列 gt 数字 gt 排列映射算法 https stackoverflow com questions 1506078 fast perm
-
我有一个包含重复元素的列表 即orig 1 1 1 2 2 3 我想创建一个精神错乱 https en wikipedia org wiki Derangement b f orig 这样对于每个位置值b与值不同orig b i orig
-
我想生成一组排列n球进m垃圾箱 以下一组嵌套列表生成这些排列 n lt 3 m lt 4 v lt rep 0 m for i in n 0 for j in n sum i 0 for k in n sum i j 0 for l in
-
给定一个可变维度的数组 例如 数组 1 2 4 5 我需要一种方法来概括数组的所有可能组合和子集 给定一个包含 n 个元素的数组 我需要拥有所有子集 1 个元素的所有子集 2 个元素的所有子集 n 个元素的所有子集 以及每个子集的所有可能排
-
这个答案 https stackoverflow com a 36818947 2642059通过比较两个字符串的内容来确定它们是否是排列 如果它们包含相同数量的每个字符 那么它们显然是排列 这是在O N time 但我不喜欢这个答案 因为
-
不是家庭作业问题 我正在回答这些问题here http www careercup com question id 5653595164770304我遇到了这个问题 有人已经回答了 我已经尝试了很多方法来理解所使用的递归 但我无法理解它 有
-
我有一个对象元素列表 SourceList ResultList Expected Obj A Obj F Obj B Obj C Obj C Obj G Obj D Obj B Obj E Obj A Obj F Obj B Obj G
-
我想要一个函数 它可以从一组 n 个整数 0 到 n 1 中生成 k 个伪随机值 而不重复任何先前的结果 k小于或等于n O n 内存不可接受由于尺寸较大n以及我需要重新洗牌的频率 这些是我到目前为止考虑过的方法 Array 通常 如果我想
-
尽管已经发布了很多关于这个问题的文章 但我还是发布了此内容 我不想发布答案 因为它不起作用 这篇文章的答案 查找给定字符串在所有可能的重复排列列表中的排名 https stackoverflow com questions 17620694
-
我知道你可以使用列表生成所有排列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
-
这个问题在这里已经有答案了 我正在寻找使用 C 实现排列 组合和幂集 使用STL 排列 using std next permutation template
-
如何生成序列r对象来自n物体 我正在寻找一种方法来进行排列或组合 有 没有替换 具有不同和非不同的项目 又名多重集 这与十二倍的方式 http en wikipedia org wiki Twelvefold way 不同的 解决方案可以以
-
Closed 这个问题需要细节或清晰度 help closed questions 目前不接受答案 我需要根据非常具体的配方构建一个非图解算器 对于每一行 我需要计算所有可能的突变 然后检查该行是否仍然使谜题有效 对于那些不知道非图的人 这
-
我正在寻找 CUDA 上的排序算法 它可以对元素数组 A 双精度 进行排序 并返回该数组 A 的键 B 数组 我知道sort by keyThrust 库中的函数 但我希望元素数组 A 保持不变 我能做些什么 我的代码是 void sort
-
我正在寻找一种算法来生成列表中重复 4 个元素 长度 2 1000 的所有排列 Java实现 http en literateprograms org Permutations with repetition 28Java 29 问题是上面
-
我需要解决一个需要比较具有相同列数的两个矩阵的问题 其中之一被操纵 直到获得最佳匹配 我对两个矩阵之间的差异进行评分的方式非常复杂 我仍然需要最终确定它 目前我真正感兴趣的是找到一种仅适用于正整数的搜索 优化算法 我创建了一个简单的示例 其
-
我遇到了这个 它要求计算在 4x3 网格中可以制作特定长度的锁定图案的方式数 并遵循规则 可能有些点不能包含在路径中 有效的模式具有以下属性 图案可以使用第一次接触的点序列来表示 与绘制图案的顺序相同 从 1 1 到 2 2 的图案与图案不
-
前几天回校调试基于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
| |