Menu

max.time not working?

runjags
2015-08-14
2015-09-16
  • Jonathan Bartlett

    Hi again Matthew

    I am running using:

    modelFit <- autorun.jags(model="lin_reg_1.bug", monitor=jags.params,
    data=jags.data, n.chains=5, startsample=4000, method="parallel", max.time="1m",
    psrf.target=1.02, raftery.options=list(r=10))

    However, when convergence is problematic, autorun.jags does not seem to obey the specified max time. For example, on one simulated dataset I obtained (before manually stopping):

    ....
    All chains have finished
    Note: the model did not require adaptation
    Simulation complete. Reading coda files...
    Coda files loaded successfully
    Finished running the simulation
    Calculating the Gelman-Rubin statistic for 9 variables....
    The Gelman-Rubin statistic was still above 1.02 for 6 parameters after 289000 iterations taking 10.3 minutes
    (multi-variate psrf = 1.075).
    Extending the simulation to attempt to improve convergence...

    which had run for 10 minutes, despite my requested max time of 1 minute.

    Any assistance you can render would be much appreciated.

    Thanks
    Jonathan

     
  • Matt Denwood

    Matt Denwood - 2015-08-14

    Hi Jonathan

    Thanks for reporting this bug, which is now fixed in the development version. I had missed the units argument to a difftime call, so the maximum run time in seconds was being compared to the actual run length in minutes. I can't think of a workaround I'm afraid, but I will upload the fix to this website ASAP.

    Thanks again,

    Matt

     
  • Matt Denwood

    Matt Denwood - 2015-09-16

    Just to let you know that this bug is fixed in the version of runjags now on CRAN.

    Thanks again for taking the time to report the issue.

    Matt

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.