# Typical Workflows

## Developing a PK/PD model for a real life Data Set

A typical task for a PK/PD modeller is deducing a model given a data set collected from patients. It is usually best to take pre-existing knowledge about the PK and PD of the drug and use this as a starting point to create an initial model. You can then explore more complex models by adding new parameters and comparing the fitted `f[X]` and objective value obtained with the new model, to prior models. In PoPy you can achieve this by developing a series of fit scripts, running each script and examining the outputs.

To help with this process the potential child scripts of an individual Fit Script are summarised in Fig. 4.

Fig. 4 Hierarchy of child scripts for a parent Fit Script.

The child scripts are automatically generated by PoPy in order to facilitate other tasks you may wish to perform. Each child script is optionally generated by an entry in the OUTPUT_SCRIPTS section of the Fit Script.

For example a Sim Script will plot a dense PK or PD curve for each individual and you can see where your current model may not be matching the data set and where the model is extrapolating.

An MSim Script allows you to easily generate a VPC plot, which allow you to see how your current model compares to the data set for the whole population. As a VPC tests the distributional assumptions of the model as well as the fit to each individual, it is a rigorous test for a population model.

## Investigate a PK/PD model using synthetic data

If you do not have a real life data set or just wish to carry out a more theoretical investigation you can use PoPy’s tools to generate artificial data. This approach has the benefit of allowing you to create data sets with known properties and test hypotheses about the identifiability of parameters. The primary tool to do this in PoPy is the Tut Script, see Generate data and Fit using Simple PopPK Model for a run through of using a tut script. The potential child scripts of a Tut Script are shown in Fig. 5.

Fig. 5 Hierarchy of child scripts for a parent Tut Script.

Another tool for investigating models using artificial data in PoPy is the MTut Script. See Generate multiple data sets and Fit using Simple PopPK Model for a run through of using a MTut script. The potential child scripts of a MTut Script are shown in Fig. 6.

Fig. 6 Hierarchy of child scripts for a parent MTut Script.

## Next Steps

You can familiarise yourself with more PoPy examples our overview of PK/PD concepts:-

- Principles of Pharmacokinetics
- Population Models in PoPy

Or examine our PoPy Example Models.