# Diagonal matrix generation diagonal matrix fit using separate univariate normals

[Generated automatically as a Tutorial summary]

## Model Description

Name:

  gen_indep_fit_indep

Title:

  Diagonal matrix generation diagonal matrix fit using separate univariate normals

Author:

  PoPy for PK/PD

Abstract:

One compartment model with absorption compartment and CL/V parametrisation.
This script uses a diagonal covariance matrix to generate the data and a diagonal covariance matrix to fit.
Note here the ‘diagonal matrix’ is implemented as two separate univariate normal distributions, which is equivalent.

Keywords:

  dep_one_cmp_cl; one compartment model; diagonal matrix

Input Script:

  `gen_indep_fit_indep_tut.pyml`

Diagram:

## Comparison

### True objective value

    -2170.8804

### Final fitted objective value

    -2172.8028

### Compare Main f[X]

No Main f[X] values to compare.

### Compare Noise f[X]

No Noise f[X] values to compare.

### Compare Variance f[X]

Name | Initial | Fitted | True | Abs. Error | Prop. Error
--- | --- | --- | --- | --- | ---
f[CL_isv] | 0.01 | 0.178 | 0.2 | 2.16e-02 | 10.79%
f[V_isv] | 0.01 | 0.0881 | 0.1 | 1.19e-02 | 11.91%

## Outputs

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

    f[KA] = 0.3000
    f[CL] = 3.0000
    f[V] = 20.0000
    f[PNOISE_STD] = 0.1000
    f[ANOISE_STD] = 0.0500
    f[CL_isv] = 0.1784
    f[V_isv] = 0.0881

### Generated data .csv file

Synthetic Data:

  `synthetic_data.csv`

### Gen and Fit Summaries

- Gen: Diagonal matrix generation diagonal matrix fit using separate univariate normals (gen)

- Fit: Diagonal matrix generation diagonal matrix fit using separate univariate normals (fit)

## Inputs

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

    f[KA] = 0.3000
    f[CL] = 3.0000
    f[V] = 20.0000
    f[PNOISE_STD] = 0.1000
    f[ANOISE_STD] = 0.0500
    f[CL_isv] = 0.2000
    f[V_isv] = 0.1000

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

    f[KA] = 0.3000
    f[CL] = 3.0000
    f[V] = 20.0000
    f[PNOISE_STD] = 0.1000
    f[ANOISE_STD] = 0.0500
    f[CL_isv] = 0.0100
    f[V_isv] = 0.0100