R: Extract Stan model code

stancode.brmsfit {brms} | R Documentation

## Extract Stan model code

### Description

Extract Stan code that was used to specify the model.

### Usage

    ## S3 method for class 'brmsfit'
    stancode(
      object,
      version = TRUE,
      regenerate = NULL,
      threads = NULL,
      backend = NULL,
      ...
    )

    stancode(object, ...)

### Arguments

`object` | An object of class `brmsfit`.
`version` | Logical; indicates if the first line containing the brms version number should be included. Defaults to `TRUE`.
`regenerate` | Logical; indicates if the Stan code should be regenerated with the current brms version. By default, `regenerate` will be `FALSE` unless required to be `TRUE` by other arguments.
`threads` | Controls whether the Stan code should be threaded. See `threading` for details.
`backend` | Controls the Stan backend. See `brm` for details.
`...` | Further arguments passed to `make_stancode` if the Stan code is regenerated.

### Value

Stan model code for further processing.

[Package brms version 2.17.0 Index]