% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_wrapper.R
\name{sample_individual_estimates}
\alias{sample_individual_estimates}
\title{sample_individual_estimates}
\usage{
sample_individual_estimates(
  model,
  individual_estimates,
  individual_estimates_covariance,
  parameters = NULL,
  samples_per_id = 100,
  seed = 1234
)
}
\arguments{
\item{model}{(Model) Pharmpy model}

\item{individual_estimates}{(data.frame) Individual estimates to use}

\item{individual_estimates_covariance}{(data.frame) Uncertainty covariance of the individual estimates}

\item{parameters}{(array(str) (optional)) A vector of a subset of individual parameters to sample. Default is NULL, which means all.}

\item{samples_per_id}{(numeric) Number of samples per individual}

\item{seed}{(numeric) Random number generator or seed}
}
\value{
(data.frame) Pool of samples in a DataFrame
}
\description{
Sample individual estimates given their covariance.
}
\examples{
\dontrun{
model <- load_example_model("pheno")
results <- load_example_modelfit_results("pheno")
rng <- create_rng(23)
ie <- results$individual_estimates
iec <- results$individual_estimates_covariance
sample_individual_estimates(model, ie, iec, samples_per_id=2, seed=rng)
}
}
\seealso{
sample_parameters_from_covariance_matrix : Sample parameter vectors using the

uncertainty covariance matrix

sample_parameters_uniformly : Sample parameter vectors using uniform distribution
}
