sample_parameters_uniformly {pharmr} | R Documentation |
sample_parameters_uniformly
Description
Sample parameter vectors using uniform sampling
Each parameter value will be randomly sampled from a uniform distribution with the bounds being estimate ± estimate * fraction.
Usage
sample_parameters_uniformly(
model,
parameter_estimates,
fraction = 0.1,
force_posdef_samples = NULL,
n = 1,
seed = NULL,
scale = "normal"
)
Arguments
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 (optional)) Random number generator or seed |
scale |
(str) Scale to perform sampling on. Valid options are 'normal' and 'UCP' |
Value
(data.frame) samples
See Also
sample_parameters_from_covariance_matrix : Sample parameter vectors using the
uncertainty covariance matrix
sample_individual_estimates : Sample individual estiates given their covariance
Examples
## 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)