runMC {PBSadmb} | R Documentation

## Run an Executable Binary File in MCMC Mode

### Description

Run the executable binary file `'prefix'.exe`, created by `makeAD`, to generate MCMC simulations.

### Usage

    runMC(prefix, nsims=2000, nthin=20, outsuff=".mc.dat",
          logfile=FALSE, add=TRUE, verbose=TRUE)

### Arguments

`prefix` | string name prefix of the ADMB project (e.g., `"vonb"`).
`nsims` | numeric scalar indicating number of MCMC simulations to perform.
`nthin` | numeric scalar indicating the sampling rate or thinning of the `nsims` MCMC simulations to report.
`outsuff` | string name suffix of the MCMC output data file.
`logfile` | logical: if `TRUE`, create a log file of the messages from the shell call.
`add` | logical: if `TRUE`, append shell call messages to an exsiting log file.
`verbose` | logical: if `TRUE`, report the shell call an its messages to the R console.

### Details

This function runs `'prefix'.exe` twice, first with the arguments `-mcmc 'nsims' -mcsave 'nthin'` and second with the argument `-mceval`. By default, output goes to the file `'prefix'.mc.dat`, although a user can specify a different output suffix.

To see this function in action, use the PBSadmb GUI with the example `vonb` or `simpleMC`.

### Value

Invisibly returns the results of the shell call.

### Note

A wrapper function that can be called from a GUI exists as `.win.runMC`.

### Author(s)

Jon T. Schnute, Pacific Biological Station, Nanaimo BC, Canada

### See Also

`runAD`, `makeAD`, `cleanAD`

[Package PBSadmb version 0.61.44 Index]