Skip to content
Prev 308873 / 398503 Next

repeat takes along time

Hi
What is this code supposed to do? It gives an error (see below)
+ for (i in 1:n){
+ probb[i]=sum(Wc[z[,j]>=yb[i]])
+ }
+ deltab[,b]=rbinom(n,1,probb)
+ if(length(which(is.na(deltab[,b])==T))==0){break}
+ }
Error: object 'n' not found
PLEASE do read the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.

and some data to test the code.

Anyway, this kind of code shall be implemented probably in other language like C+.

Regards
Petr