calculate_individual_parameter_statistics {pharmr} | R Documentation |
calculate_individual_parameter_statistics
Description
Calculate statistics for individual parameters
Calculate the mean (expected value of the distribution), variance (variance of the distribution) and standard error for individual parameters described by arbitrary expressions. Any dataset column or variable used in the model can be used in the expression. The exception being that variables that depends on the solution of the ODE system cannot be used. If covariates are used in the expression the statistics of the parameter is calculated at the median value of each covariate as well as at the 5:th and 95:th percentiles. If no parameter uncertainty is available for the model the standard error will not be calculated.
Usage
calculate_individual_parameter_statistics(
model,
expr_or_exprs,
parameter_estimates,
covariance_matrix = NULL,
seed = NULL
)
Arguments
model |
(Model) A previously estimated model |
expr_or_exprs |
(array(BooleanExpr) or array(Expr) or array(str) or BooleanExpr or Expr or str) Parameter estimates |
parameter_estimates |
(array) Parameter uncertainty covariance matrix |
covariance_matrix |
(data.frame (optional)) expression or iterable of str or expressions Expressions or equations for parameters of interest. If equations are used the names of the left hand sides will be used as the names of the parameters. |
seed |
(numeric (optional)) Random number generator or integer seed |
Value
(data.frame) A DataFrame of statistics indexed on parameter and covariate value.
Examples
## Not run:
model <- load_example_model("pheno")
results <- load_example_modelfit_results("pheno")
rng <- create_rng(23)
pe <- results$parameter_estimates
cov <- results$covariance_matrix
calculate_individual_parameter_statistics(model, "K=CL/V", pe, cov, seed=rng)
## End(Not run)