: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.1762        0.8238         0.8238
f[CL]                      1.0000          2.0490        1.0490         1.0490
f[V1]                     20.0000         47.0285       27.0285         1.3514
f[Q]                       0.5000          1.2403        0.7403         1.4805
f[V2]                    100.0000         62.1150       37.8850         0.3789
===============  ================  ==============  ============  =============

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


===============  ================  ==============  ============  =============
Variable Name      Starting Value    Fitted Value    Abs Change    Prop Change
===============  ================  ==============  ============  =============
f[PNOISE]                  0.1000          0.1411        0.0411         0.4113
===============  ================  ==============  ============  =============

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


================  ================  ==============  ============  =============
Variable Name       Starting Value    Fitted Value    Abs Change    Prop Change
================  ================  ==============  ============  =============
f[KA_isv]                   0.0500          0.0714        0.0214         0.4280
f[KA_isv;CL_isv]            0.0100          0.0735        0.0635         6.3503
f[KA_isv;V1_isv]            0.0100         -0.0075        0.0175         1.7472
f[KA_isv;Q_isv]             0.0100         -0.1399        0.1499        14.9949
f[KA_isv;V2_isv]            0.0100         -0.0601        0.0701         7.0141
f[CL_isv;KA_isv]            0.0100          0.0735        0.0635         6.3503
f[CL_isv]                   0.0500          0.1422        0.0922         1.8435
f[CL_isv;V1_isv]            0.0100         -0.0039        0.0139         1.3947
f[CL_isv;Q_isv]             0.0100         -0.1256        0.1356        13.5620
f[CL_isv;V2_isv]            0.0100         -0.2318        0.2418        24.1773
f[V1_isv;KA_isv]            0.0100         -0.0075        0.0175         1.7472
f[V1_isv;CL_isv]            0.0100         -0.0039        0.0139         1.3947
f[V1_isv]                   0.0500          0.0894        0.0394         0.7890
f[V1_isv;Q_isv]             0.0100          0.0483        0.0383         3.8312
f[V1_isv;V2_isv]            0.0100          0.1059        0.0959         9.5884
f[Q_isv;KA_isv]             0.0100         -0.1399        0.1499        14.9949
f[Q_isv;CL_isv]             0.0100         -0.1256        0.1356        13.5620
f[Q_isv;V1_isv]             0.0100          0.0483        0.0383         3.8312
f[Q_isv]                    0.0500          0.3014        0.2514         5.0282
f[Q_isv;V2_isv]             0.0100          0.0929        0.0829         8.2925
f[V2_isv;KA_isv]            0.0100         -0.0601        0.0701         7.0141
f[V2_isv;CL_isv]            0.0100         -0.2318        0.2418        24.1773
f[V2_isv;V1_isv]            0.0100          0.1059        0.0959         9.5884
f[V2_isv;Q_isv]             0.0100          0.0929        0.0829         8.2925
f[V2_isv]                   0.0500          0.6551        0.6051        12.1021
================  ================  ==============  ============  =============

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

    -894.0829


which required 1.30 iterations and took 71.98 seconds

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


.. code-block:: pyml

    f[KA] = 0.1762
    f[CL] = 2.0490
    f[V1] = 47.0285
    f[Q] = 1.2403
    f[V2] = 62.1150
    f[KA_isv,CL_isv,V1_isv,Q_isv,V2_isv] = [
        [ 0.0714, 0.0735, -0.0075, -0.1399, -0.0601 ],
        [ 0.0735, 0.1422, -0.0039, -0.1256, -0.2318 ],
        [ -0.0075, -0.0039, 0.0894, 0.0483, 0.1059 ],
        [ -0.1399, -0.1256, 0.0483, 0.3014, 0.0929 ],
        [ -0.0601, -0.2318, 0.1059, 0.0929, 0.6551 ],
    ]
    f[PNOISE] = 0.1411



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

