Description Usage Arguments Value

Run an MCMC using an ADMB model, return (1) the posterior draws, MLE fits and covariance/correlation matrices, and some MCMC convergence diagnostics using CODA.

Run an MCMC using an ADMB model, return (1) the posterior draws, MLE fits and covariance/correlation matrices, and some MCMC convergence diagnostics using CODA.

1 2 3 4 5 6 7 8 9 10 11 | ```
run_admb_mcmc(model.path, model.name, iter, mcsave, burn.in, cov.user = NULL,
init.pin = NULL, se.scale = NULL, mcscale = FALSE, mcseed = NULL,
mcrb = NULL, mcdiag = FALSE, mcprobe = NULL, verbose = TRUE,
extra.args = NULL, hybrid = FALSE, hyeps = NULL, hynstep = NULL,
mceval = FALSE, estimate = FALSE)
run_admb_mcmc(model.path, model.name, iter, mcsave, burn.in, cov.user = NULL,
init.pin = NULL, se.scale = NULL, mcscale = FALSE, mcseed = NULL,
mcrb = NULL, mcdiag = FALSE, mcprobe = NULL, verbose = TRUE,
extra.args = NULL, hybrid = FALSE, hyeps = NULL, hynstep = NULL,
mceval = FALSE, estimate = FALSE)
``` |

`model.path` |
(Character) A path to the folder containing the model. NULL indicates the current folder. |

`iter` |
(Integer) The number of draws after thinning and burn in. |

`mcsave` |
(Integer) Controls thinning of samples. Save every mcsave value, such that 1 corresponds to keeping all draws, and 100 saving every 100th draw. |

`burn.in` |
(Integer) How many samples to discard from the beginning of the chain, *after* thining. The burn in period (i.e., the first burn.in*mcsave draws) should be at least large enough to cover dynamic scaling. |

`cov.user` |
(Numeric matrix) A manually defined covariance matrix (in bounded space) to use in the Metropolis-Hastings algorithm. |

`init.pin` |
(Numeric vector) A vector of initial values, which are written to file and used in the model via the -mcpin option. |

`se.scale` |
(Numeric) A value which scales all of the variances from the MLE fit. A value of 1 indicates to use the estimated variances. |

`mcscale` |
(Logical) Whether to use the mcscale option, which dynamically scales the covariance matrix for efficient acceptance ratios. |

`mcseed` |
(Integer) Which seed (integer value) to pass ADMB. Used for reproducibility. |

`mcrb` |
(Integer) Which value to use in the rescale bounded algorithm. Must be an integer from 1-9. The default NULL value disables this feature. See the vignette for more information on this algorithm and how to best use it. |

`mcdiag` |
(Logical) Whether to use the |

`verbose` |
(Logical) Whether to print ADMB warnings and other information. Useful for testing and troubleshooting. |

`extra.args` |
(Character) A string which is passed to ADMB at runtime. Useful for passing additional arguments to the model executable. |

`hyeps` |
(Numeric) The size of the leapfrog jump in the hybrid method, with smaller values leading to smaller but more accurate jumps. Must be a positive value. |

`hynstep` |
(Integer) The approximate number of steps used in the
leapfrog step of the hybrid algorithm. Steps are randomly generated for
each MCMC iteration, centered around |

`mode.name` |
(Character) The name of the model executable. A character string, without '.exe'. |

`thin` |
(Integer) Controls thinning of samples. Save every thin value, such that 1 corresponds to keeping all draws, and 100 saving every 100th draw. |

`warmup` |
(Integer) How many samples to discard from the beginning of the chain, *after* thining. The burn in period (i.e., the first warmup*thin draws) should be at least large enough to cover dynamic scaling. |

`init` |
(Numeric vector) A vector of initial values, which are written to file and used in the model via the -mcpin option. |

`eps` |
(Numeric) The size of the leapfrog jump in the hybrid method, with smaller values leading to smaller but more accurate jumps. Must be a positive value. |

`model.path` |
(Character) A path to the folder containing the model. NULL indicates the current folder. |

`mode.name` |
(Character) The name of the model executable. A character string, without '.exe'. |

`iter` |
(Integer) The number of draws after thinning and burn in. |

`cov.user` |
(Numeric matrix) A manually defined covariance matrix (in bounded space) to use in the Metropolis-Hastings algorithm. |

`mcseed` |
(Integer) Which seed (integer value) to pass ADMB. Used for reproducibility. |

`mcdiag` |
(Logical) Whether to use the |

`hyrbid` |
(Logical) Whether to use the Hamiltonial (hybrid) algorithm. Default is FALSE. |

`verbose` |
(Logical) Whether to print ADMB warnings and other information. Useful for testing and troubleshooting. |

`extra.args` |
(Character) A string which is passed to ADMB at runtime. Useful for passing additional arguments to the model executable. |

Returns a list containing (1) the posterior draws, (2) and
object of class 'admb', read in using the results read in using
`read_admb`

, and (3) some MCMC convergence diagnostics using CODA.

Returns a list containing (1) the posterior draws, (2) and
object of class 'admb', read in using the results read in using
`read_admb`

, and (3) some MCMC convergence diagnostics using CODA.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.