% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/brmsfit-helpers.R
\name{add_rstan_model}
\alias{add_rstan_model}
\title{Add compiled \pkg{rstan} models to \code{brmsfit} objects}
\usage{
add_rstan_model(x, overwrite = FALSE)
}
\arguments{
\item{x}{A \code{brmsfit} object to be updated.}

\item{overwrite}{Logical. If \code{TRUE}, overwrite any existing
\code{\link[rstan:stanmodel-class]{stanmodel}}. Defaults to \code{FALSE}.}
}
\value{
A (possibly updated) \code{brmsfit} object.
}
\description{
Compile a \code{\link[rstan:stanmodel-class]{stanmodel}} and add
it to a \code{brmsfit} object. This enables some advanced functionality
of \pkg{rstan}, most notably \code{\link[rstan:log_prob]{log_prob}}
and friends, to be used with brms models fitted with other Stan backends.
}
