run_stan_model: Run a compiled STAN model.

Description Usage Arguments Value

Description

This is a simple wrapper for running an already compiled Stan model via the commmand line. It does not handle multiple chains; this could be handled with a loop.

Usage

1
2
  run_stan_model(model, data = NULL, init = NULL,
    samples = NULL, stdout = "", stderr = "", ...)

Arguments

model

character The path to the compiled STAN model.

data

list with data or character specifying the file name. If NULL, do not pass any data.

init

list with data; character specifying the file name; If NULL, do not set initial values.

samples

character Path in which to save the samples. The default is a temporary file.

stdout

Passed to system2.

stderr

Passed to system2.

...

Options to be passed to the command line. The arguments names and values of the arguments in ... are converted to command line arguments. E.g. the argument seed=1234 produces the command line option --seed=1234. To specify a boolean option, set the argument to TRUE. E.g. test_grad=TRUE becomes --test_grad.

Value

Invisibly returns a character vector with the name of the output file.


jrnold/stanmisc documentation built on May 20, 2019, 2:06 a.m.