:orphan: 





.. _builtin_tut_example_tut:



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

[Generated automatically as a Tutorial 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.pyml <builtin_tut_example.pyml>`

:Diagram: 


.. thumbnail:: compartment_diagram.svg
    :width: 200px


Comparison
**********



True objective value
====================


.. code-block:: pyml

    -847.4635



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


.. code-block:: pyml

    -863.1496



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



.. csv-table:: 
    :file: fx_comp_main.csv
    :header-rows: 1


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



.. csv-table:: 
    :file: fx_comp_noise.csv
    :header-rows: 1


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



.. csv-table:: 
    :file: fx_comp_variance.csv
    :header-rows: 1


Outputs
*******



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



Generated data .csv file
========================


:Synthetic Data: :download:`synthetic_data.csv <synthetic_data.csv>`


Gen and Fit Summaries
=====================


* Gen: :ref:`builtin_tut_example_gen` (gen)
* Fit: :ref:`builtin_tut_example_fit` (fit)

Inputs
******



True f[X] values (for simulation)
=================================

.. code-block:: pyml

    f[KA] = 0.2000
    f[CL] = 2.0000
    f[V1] = 50.0000
    f[Q] = 1.0000
    f[V2] = 80.0000
    f[KA_isv,CL_isv,V1_isv,Q_isv,V2_isv] = [
        [ 0.1000, 0.0100, 0.0100, 0.0100, 0.0100 ],
        [ 0.0100, 0.0300, -0.0100, 0.0200, 0.0200 ],
        [ 0.0100, -0.0100, 0.0900, 0.0100, 0.0100 ],
        [ 0.0100, 0.0200, 0.0100, 0.0700, 0.0100 ],
        [ 0.0100, 0.0200, 0.0100, 0.0100, 0.0500 ],
    ]
    f[PNOISE] = 0.1500



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

