View source: R/functions_wrapper.R
| calculate_summary_statistic | R Documentation |
Calculate a summary statistic for an expression over the dataset
The expression can be a dataset column name, a variable from the model, e.g. a derived covariate or a matematical expression involving dataset columns or model variables. If a calculation involves population parameters, the initial estimates will be used.
calculate_summary_statistic(model, stat, expr, default = NULL)
model |
(Model) Pharmpy model |
stat |
(str) The summary statistic. Can be "max", "min", "median" or "mean" |
expr |
(str (optional)) A mathematical expression containing column or variable names |
default |
(numeric (optional)) An optional default value to use in case the statistic couldn't be calculated. For example if the model has no dataset. |
(numeric) The summary statistic
## Not run:
model <- load_example_model("pheno")
calculate_summary_statistic(model, "max", "TIME")
calculate_summary_statistic(model, "median", "log(WGT)")
calculate_summary_statistic(model, "median", "TVCL")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.