% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_wrapper.R
\name{set_n_transit_compartments}
\alias{set_n_transit_compartments}
\title{set_n_transit_compartments}
\usage{
set_n_transit_compartments(model, keep_depot = TRUE)
}
\arguments{
\item{model}{(Model) Pharmpy model}

\item{keep_depot}{(logical) FALSE to convert depot compartment into a transit compartment}
}
\value{
(Model) Updated Pharmpy model
}
\description{
Set the n-transit compartments model

This is the absorption delay model where the number of transit compartments is a parameter
to be estimated (1) (2). Initial estimate for absorption rate is
set the previous rate if available, otherwise it is set to the time of first observation/2.
Initial estimate for the number of transit compartments is set to 2.

Currently only handles a single oral route of administration.
Assumes complete absorption between doses

(1) Savic, R.M., Jonker, D.M., Kerbusch, T. et al.
Implementation of a transit compartment model for describing drug absorption
in pharmacokinetic studies.
J Pharmacokinet Pharmacodyn 34, 711–726 (2007).
https://doi.org/10.1007/s10928-007-9066-0

(2) Shen, J., Boeckmann, A. & Vick, A.
Implementation of dose superimposition to introduce multiple doses for a
mathematical absorption model (transit compartment model).
J Pharmacokinet Pharmacodyn 39, 251–262 (2012).
https://doi.org/10.1007/s10928-012-9247-3
}
\examples{
\dontrun{
model <- load_example_model("pheno")
model <- set_n_transit_compartments(model)
}
}
\seealso{
add_lag_time

set_transit_compartments
}
