Re: [R] Metropolis-Hastings within Gibbs coding error

2007-12-04 Thread Duncan Murdoch
On 12/4/2007 11:06 AM, Mohammad Ehsanul Karim wrote: > Dear list, > > After running for a while, it crashes and gives the following error message: > can anybody suggest how to deal with this? > > Error in if (ratio0[i] < log(runif(1))) { : > missing value where TRUE/FALSE needed Use options(

[R] Metropolis-Hastings within Gibbs coding error

2007-12-04 Thread Mohammad Ehsanul Karim
Dear list, After running for a while, it crashes and gives the following error message: can anybody suggest how to deal with this? Error in if (ratio0[i] < log(runif(1))) { : missing value where TRUE/FALSE needed ### original program p2 <- function (Nsim=1000){ x<