:orphan: 





.. _builtin_tut_example_fit:



First order absorption model with peripheral compartment
########################################################

[Generated automatically as a Fitting summary]

Model Description
*****************


:Name: builtin_tut_example

:Title: First order absorption model with peripheral compartment

:Author: PoPy for PK/PD

:Abstract: 

| A two compartment PK model with bolus dose and
| first order absorption, similar to a Nonmem advan4trans4 model.

:Keywords: tutorial; pk; advan4; dep_two_cmp; first order

:Input Script: :download:`builtin_tut_example_fit.pyml <builtin_tut_example_fit.pyml>`

:Diagram: 


.. thumbnail:: builtin_tut_example_fit.pyml_output/compartment_diagram.svg
    :width: 200px


Comparison
**********



Compare Main f[X]
=================


===============  ================  ==============  ============  =============
Variable Name      Starting Value    Fitted Value    Abs Change    Prop Change
===============  ================  ==============  ============  =============
f[KA]                      1.0000          0.2148        0.7852         0.7852
f[CL]                      1.0000          1.7896        0.7896         0.7896
f[V1]                     20.0000         55.4580       35.4580         1.7729
f[Q]                       0.5000          1.0564        0.5564         1.1127
f[V2]                    100.0000        486.5705      386.5705         3.8657
===============  ================  ==============  ============  =============

Compare Noise f[X]
==================


===============  ================  ==============  ============  =============
Variable Name      Starting Value    Fitted Value    Abs Change    Prop Change
===============  ================  ==============  ============  =============
f[PNOISE]                  0.1000          0.1415        0.0415         0.4150
===============  ================  ==============  ============  =============

Compare Variance f[X]
=====================


================  ================  ==============  ============  =============
Variable Name       Starting Value    Fitted Value    Abs Change    Prop Change
================  ================  ==============  ============  =============
f[KA_isv]                   0.0500          0.1393        0.0893         1.7851
f[KA_isv;CL_isv]            0.0100         -0.0553        0.0653         6.5338
f[KA_isv;V1_isv]            0.0100          0.0414        0.0314         3.1414
f[KA_isv;Q_isv]             0.0100         -0.0256        0.0356         3.5613
f[KA_isv;V2_isv]            0.0100          0.1217        0.1117        11.1686
f[CL_isv;KA_isv]            0.0100         -0.0553        0.0653         6.5338
f[CL_isv]                   0.0500          0.0808        0.0308         0.6152
f[CL_isv;V1_isv]            0.0100         -0.0070        0.0170         1.7017
f[CL_isv;Q_isv]             0.0100         -0.0061        0.0161         1.6060
f[CL_isv;V2_isv]            0.0100         -0.1784        0.1884        18.8430
f[V1_isv;KA_isv]            0.0100          0.0414        0.0314         3.1414
f[V1_isv;CL_isv]            0.0100         -0.0070        0.0170         1.7017
f[V1_isv]                   0.0500          0.1098        0.0598         1.1954
f[V1_isv;Q_isv]             0.0100         -0.0827        0.0927         9.2702
f[V1_isv;V2_isv]            0.0100          0.2139        0.2039        20.3938
f[Q_isv;KA_isv]             0.0100         -0.0256        0.0356         3.5613
f[Q_isv;CL_isv]             0.0100         -0.0061        0.0161         1.6060
f[Q_isv;V1_isv]             0.0100         -0.0827        0.0927         9.2702
f[Q_isv]                    0.0500          0.3173        0.2673         5.3459
f[Q_isv;V2_isv]             0.0100         -0.3239        0.3339        33.3914
f[V2_isv;KA_isv]            0.0100          0.1217        0.1117        11.1686
f[V2_isv;CL_isv]            0.0100         -0.1784        0.1884        18.8430
f[V2_isv;V1_isv]            0.0100          0.2139        0.2039        20.3938
f[V2_isv;Q_isv]             0.0100         -0.3239        0.3339        33.3914
f[V2_isv]                   0.0500          0.9443        0.8943        17.8859
================  ================  ==============  ============  =============

Individual simulated (sim) plots
================================



.. thumbnail:: images/fit_sim_grph_outputs/indOBS_vs_TIME/000001.svg
    :width: 200px


.. thumbnail:: images/fit_sim_grph_outputs/indOBS_vs_TIME/000002.svg
    :width: 200px


.. thumbnail:: images/fit_sim_grph_outputs/indOBS_vs_TIME/000003.svg
    :width: 200px


Alternatively see :ref:`builtin_tut_example_simulated_sim_plots`

Population simulated (sim) plots
================================


(No population graphs were requested.)

Outputs
*******



Final objective value
=====================

.. code-block:: pyml

    -863.1496


which required 1.30 iterations and took 60.89 seconds

Fitted f[X] values (after fitting)
==================================


.. code-block:: pyml

    f[KA] = 0.2148
    f[CL] = 1.7896
    f[V1] = 55.4580
    f[Q] = 1.0564
    f[V2] = 486.5705
    f[KA_isv,CL_isv,V1_isv,Q_isv,V2_isv] = [
        [ 0.1393, -0.0553, 0.0414, -0.0256, 0.1217 ],
        [ -0.0553, 0.0808, -0.0070, -0.0061, -0.1784 ],
        [ 0.0414, -0.0070, 0.1098, -0.0827, 0.2139 ],
        [ -0.0256, -0.0061, -0.0827, 0.3173, -0.3239 ],
        [ 0.1217, -0.1784, 0.2139, -0.3239, 0.9443 ],
    ]
    f[PNOISE] = 0.1415



Fitted parameter .csv files
===========================


:Fixed Effects: :download:`fx_params.csv (fit) <builtin_tut_example_fit.pyml_output/solN/fx_params.csv>`

:Random Effects: :download:`rx_params.csv (fit) <builtin_tut_example_fit.pyml_output/solN/rx_params.csv>`

:Model params: :download:`mx_params.csv (fit) <builtin_tut_example_fit.pyml_output/solN/mx_params.csv>`

:State values: :download:`sx_params.csv (fit) <builtin_tut_example_fit.pyml_output/solN/sx_params.csv>`

:Predictions: :download:`px_params.csv (fit) <builtin_tut_example_fit.pyml_output/solN/px_params.csv>`

:Likelihoods: :download:`lx_params.csv (fit) <builtin_tut_example_fit.pyml_output/solN/lx_params.csv>`



Inputs
******


:Input Data: :download:`cx_obs_params.csv <cx_obs_params.csv>`


Starting f[X] values (before fitting)
=====================================


.. code-block:: pyml

    f[KA] = 1.0000
    f[CL] = 1.0000
    f[V1] = 20.0000
    f[Q] = 0.5000
    f[V2] = 100.0000
    f[KA_isv,CL_isv,V1_isv,Q_isv,V2_isv] = [
        [ 0.0500, 0.0100, 0.0100, 0.0100, 0.0100 ],
        [ 0.0100, 0.0500, 0.0100, 0.0100, 0.0100 ],
        [ 0.0100, 0.0100, 0.0500, 0.0100, 0.0100 ],
        [ 0.0100, 0.0100, 0.0100, 0.0500, 0.0100 ],
        [ 0.0100, 0.0100, 0.0100, 0.0100, 0.0500 ],
    ]
    f[PNOISE] = 0.1000

