Learn R Programming

pharmr (version 1.4.0)

evaluate_expression: evaluate_expression

Description

Evaluate expression using model

Calculate the value of expression for each data record. The expression can contain dataset columns, variables in model and population parameters. If the model has parameter estimates these will be used. Initial estimates will be used for non-estimated parameters.

Usage

evaluate_expression(model, expression, parameter_estimates = NULL)

Value

(data.frame) A series of one evaluated value for each data record

Arguments

model

(Model) Pharmpy model

expression

(str or numeric or Expr) Expression to evaluate

parameter_estimates

(list(str=numeric) (optional)) Parameter estimates to use instead of initial estimates

Examples

Run this code
if (FALSE) {
model <- load_example_model("pheno")
results <- load_example_modelfit_results("pheno")
pe <- results$parameter_estimates
evaluate_expression(model, "TVCL*1000", parameter_estimates=pe)
}

Run the code above in your browser using DataLab