View source: R/functions_wrapper.R
sample_individual_estimates | R Documentation |
Sample individual estimates given their covariance.
sample_individual_estimates(
model,
individual_estimates,
individual_estimates_covariance,
parameters = NULL,
samples_per_id = 100,
seed = 1234
)
model |
(Model) Pharmpy model |
individual_estimates |
(data.frame) Individual estimates to use |
individual_estimates_covariance |
(data.frame) Uncertainty covariance of the individual estimates |
parameters |
(array(str) (optional)) A vector of a subset of individual parameters to sample. Default is NULL, which means all. |
samples_per_id |
(numeric) Number of samples per individual |
seed |
(numeric) Random number generator or seed |
(data.frame) Pool of samples in a DataFrame
sample_parameters_from_covariance_matrix : Sample parameter vectors using the
uncertainty covariance matrix
sample_parameters_uniformly : Sample parameter vectors using uniform distribution
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.