:orphan: 





.. _advan3trans6_pop_tut:



Nonmem ADVAN3 TRANS6 example
############################

[Generated automatically as a Tutorial summary]

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


:Name: advan3trans6_pop

:Title: Nonmem ADVAN3 TRANS6 example

:Author: PoPy for PK/PD

:Abstract: 

| ADVAN 3 TRANS6 problem. Central compartment with a peripheral compartment.
| trans 6 parameters:-
| * K21 is the rate from the peripheral to the central compartment
| * ALPHA
| * BETA
| map to advan3 parameters:-
| * K21 = K21
| * K12 = ALPHA+BETA-K21-K
| * KE = APLHA*BETA/K21
| ALPHA<K21<BETA. This must be true for model to work.

:Keywords: advan3; trans6; two compartment model

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

:Diagram: 


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


Comparison
**********



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


.. code-block:: pyml

    -3360.5554



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


.. code-block:: pyml

    -3364.1589



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[ALPHA] = 0.1970
    f[DIFFALPHAK21] = 0.2996
    f[DIFFK21BETA] = 0.3022
    f[PNOISE] = 0.0099
    f[ANOISE] = 0.0096
    f[ALPHA_isv,DIFFALPHAK21_isv,DIFFK21BETA_isv] = [
        [ 0.0968, -0.0011, -0.0008 ],
        [ -0.0011, 0.0525, 0.0028 ],
        [ -0.0008, 0.0028, 0.0124 ],
    ]



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


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


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


* Gen: :ref:`advan3trans6_pop_gen` (gen)
* Fit: :ref:`advan3trans6_pop_fit` (fit)

Inputs
******



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

.. code-block:: pyml

    f[ALPHA] = 0.2000
    f[DIFFALPHAK21] = 0.3000
    f[DIFFK21BETA] = 0.3000
    f[PNOISE] = 0.0100
    f[ANOISE] = 0.0100
    f[ALPHA_isv,DIFFALPHAK21_isv,DIFFK21BETA_isv] = [
        [ 0.1000, 0.0000, 0.0000 ],
        [ 0.0000, 0.0500, 0.0000 ],
        [ 0.0000, 0.0000, 0.0200 ],
    ]



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

.. code-block:: pyml

    f[ALPHA] = 0.1000
    f[DIFFALPHAK21] = 0.2000
    f[DIFFK21BETA] = 0.2000
    f[PNOISE] = 0.0500
    f[ANOISE] = 0.0500
    f[ALPHA_isv,DIFFALPHAK21_isv,DIFFK21BETA_isv] = [
        [ 0.0400, 0.0000, 0.0000 ],
        [ 0.0000, 0.0800, 0.0000 ],
        [ 0.0000, 0.0000, 0.0700 ],
    ]

