search for: nresamples

Displaying 2 results from an estimated 2 matches for "nresamples".

Did you mean: nr_samples
2007 May 25
1
Speeding up resampling of rows from a large matrix
...over correlated SNPs of a simple statistic. The code: #------------------------------------------------------------------------------- nSNPs <- 1000 H <- matrix(sample(0:1, 120*nSNPs , replace=T), nrow=120) G <- matrix(0, nrow=3, ncol=nSNPs) # Keep in mind that the real H is 120 x 65000 nResamples <- 3000 pair <- replicate(nResamples, sample(1:120, 2)) gen <- function(x){g <- sum(x); c(g==0, g==1, g==2)} for (i in 1:nResamples){ G <- G + apply(H[pair[,i],], 2, gen) } #------------------------------------------------------------------------------- The problem is that the...
2009 Mar 12
1
zooreg and lmrob problem (bug?)
Hi all and thanks for your time in advance, I can't figure out why summary.lmrob complains when lmrob is used on a zooreg object. If the zooreg object is converted to vector before calling lmrob, no problems appear. Let me clarify this with an example: >library(robustbase) >library(zoo) >dad<-c(801.4625,527.2062,545.2250,608.2313,633.8875,575.9500,797.0500,706.4188,