# Dosing Functions

Table 62 shows the dosing functions that are available in the DERIVATIVES section and their parameters:-

Table 62 Dosing Functions
Name | Parameters
--- | ---
@bolus | amt/lag
@inf_rate | amt/lag/rate
@inf_dur | amt/lag/dur
@gamma | amt/lag/alpha/beta
@weibull | amt/lag/lambda/kappa

## @bolus

Example of Bolus dosing:-

    DERIVATIVES: |
        d[DEPOT] = @bolus{amt: c[AMT], lag: m[LAG]} - m[KE] * s[DEPOT]

This bolus dose will be activated by the ‘dose’ entry in the TYPE field of the PoPy data file. Note it is also possible to specify a named bolus dose as follows:-

    DERIVATIVES: |
        dose[my_bolus] = @bolus{amt: c[AMT], lag: m[LAG]}
        d[DEPOT] = dose[my_bolus] * s[DEPOT]

This bolus dose will be activated by the ‘dose:my_bolus’ entry in the TYPE field of the PoPy data file.

## @inf_rate

Example of infusion rate dosing:-

    DERIVATIVES: |
        d[DEPOT] = (
            @inf_rate{amt: c[AMT], lag: m[LAG], rate: c[RATE]}
            - m[KE] * s[DEPOT])

This infusion rate dose will be activated by the ‘dose’ entry in the TYPE field of the PoPy data file. Note it is also possible to specify a named infusion rate dose as follows:-

    DERIVATIVES: |
        dose[my_inf_rate] = @inf_rate{amt: c[AMT], lag: m[LAG], rate: c[RATE]}
        d[DEPOT] = dose[my_inf_rate] * s[DEPOT]

This infusion rate dose will be activated by the ‘dose:my_inf_rate’ entry in the TYPE field of the PoPy data file.

## @inf_dur

Example of infusion duration dosing:-

    DERIVATIVES: |
        d[DEPOT] = (
            @inf_dur{amt: c[AMT], lag: m[LAG], dur: c[DUR]}
            - m[KE] * s[DEPOT])

This infusion duration dose will be activated by the ‘dose’ entry in the TYPE field of the PoPy data file. Note it is also possible to specify a named infusion duration dose as follows:-

    DERIVATIVES: |
        dose[my_inf_dur] = @inf_dur{
            amt: c[AMT], lag: m[LAG], dur: c[DUR]}
        d[DEPOT] = dose[my_inf_dur] * s[DEPOT]

This infusion duration dose will be activated by the ‘dose:my_inf_dur’ entry in the TYPE field of the PoPy data file.

## @gamma

Example of gamma dosing:-

    DERIVATIVES: |
        d[DEPOT] = (
            @gamma{amt: c[AMT], lag: m[LAG],
                alpha: m[ALPHA], beta: m[BETA]}
            - m[KE] * s[DEPOT]
        )

This gamma dose will be activated by the ‘dose’ entry in the TYPE field of the PoPy data file. Note it is also possible to specify a named gamma dose as follows:-

    DERIVATIVES: |
        dose[my_gamma] = @gamma{
            amt: c[AMT], lag: m[LAG],
            alpha: m[ALPHA], beta: m[BETA]}
        d[DEPOT] = dose[my_gamma] * s[DEPOT]

This gamma dose will be activated by the ‘dose:my_gamma’ entry in the TYPE field of the PoPy data file.

## @weibull

Example of weibull dosing:-

    DERIVATIVES: |
        d[DEPOT] = (
            @weibull{
                amt: c[AMT], lag: m[LAG],
                lambda: m[LAMBDA], kappa: m[KAPPA]}
            - m[KE] * s[DEPOT]
        )

This weibull dose will be activated by the ‘dose’ entry in the TYPE field of the PoPy data file. Note it is also possible to specify a named weibull dose as follows:-

    DERIVATIVES: |
        dose[my_weibull] = @weibull{
            amt: c[AMT], lag: m[LAG],
            lambda: m[LAMBDA], kappa: m[KAPPA]}
        d[DEPOT] = dose[my_weibull] * s[DEPOT]

This weibull dose will be activated by the ‘dose:my_weibull’ entry in the TYPE field of the PoPy data file.