:orphan: 





.. _tut_example1_fit:



Simple Tut Example
##################

[Generated automatically as a Fitting summary]

Inputs
******



Description
===========

:Name: tut_example1

:Title: Simple Tut Example

:Author: J.R. Hartley

:Abstract: 

| One compartment model with elimination rate constant KE.

:Keywords: one compartment model; iv_one_cmp_k

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

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

:Diagram: 


.. thumbnail:: tut_example1_fit.pyml_output/fit/compartment_diagram.svg
    :width: 200px


Initial fixed effect estimates
==============================

.. code-block:: pyml

    f[KE] = 0.05
    f[PNOISE] = 0.1
    f[KE_isv] = 0.1



Outputs
*******



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

.. code-block:: pyml

    -48.4359049133


which required 8 iterations and took 7.04 seconds

Final fitted fixed effects
==========================

.. code-block:: pyml

    f[KE] = 0.10617
    f[PNOISE] = 0.044936
    f[KE_isv] = 0.02739



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


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

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

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

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

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



Plots
*****



Dense sim plots
===============



.. thumbnail:: images/fit_dense/000000.svg
    :width: 200px


.. thumbnail:: images/fit_dense/000001.svg
    :width: 200px


.. thumbnail:: images/fit_dense/000002.svg
    :width: 200px


Alternatively see :ref:`tut_example1_dense_sim_plots`

Comparison
**********



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


===============  ==============  ================  =============  ============
Variable Name      Fitted Value    Starting Value    Prop Change    Abs Change
===============  ==============  ================  =============  ============
f[KE]                  0.106171              0.05        1.12343     0.0561713
===============  ==============  ================  =============  ============

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


===============  ==============  ================  =============  ============
Variable Name      Fitted Value    Starting Value    Prop Change    Abs Change
===============  ==============  ================  =============  ============
f[PNOISE]             0.0449363               0.1       0.550637     0.0550637
===============  ==============  ================  =============  ============

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


===============  ==============  ================  =============  ============
Variable Name      Fitted Value    Starting Value    Prop Change    Abs Change
===============  ==============  ================  =============  ============
f[KE_isv]             0.0273899               0.1       0.726101     0.0726101
===============  ==============  ================  =============  ============