# Diagonal matrix generation diagonal matrix fit using separate univariate normals

[Generated automatically as a Tutorial summary]

## Inputs

### Description

Name: | gen_indep_fit_indep
Title: | Diagonal matrix generation diagonal matrix fit using separate univariate normals
Author: | Wright Dose Ltd
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: |

Failed to create compartment diagram

### True f[X] values

    f[KA] = 0.3
    f[CL] = 3
    f[V] = 20
    f[PNOISE_STD] = 0.1
    f[ANOISE_STD] = 0.05
    f[CL_isv] = 0.2
    f[V_isv] = 0.1

### Starting f[X] values

    f[KA] = 0.3
    f[CL] = 3
    f[V] = 20
    f[PNOISE_STD] = 0.1
    f[ANOISE_STD] = 0.05
    f[CL_isv] = 0.01
    f[V_isv] = 0.01

## Outputs

### Generating and Fitting 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)

### Fitted f[X] values

    f[KA] = 0.3
    f[CL] = 3
    f[V] = 20
    f[PNOISE_STD] = 0.1
    f[ANOISE_STD] = 0.05
    f[CL_isv] = 0.17503
    f[V_isv] = 0.087207

## Plots

### Dense comp plots

Alternatively see All dense_comp graph plots

## Comparison

### True objective value

    -2170.87328898

### Final fitted objective value

    -2172.76865244

### 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 | Prop. Error | Abs. Error
--- | --- | --- | --- | --- | ---
f[CL_isv] | 0.01 | 0.175 | 0.2 | 12.49% | 2.50e-02
f[V_isv] | 0.01 | 0.0872 | 0.1 | 12.79% | 1.28e-02