omit_data#

pharmpy.modeling.omit_data(dataset_or_model, group, name_pattern='omitted_{}')[source]#

Iterate over omissions of a certain group in a dataset. One group is omitted at a time.

Parameters:
  • dataset_or_model (pd.DataFrame or Model) – Dataset or model for which to omit records

  • group (str) – Name of the column to use for grouping

  • name_pattern (str) – Name to use for generated datasets. A number starting from 1 will be put in the placeholder.

Returns:

iterator – Iterator yielding tuples of models/dataframes and the omitted group