search for: params2

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

Did you mean: params
2008 Dec 15
3
R2winbugs : vectorization
...gs call for model 1 proc.time() aasho.1<-bugs(data1,inits1,params1,"aasho1.bug",n.iter=10000,debug=FALSE) proc.time() print(aasho.1,digits=4) now we try a vector approach k<-4 # niv data2<-list(x=x,y=y,z=z,n=n,C=C,k=k) inits2<-function(){ list(a=runif(k),sigma.y=runif(1))} params2<-c("a","sigma.y") ## now the bugs call for model 2 proc.time() aasho.2<-bugs(data2,inits2,params2,"aasho2.bug",n.iter=10000,debug=FALSE) proc.time() print(aasho.2,digits=6) ------------------------ Philip A. Viton City Planning, Ohio State University 275 West W...
2009 Dec 19
4
expand.grid game
Dear list, In a little numbers game, I've hit a performance snag and I'm not sure how to code this in C. The game is the following: how many 8-digit numbers have the sum of their digits equal to 17? The brute-force answer could be: maxi <- 9 # digits from 0 to 9 N <- 5 # 8 is too large test <- 17 # for example's sake sum(rowSums(do.call(expand.grid, c(list(1:maxi),