Objective Functions Ordinary Least Squares Weighted Least

Slide
1
Pharmacometrics
Error Models and Objective
Functions
©NHG Holford, 2017, all rights reserved.
Slide
2
Objective Functions
 Ordinary
Least Squares
 Weighted
Least Squares
 Extended
Least Squares
Further background: http://www.xycoon.com/introduction1.htm
©NHG Holford, 2017, all rights reserved.
Slide
3
The Weighting Problem
120.0
1000.0
100.0
Yobs
100.0
Yobs
80.0
60.0
10.0
40.0
1.0
20.0
0.0
0.1
0
5
©NHG Holford, 2017, all rights reserved.
10
15
20
25
30
0
5
10
15
20
25
30
Slide
4
The Weighting Problem
OLS
ELS
1000.0
1000.0
Y
100.0
Y
100.0
Ytrue
Ytrue
Yobs
10.0
10.0
1.0
1.0
0.1
0.1
0.0
Yobs
0.0
0
5
10
15
20
25
TRUE
30
0
OLS
ELS
Half-life 2.31
3.03
2.30
Error
31%
1%
-
5
10
15
20
25
30
©NHG Holford, 2017, all rights reserved.
Slide
5
Ordinary Least Squares


i  Nobs  f i  obs i 


OLS 
1
i 1
2

©NHG Holford, 2017, all rights reserved.
Slide
6
Weighted Least Squares


i  Nobs  f i  obs i 


WLS 
Vari
i 1
2

Vari 
1
1

(WLS) or
Wi F (obs i )
©NHG Holford, 2017, all rights reserved.
1
(IRLS)
 
F f i 
 
Slide
7
Extended Least Squares
2




i  Nobs   f i  obs i 



ELS 
 ln Vari 


Var
i 1
i







Vari  F  f i , a, b,...


2
©NHG Holford, 2017, all rights reserved.
Slide
8
Error Models
WLS

ELS
Additive

Additive
» Var=a2 [*f0]
» W=1

Poisson

Poisson
» Var=p2 * f1
» W=1/f

Proportional
»

Proportional
W=1/f2
» Var=b2 * f2

General
» Var=z2 * fPWR
©NHG Holford, 2017, all rights reserved.
Slide
9
Additive residual error is always a
good starting point.
Error Models
ELS

NONMEM

Additive
» Var=a2

»


Poisson
Var=p2
*f
Proportional
» Var=b2 * f2

Monolix
Additive
Y  f   SD
Y  f  a  1
Poisson
Y  f  sqrt ( f )   SD
Proportional
Y  f  (1   SD )
2
 SD  N (0,  SD f  )


©NHG Holford, 2017, all rights reserved.
Radioactive disintegration has a
Poisson distribution of counting error.
The variance of a Poisson distribution
is equal to its mean so the variance is
directly proportional to the prediction
(f).
Y  f  (1  b  1 )
 1  N (0,1)
Note: 1 + x is approx exp(x)
Most concentration assay systems
introduce a proportional error (e.g.
due to dilution steps in preparing
samples or standards).
When concentration assays are used
to measure concentrations close to
the background noise of the system
then a combined proportional and
additive residual error model is
needed.
Slide
10
Additive residual error is always a
good starting point.
NONMEM Code
$SIGMA 0.1 ; EPS_SD

Additive

Poisson
$ERROR
Y=F + EPS(1)
Y  f   SD
Y  f  sqrt ( f )   SD

Y=F + SQRT(F)*EPS(1)
Proportional
Y  f  (1   SD )
Y=F* (1+ EPS(1))
Note: 1 + x is approx exp(x)
Y=F* EXP(EPS(1))
Radioactive disintegration has a
Poisson distribution of counting error.
The variance of a Poisson distribution
is equal to its mean so the variance is
directly proportional to the prediction
(f).
Most concentration assay systems
introduce a proportional error (e.g.
due to dilution steps in preparing
samples or standards).
When concentration assays are used
to measure concentrations close to
the background noise of the system
then a combined proportional and
additive residual error model is
needed.
©NHG Holford, 2017, all rights reserved.
Slide
11
Additive residual error is always a
good starting point.
MONOLIX Code

