MTP bug
0
0
Entering edit mode
kpollard ▴ 110
@kpollard-7578
Last seen 9.5 years ago
United States
Haiyan, There are actually two problems with the code below. One is easy to fix and relates to how you are defining the data. Try this instead: group<-rep(0:1,5) For test="f.block", it is necessary to input the data by block, with observations within block labelled 0:(k-1), where k is the number of observations per block. If you make this change, then you can run the permuation MTP: m1<-MTP(X=data,Y=group,test="f.block",alternative="less",B=100, method="sd.minP",nulldist="perm") This function calls mt.minP with classlabel=Y. From the documentation: classlabel: A vector of integers corresponding to observation (column) class labels. For k classes, the labels must be integers between 0 and k-1. For the 'blockf' test option, observations may be divided into n/k blocks of k observations each. The observations are ordered by block, and within each block, they are labeled using the integers 0 to k-1. The second problem is actually a bug in MTP with the bootstrap null distribution. When the number of observations per block is very small (2 here), then it is easy to get a bootstrap sampled data set with missing data in one or more blocks. I need to think about how to handle this. I will email again when a fix has been posted on the developmental packages section of bioconductor.org. Thanks for noticing the problem! Katie > Date: Fri, 10 Jun 2005 18:09:49 +0800 > From: "Haiyan Pan" <hypan at="" scbit.org=""> > Subject: [BioC] bug for MTP > To: "bioconductor" <bioconductor at="" stat.math.ethz.ch=""> > Message-ID: <200506101010.j5AAAe14008147 at hypatia.math.ethz.ch> > Content-Type: text/plain; charset="gb2312" > > bioconductor: > > when I used the following example to do MTP analysis > > > #data > set.seed(99) > data<-matrix(rnorm(90),nr=9) > group<-c(rep(1,5),rep(0,5)) > > m1<-MTP(X=data,Y=group,test = "f.block",alternative="less",B=100,method="sd.minP") > > the following error information occurs: > > Error in "[<-"(`*tmp*`, (i - 1) * l + j, value = numeric(0)) : > nothing to replace with > In addition: Warning messages: > 1: number of items to replace is not a multiple of replacement length > 2: number of items to replace is not a multiple of replacement length > 3: number of items to replace is not a multiple of replacement length > 4: number of items to replace is not a multiple of replacement length > > how to fix it? Thanks
• 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 512 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6