remove_loq_data#

pharmpy.modeling.remove_loq_data(model, lloq=None, uloq=None, blq=None, alq=None, keep=0)[source]#

Remove loq data records from the dataset

Does nothing if none of the limits are specified.

Parameters:
  • model (Model) – Pharmpy model object

  • lloq (float or str) – Value or column name for lower limit of quantification.

  • uloq (float or str) – Value or column name for upper limit of quantification.

  • blq (str) – Column name for below limit of quantification indicator.

  • alq (str) – Column name for above limit of quantification indicator.

  • keep (int) – Number of loq records to keep for each run of consecutive loq records.

Returns:

Model – Pharmpy model object

Examples

>>> from pharmpy.modeling import *
>>> model = load_example_model("pheno")
>>> model = remove_loq_data(model, lloq=10, uloq=40)
>>> len(model.dataset)
736