Additive
Radioactive disintegration has a
Poisson distribution of counting error.
The variance of a Poisson distribution
is equal to its mean so the variance is
directly proportional to the prediction
(f).
Additive:
y = f + a * e
Y  f  a  1
Most concentration assay systems
introduce a proportional error (e.g.
due to dilution steps in preparing
samples or standards).
 1  N (0,1)

Proportional
Y  f  (1  b  1 )
Proportional:
y = f + b * f * e
 1  N (0,1)
When concentration assays are used
to measure concentrations close to
the background noise of the system
then a combined proportional and
additive residual error model is
needed.
©NHG Holford, 2017, all rights reserved.
Slide
12
Combined Error Models
Y  f  (a  b  f )  1
Monolix
 1  N (0,1)
Parameters: a, b
Y  f   SD  f   CV
NONMEM
2
 SD  N (0,  SD 2 )  CV  N (0,  CV )
2
2
Parameters:  SD , CV
©NHG Holford, 2017, all rights reserved.
(SIGMA)
Monolix and NONMEM take different
approaches to expressing residual
error models. The results should be
the same.
Monolix has a single random effect
(epsilon) with mean 0 and variance of
1. The additive (parameter a) and
proportional (parameter b)
components of the model are
estimated.
NONMEM estimates the variance of
the additive (sigmaSD) and
proportional (sigmaCV) components.
NONMEM can also estimate the
parameters a and b just like Monolix
but it is more usual to estimate the
variances of the components.
Slide
13
Combined Code Models
Combined2:
y = f+a*e1+b*f*e2
Monolix has a single random effect
(epsilon) with mean 0 and variance of
1. The additive (parameter a) and
proportional (parameter b)
components of the model are
estimated.
Y=F*(1+EPS(2)) + EPS(1)
NONMEM estimates the variance of
the additive (sigmaSD) and
proportional (sigmaCV) components.
NONMEM can also estimate the
parameters a and b just like Monolix
but it is more usual to estimate the
variances of the components.
Monolix
Y  f  a  1  b  f   2
Monolix and NONMEM take different
approaches to expressing residual
error models. The results should be
the same.
 1  N (0,1);  2  N (0,1)
Parameters: a, b
NONMEM
Y  f   SD  f   CV
 SD  N (0,  SD 2 )  CV  N (0,  CV 2 )
2
2
Parameters:  SD , CV
(SIGMA)
©NHG Holford, 2017, all rights reserved.
Slide
14
Combined Error Models
Y  f  (a  b  f )  1
Monolix and NONMEM take different
approaches to expressing residual
error models. The results should be
the same.
Monolix
Monolix has a single random effect
(epsilon) with mean 0 and variance of
1. The additive (parameter a) and
proportional (parameter b)
components of the model are
estimated.
NONMEM
NONMEM estimates the variance of
the additive (sigmaSD) and
proportional (sigmaCV) components.
NONMEM can also estimate the
parameters a and b just like Monolix
but it is more usual to estimate the
variances of the components.
 1  N (0,1)
Parameters: a, b
Y  f   SD  f   CV
2
 SD  N (0,  SD 2 )  CV  N (0,  CV )
2
2
Parameters:  SD , CV
(SIGMA)
©NHG Holford, 2017, all rights reserved.
Slide
15
Coefficient of Variation
If X has a two-parameter lognormal distribution with parameters m and s2 (i.e.
log(X) has a normal distribution with mean m and standard deviation s), then the
mean and variance of X are:
E(X) = exp(m + s2 / 2)
Var(X) = exp(2m +s2)[exp(s2)-1]
Therefore, the exact coefficient of variation of X is
CV(X) = sqrt[Var(X)] / E(X) = sqrt[ exp(s2) - 1 ]
Most commonly the CV is reported as s which is an approximation which only
holds when s2 is small.
Sqrt(exp(s2) – 1) is approximately sqrt((1+s2) -1) i.e. s
©NHG Holford, 2017, all rights reserved.