.. _covariance:

COVARIANCE
#################

An optional section that requests |popy| to compute :ref:`standard_errors` of the |fx| variables, after running a :ref:`fit_script`.

The |covariance| option is only available in a :ref:`fit_script` or :ref:`tut_script`. The :ref:`tut_script` simply passes the |covariance| section to the :ref:`fit_script`. The :ref:`mfit_script` and :ref:`mtut_script` do not currently include this option.

.. _covariance_example:

COVARIANCE Example
=======================

If you miss out the 'COVARIANCE' field, that is equivalent to putting:-

.. code-block:: pyml

    COVARIANCE: none
    
In the :ref:`fit_script` and no standard errors are computed. 

If you use this setting:-

.. code-block:: pyml

    COVARIANCE: nonmem
    
After the :ref:`fit_script` outputs the final |fx| estimates, |popy| will compute the standard errors using a similar method to that employed by |nonmem| when using the '$COVARIANCE' flag. See :ref:`standard_errors` for more details.

..  comment 
    What do the 'default' + 'legrange' options do exactly??