search for: inits1

Displaying 14 results from an estimated 14 matches for "inits1".

Did you mean: inits
2008 Jan 04
2
R2WinBUGS sending variables as factors
...nrow(d) data <- list("N", "YFTCPUE","Lat","SeaW") #,"Month" #Month Taken out so that model runs #create initial values for the coefficients in the model (this is model specific) #construct inits for the three chain inits1 <- list(gamma0 = 0, delta0 = 0,beta1 = 0, alpha1 = 0, alpha2 = 0, index = rbern(J,0.5)+1) inits2 <- list(gamma0 = 0, delta0 = 0,beta1 = 0, alpha1 = 0, alpha2 = 0, index = rbern(J,0.5)+1) inits3 <- list(gamma0 = 0, delta0 = 0,beta1 = 0, alpha1 = 0, alpha2 = 0, index = rbern(J,0.5)+1) ini...
2012 Nov 28
2
Error message R2Jags
...ow(PResNew[i], 2) } # Add up discrepancy measures fit <- sum(D[1:N]) fit.new <- sum(DNew[1:N]) for (i in 1:6) { b[i] ~ dnorm(0.0, 0.01) # b[i] ~ dunif(-20, +20) } } ",fill = TRUE) sink() inits1 <- function () { list(b = rnorm(7, 0, 0.01))} out1 <- jags(data = win.data1, inits = inits1, parameters = params1, model.file = "GLM.txt", n.thin = nt, n.chains = nc, n.burnin = nb, n....
2010 Aug 31
2
Can WinBUGS run two processes through R at the same time?
...essage appears while I put the code to run for the second WinBUGS. The error message: Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'inits1.txt': Permission denied Can WinBUGS run two processes through R at the same time? If it can, how should I modify the setting to do this? Thanks. [[alternative HTML version deleted]]
2008 Dec 15
3
R2winbugs : vectorization
...z.hat[i]<-inprod(a[],x[i,]) } for (j in 1:k){ a[j]~dunif(0,100) } tau.y<-pow(sigma.y,-2) sigma.y~dunif(0,100) } and here, for reference, is the R calling code: x<-as.matrix(iv) y<-dv C<-cens z<-ifelse(y==C,NA,y) n<-length(z) data1<-list(x=x,y=y,z=z,n=n,C=C) inits1<-function(){ list(a1=runif(1),a2=runif(1),a3=runif(1),a4=runif(1),sigma.y=runif(1))} params1<-c("a1","a2","a3","a4","sigma.y") ## now the bugs call for model 1 proc.time() aasho.1<-bugs(data1,inits1,params1,"aasho1.bug",n.iter...
2006 Nov 30
0
R2WinBUGS - parameter monitor seting
...y = NULL, clearWD = TRUE, debug = TRUE) script.txt: display ('log') check ('D:/Work/SpatialEpi/Water/THM Imputation/Rwork/bayesimp.txt') data ('D:/Work/SpatialEpi/Water/THM Imputation/Rwork/data.txt') compile (1) inits (1, 'D:/Work/SpatialEpi/Water/THM Imputation/Rwork/inits1.txt') gen.inits() thin.updater (2) update (1000) set (y) set (u) set (deviance) dic.set() update (1000) coda (*, 'D:/Work/SpatialEpi/Water/THM Imputation/Rwork/coda') stats (*) dic.stats() history (*, 'D:/Work/SpatialEpi/Water/THM Imputation/Rwork/history.odc') save ('D:/Wor...
2007 Oct 26
1
bugs() ignores my inits
...bugs(data, inits, parameters, "example.txt", n.chains=2, n.iter=15000, clearWD=TRUE, debug=1, DIC=0) display(log) check(J:/project/ps/code/example.txt) model is syntactically correct data(J:/project/ps/code/data.txt) data loaded compile(2) model compiled inits(1,J:/project/ps/code/inits1.txt) this chain contains uninitialized variables inits(2,J:/project/ps/code/inits2.txt) this chain contains uninitialized variables gen.inits() initial values generated, model initialized thin.updater(15) update(500) set(m1) set(m2) set(m3) set(m4) set(sig21) set(sig22) update(500) coda(*,J:/projec...
2010 Apr 19
1
BRugs
...ts=bi.bmi.model.init, numChains=1, para=bi.bmi.model.parameters, nBurnin=20, nIter=40) When I run this I get this message. model is syntactically correct data loaded array index is greater than array upper bound for a1 [1] "C:\\DOCUME~1\\Owner\\LOCALS~1\\Temp\\RtmpNvSdyb/inits1.txt" Initializing chain 1: model must be compiled before initial values loaded model must be initialized before updating model must be initialized before DIC an be monitored Error in samplesSet(parametersToSave) : model must be initialized before monitors used I checked the main effects al...
2010 Oct 15
1
Problem using BRugs
...ssage: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ model is syntactically correct expected the collection operator c error pos 8 (error on line 1) variable ww is not defined in model or in data set [1] "C:\\DOCUME~1\\maomao\\LOCALS~1\\Temp\\RtmpqJk9R3/inits1.txt" Initializing chain 1: model must be compiled before initial values loaded model must be initialized before updating model must be initialized before DIC an be monitored Error in samplesSet(parametersToSave) : model must be initialized before monitors used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
2012 Jan 19
0
Global sensitivity indices using sensitivity package: sobol, sobol2002
...ews1[,7])*R dN<-(xnews1[, 2]-xnews1[, 4]*N)*N-xnews1[, 8]*I-(xnews1[, 2]-xnews1[, 4]*N)*(1-xnews1[, 6])*I der <- c(dS, dI,dR,dN) list(der) # the output must be returned }) # end of 'with' } # end of function definition yout<-matrix(0,100,100) parms1<-xnews1 dt<- seq(1,50,1) inits1 <- c(S=xnews1[, 10], I=xnews1[, 11], R=xnews1[, 12],N=xnews1[, 13]) for(j in 1:100){ simulation2 <- as.data.frame(lsoda(inits=inits1, times=dt, funct=SIRdob1, parms=parms1[j, ])) attach(simulation2) yout[j]<-as.numeric(simulation2[50 , 3]) } yout } ####Input data 1 n<-10 lambda<-r...
2005 Jul 27
1
error message running R2WinBUGS
...l values several times, I still keep geting the following error message in Winbugs: display(log) check(S:/Common/zhangqi/ebayes/for R/model.txt) model is syntactically correct data(C:/Program Files/R/rw2011/data.txt) data loaded compile(2) model compiled inits(1,C:/Program Files/R/rw2011/inits1.txt) value of binomial x[1,28] must be between zero and order of x[1,28] I really have no clue about what I can do to fix it. Could any of your please take a look at my problem, I truely appreciate any suggestions. Qi Zhang [[alternative HTML version deleted]]
2006 Dec 09
1
WinBUGS14 and R
...st this in the log: display(log) check(C:/Documents and Settings/Chris/Desktop/4330/attempt2.txt) expected left pointing arrow <- or twiddles ~ data(C:/Documents and Settings/Chris/data.txt) command #Bugs:data cannot be executed (is greyed out) compile(3) inits(1,C:/Documents and Settings/Chris/inits1.txt) command #Bugs:inits cannot be executed (is greyed out) inits(2,C:/Documents and Settings/Chris/inits2.txt) command #Bugs:inits cannot be executed (is greyed out) inits(3,C:/Documents and Settings/Chris/inits3.txt) command #Bugs:inits cannot be executed (is greyed out) gen.inits() command #Bugs...
2012 Dec 04
1
Winbugs from R
...",debug=TRUE) Winbugs is producing this error page display(log)check(C:/Users/Gunal/Desktop/dummy/reg.txt)model is syntactically correctdata(C:/Users/Gunal/AppData/Local/Temp/RtmpCYxtDZ/data.txt)data loadedcompile(3)variable n is not definedinits(1,C:/Users/Gunal/AppData/Local/Temp/RtmpCYxtDZ/inits1.txt)command #Bugs:inits cannot be executed (is greyed out)inits(2,C:/Users/Gunal/AppData/Local/Temp/RtmpCYxtDZ/inits2.txt)command #Bugs:inits cannot be executed (is greyed out)inits(3,C:/Users/Gunal/AppData/Local/Temp/RtmpCYxtDZ/inits3.txt)command #Bugs:inits cannot be executed (is greyed out)gen.i...
2009 Dec 16
1
WinBUGS - R2WinBUGS problem
...y(log) check(C:/Documents and Settings/sbadamakis/Desktop/model_4/model_4.txt) model is syntactically correct data(C:/Documents and Settings/sbadamakis/Desktop/model_4/output1/data.txt) data loaded compile(1) model compiled inits(1,C:/Documents and Settings/sbadamakis/Desktop/model_4/output1/inits1.txt) model is initialized gen.inits() command #Bugs:gen.inits cannot be executed (is greyed out) thin.updater(1) update(0) set(beta) update(20) coda(*,C:/Documents and Settings/sbadamakis/Desktop/model_4/output1/coda) stats(*) Node statistics node mean sd MC error 2.5% median 97.5% start...
2009 Jul 16
1
Error with r2winbugs
...display(log) check(C:\DOCUME~1\CHRIST~1\LOCALS~1\Temp\Rtmpyg7eDj/susc.bug.txt) empty slot not allowed in variable name data(C:/DOCUME~1/CHRIST~1/LOCALS~1/Temp/Rtmpyg7eDj/data.txt) command #Bugs:data cannot be executed (is greyed out) compile(3) inits(1,C:/DOCUME~1/CHRIST~1/LOCALS~1/Temp/Rtmpyg7eDj/inits1.txt) command #Bugs:inits cannot be executed (is greyed out) inits(2,C:/DOCUME~1/CHRIST~1/LOCALS~1/Temp/Rtmpyg7eDj/inits2.txt) command #Bugs:inits cannot be executed (is greyed out) inits(3,C:/DOCUME~1/CHRIST~1/LOCALS~1/Temp/Rtmpyg7eDj/inits3.txt) command #Bugs:inits cannot be executed (is greyed ou...