transform_etas_boxcox#
- pharmpy.modeling.transform_etas_boxcox(model, list_of_etas=None)[source]#
Applies a boxcox transformation to selected etas
Initial estimate for lambda is 0.1 with bounds (-3, 3).
- Parameters:
model (Model) – Pharmpy model to apply boxcox transformation to.
list_of_etas (str, list) – Name/names of etas to transform. If None, all etas will be transformed (default).
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model = transform_etas_boxcox(model, ["ETA_CL"]) >>> model.statements.before_odes.full_expression("CL") POP_CL*WGT*exp((exp(ETA_CL)**lambda1 - 1)/lambda1)