% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_sim.r
\name{sample_sim}
\alias{sample_sim}
\title{Sample model parameters for a simulation}
\usage{
sample_sim(nrepl = 2, nsub = 3, type = "noIIV", ...)
}
\arguments{
\item{nrepl}{Number of replicates for the simulation}

\item{nsub}{Number of subjects for the simulation}

\item{type}{character with the type of simulation to perform (see details)}

\item{...}{Additional arguments passed to \link{sample_par}
mainly for passing information for ext and cov files}
}
\value{
a dataframe with sampled values
}
\description{
This function samples parameters for a simulation. It wraps around the \link{sample_par} function on the background
}
\details{
This function is a high level function wrapper for the \code{sample_par} function specified
for different types of simulations that might occur. Currently the following situations can be sampled:
\itemize{
\item \code{noIIV}: Sample without uncertainty and without IIV
\item \code{sameIIV}: Sample without uncertainty and with the same IIV values within subjects
\item \code{varIIV}: Sample without uncertainty and with different IIV values within subjects
\item \code{unc_noIIV}: Sample with uncertainty and without IIV
\item \code{unc_sameIIV}: Sample with uncertainty and and with the same IIV values within subjects
\item \code{unc_varIIV}: Sample with uncertainty and with different IIV values within subjects
}

In all the cases above where uncertainty is sampled, this is done only for THETA values.
}
\examples{

ext <- system.file("example_models","PK.1CMT.ORAL.COV.ext", package = "amp.sim")
cov <- system.file("example_models","PK.1CMT.ORAL.COV.cov", package = "amp.sim")
sample_sim(nrepl=2,nsub=3,type="unc_varIIV", ext=ext,cov=cov)
sample_sim(nrepl=2,nsub=3,type="sameIIV", ext=ext)

}
\author{
Richard Hooijmaijers
}
