View source: R/functions_wrapper.R
sample_parameters_uniformly | R Documentation |
Sample parameter vectors using uniform sampling
Each parameter value will be randomly sampled from a uniform distribution with the bounds being estimate ± estimate * fraction.
sample_parameters_uniformly(
model,
parameter_estimates,
fraction = 0.1,
force_posdef_samples = NULL,
n = 1,
seed = 1234,
scale = "normal"
)
model |
(Model) Pharmpy model |
parameter_estimates |
(array) Parameter estimates for parameters to use |
fraction |
(numeric) Fraction of estimate value to use for distribution bounds |
force_posdef_samples |
(numeric (optional)) Number of samples to reject before forcing variability parameters to give positive definite covariance matrices. |
n |
(numeric) Number of samples |
seed |
(numeric) Random number generator or seed |
scale |
(str) Scale to perform sampling on. Valid options are 'normal' and 'UCP' |
(data.frame) samples
sample_parameters_from_covariance_matrix : Sample parameter vectors using the
uncertainty covariance matrix
sample_individual_estimates : Sample individual estiates given their covariance
## Not run:
model <- load_example_model("pheno")
results <- load_example_modelfit_results("pheno")
rng <- create_rng(23)
pe <- results$parameter_estimates
sample_parameters_uniformly(model, pe, n=3, seed=rng)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.