[Rd] possible tweaking of family()$simulate?

2013-08-27 Thread Ben Bolker
This should probably be submitted eventually as a wishlist to R-core, as it requires (minor) changes to base R, but I thought I would float it here first ... In a package, I construct glm()-like model objects that have 'family' components based on the GLM family objects (binomial(), poisson(

Re: [Rd] Error in simulation. NAN

2013-08-27 Thread Martyn Byng
Hi, You are going to have to track down exactly where the NaN is being produced. These usually occur due to performing invalid numerical operations, like trying to take the square-root of a negative number, trying to calculate 0/0 etc. Try adding a series of if / then blocks prior to performing a

[Rd] Error in simulation. NAN

2013-08-27 Thread gianluca.mastranto...@yahoo.it
Hi all, im triyng to implement a bayesian model with R and c++. I have a strange problem. I can't reproduce the error with a small script and then i post the original one. The problem is after the line for(MCMC_iter2=0;MCMC_iter2For the first 34 iterations all work fine, after, all the