Permutation test

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

  1. Calculate the observed value of Tobs=x¯Ax¯B using the original data;
  2. Pool the data,randomly pick nA samples for group A and nB for group B, calculate T ;
  3. Repeat 2 for I times , thus get statistic T1,...,TI ;
  4. 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

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

  1. Calculate the observed value of T˜={T1,T2,...,TJ} for J tests with the original data;
  2. Randomly shuffle yi,get permutation data D and calculate T˜ ;
  3. Repeat 2 for I times , thus get data D1,...,DI and corresponding statistic T˜1,...,T˜I ;
  4. p-value for j ’th test correcting for multiple test:
    pj=#{i:Tij>Tj}I;

References

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值