% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sg-predist-sim.R
\name{sg_predist_sim}
\alias{sg_predist_sim}
\title{Perform simulations for prediction distribution plots}
\usage{
sg_predist_sim(fpath_i, model, time_col = "TIME", outputs = NULL, npop = 500)
}
\arguments{
\item{fpath_i}{String or sg-fit object. If the string is given, the path to
\code{.Rdata} or \code{.json} file with sg-fit object is expected.}

\item{model}{A model object passed to \code{sg_sim()}.}

\item{time_col}{String. The column to use as a time column. Currently, can be only \code{TIME}. Default is \code{TIME}.}

\item{outputs}{Vector of strings. Names of the model variables to output.
If \code{NULL}, all variables returned. Default is \code{NULL}.}

\item{npop}{Integer. Number of population replicates. Default is 1.}
}
\value{
A dataset with simulation results
}
\description{
Perform simulations for prediction distribution plots
}
\examples{
\donttest{
library(rxode2)
fpath_i <- system.file("extdata", "simurg_object", "Warfarin_PK.RData", package = "SimuRg")
mod_fin <- rxode2({
  # Differential equations
  d/dt(Ad) = -ka * Ad
  d/dt(Ac) = ka * Ad - Cl/V * Ac
  # Concentration calculations
  Cc = Ac / V
})
sg_predist_sim(fpath_i, mod_fin, outputs = "Cc")
}
}
