Difference between revisions of "What is a model? A joint probability distribution!"

From Popix
Jump to navigation Jump to search
m
m
Line 99: Line 99:
 
'''Example:''' 500 mg of a drug is given by intravenous bolus to a patient at time 0. We assume that the evolution of the plasmatic concentration of the drug over time is described by the pharmacokinetic (PK) model
 
'''Example:''' 500 mg of a drug is given by intravenous bolus to a patient at time 0. We assume that the evolution of the plasmatic concentration of the drug over time is described by the pharmacokinetic (PK) model
  
::<div style="text-align: left">
+
:<math> f(t;V,k) = \frac{500}{V}e^{-k \, t} , </math>
<math> f(t;V,k) = \frac{500}{V}e^{-k \, t} , </math>
 
  
 
where <math>\textstyle V</math> is the volume of distribution and <math>\textstyle k</math> the elimination rate constant. The concentration is measured at times <math>\textstyle (t_j, 1\leq j \leq n)</math> with additive residual errors:
 
where <math>\textstyle V</math> is the volume of distribution and <math>\textstyle k</math> the elimination rate constant. The concentration is measured at times <math>\textstyle (t_j, 1\leq j \leq n)</math> with additive residual errors:
  
::<div style="text-align: left">
+
:<math> y_j = f(t_j;V,k) + e_j , \quad 1 \leq j \leq n . </math>
<math> y_j = f(t_j;V,k) + e_j , \quad 1 \leq j \leq n . </math>
 
  
 
Assuming that the residual errors <math>\textstyle (e_j)</math> are independent and normally distributed with constant variance <math>\textstyle a^2</math>, the observed values <math>\textstyle (y_j)</math> are also independent random variables and
 
Assuming that the residual errors <math>\textstyle (e_j)</math> are independent and normally distributed with constant variance <math>\textstyle a^2</math>, the observed values <math>\textstyle (y_j)</math> are also independent random variables and

Revision as of 13:05, 25 March 2013

$ \DeclareMathOperator{\argmin}{arg\,min} \def\bpsi{\boldsymbol{\psi}} \def\py{p_y} \def\pt{p_t} \def\pc{p_c} \def\pu{p_u} \def\pyi{p_{y_i}} \def\pyj{p_{y_j}} \def\ppsi{p_{\psi}} \def\pcpsith{p_{\psi|\theta}} \def\pth{p_{\theta}} \def\pypsi{p_{y,\psi}} \def\pcypsi{p_{y|\psi}} \def\ppsic{p_{\psi,c}} \def\pcpsic{p_{\psi|c}} \def\pypsic{p_{y,\psi,c}} \def\pypsit{p_{y,\psi,t}} \def\pcypsit{p_{y|\psi,t}} \def\pypsiu{p_{y,\psi,u}} \def\pcypsiu{p_{y|\psi,u}} \def\pypsith{p_{y,\psi,\theta}} \def\pypsithcut{p_{y,\psi,\theta,c,u,t}} \def\pypsithc{p_{y,\psi,\theta,c}} \def\pcypsiut{p_{y|\psi,u,t}} \def\pcpsithc{p_{\psi|\theta,c}} \def\pcthy{p_{\theta | y}} \def\pyth{p_{y,\theta}} \def\pcpsiy{p_{\psi|y}} \def\pw{p_w} \def\pcwz{p_{w|z}} \def\pw{p_w} \def\pcyipsii{p_{y_i|\psi_i}} \def\pypsiij{p_{y_{ij}|\psi_{i}}} \def\ptypsiij{p_{\transy(y_{ij})|\psi_{i}}} \def\peps{p_{\teps}} \def\by{y} \def\bu{\boldsymbol{u}} \def\bt{\boldsymbol{t}} \def\bT{\boldsymbol{T}} \def\by{\boldsymbol{y}} \def\bx{\boldsymbol{x}} \def\bc{\boldsymbol{c}} \def\ofim{I^{\rm obs}} \def\efim{I^{\star}} \def\thmle{\hat{\theta}} \def\hazard{h} \def\cumhaz{H} \def\like{L} \newcommand{\prob}[1]{ \mathbb{P}\!\left(#1\right)} \newcommand{\probs}[2]{ \mathbb{P}_{#1}\!\left(#2\right)} \newcommand{\esp}[1]{\mathbb{E}\left(#1\right)} \newcommand{\esps}[2]{\mathbb{E}_{#1}\left(#2\right)} \newcommand{\nominal}[1]{#1^{\star}} \newcommand{\eqdef}{\mathop{=}\limits^{\mathrm{def}}} $


Introduction

A model built for real-world applications can involve various types of variable, such as measurements, individual and population parameters, covariates, design, etc. The model allows us to represent relationships between these variables.

If we consider things from a probabilistic point of view, some of the variables will be random, so the model becomes a probabilistic one, representing the joint distribution of these random variables.

Defining a model therefore means defining a joint distribution. The hierarchical structure of the model will then allow it to be decomposed into submodels, i.e., the joint distribution decomposed into a product of conditional distributions.

Tasks such as estimation, model selection, simulation and optimization can then be expressed as specific ways of using this probability distribution.

- A model is a joint probability distribution.
- A submodel is a conditional distribution derived from this joint distribution.
- A task is a specific use of this distribution.

We will illustrate this approach starting with a very simple example that we will gradually make more sophisticated. Then we will see in various situations what can be defined as the model and what its inputs are.

An illustrative example

A model for the observations of a single individual

Let \(\textstyle \by=(y_j, 1\leq j \leq n)\) be a vector of observations obtained at times \(\textstyle \bt=(t_j, 1\leq j \leq n)\). We consider that the \(\textstyle y_j\) are random variables and we denote \(\textstyle \py\) the distribution (or p.d.f.) of \(\textstyle \by\). If we assume that \(\textstyle \py\) is a parametric model, then there exists a vector of parameters \(\textstyle \bpsi\) that completely define \(\textstyle \py\).

We can then explicitly represent this dependency with respect to \(\textstyle \bpsi\) by writing \(\textstyle \py(\by ; \bpsi)\) for the p.d.f. of \(\textstyle \by\).

If we wish to be even more precise, we can even make it clear that this distribution is defined for a given design, i.e., a given vector of times \(\textstyle \bt\), and write \(\textstyle \py(\by; \bpsi,\bt)\) instead.

By convention, the variables which are before the symbol ``; are random variables. Those that are after the ``; are non random parameters or variables. When there is no risk of confusion, the non random terms can be left out of the notation.

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} \item[-] In this context, the model is the distribution of the observations '"`UNIQ-MathJax22-QINU`"'. \item[-] The inputs of the model are the parameters '"`UNIQ-MathJax23-QINU`"' and the design '"`UNIQ-MathJax24-QINU`"'. \end{minipage}}

Example: 500 mg of a drug is given by intravenous bolus to a patient at time 0. We assume that the evolution of the plasmatic concentration of the drug over time is described by the pharmacokinetic (PK) model

\[ f(t;V,k) = \frac{500}{V}e^{-k \, t} , \]

where \(\textstyle V\) is the volume of distribution and \(\textstyle k\) the elimination rate constant. The concentration is measured at times \(\textstyle (t_j, 1\leq j \leq n)\) with additive residual errors:

\[ y_j = f(t_j;V,k) + e_j , \quad 1 \leq j \leq n . \]

Assuming that the residual errors \(\textstyle (e_j)\) are independent and normally distributed with constant variance \(\textstyle a^2\), the observed values \(\textstyle (y_j)\) are also independent random variables and

\( \label{ex_proba1} y_j \sim {\cal N} \left( f(t_j ; V,k) , a^2 \right), \quad 1 \leq j \leq n. \)


Here, the vector of parameters \(\textstyle \psi\) is \(\textstyle (V,k,a)\). \(\textstyle V\) and \(\textstyle k\) are the PK parameters for the structural PK model and \(\textstyle a\) the residual error parameter. As the \(\textstyle y_j\) are independent, the joint distribution of \(\textstyle \by\) is the product of their marginal distributions\[\py(\by ; \bpsi,\bt) = \prod_{j=1}^n \pyj(y_j ; \bpsi,t_j) ,\]

where \(\textstyle \pyj\) is the normal distribution defined in \eqref{ex_proba1}.

A model for several individuals

Now let us move to \(\textstyle N\) individuals. It is natural to suppose that each is represented by the same basic parametric model, but not necessarily the exact same parameter values. Thus, individual \(\textstyle i\) has parameters \(\textstyle \psi_i\). If we consider that individuals are randomly selected from the population, then we can treat the \(\textstyle \psi_i\) as if they were random vectors. As both \(\textstyle \by\) and \(\textstyle \psi\) are random, the model is now a joint distribution \(\textstyle \pypsi\). Using basic probability, this can be written as\[\pypsi(\by,\bpsi) = \pcypsi(\by |\bpsi) \, \ppsi(\bpsi) .\]

If \(\textstyle \ppsi\) is a parametric distribution that depends on a vector \(\textstyle \theta\) of population parameters and a set of individual covariates \(\textstyle \bc=(c_i , 1\leq i \leq N)\), this dependence can be made explicit by writing \(\textstyle \ppsi(\bpsi;\theta,\bc)\) for the p.d.f of \(\textstyle \bpsi\). Each \(\textstyle i\) has a potentially unique set of times \(\textstyle t_i=(t_{i1},\ldots,t_{i,n_i})\) in the design, and \(\textstyle n_i\) can be different for each individual.

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} \item[-] In this context, the model is the joint distribution of the observations and the individual parameters'"`UNIQ-MathJax6-QINU`"' \item[-] The inputs of the model are the population parameters '"`UNIQ-MathJax55-QINU`"', the individual covariates '"`UNIQ-MathJax56-QINU`"' and the measurement times '"`UNIQ-MathJax57-QINU`"'. \end{minipage}}

Example: Let us suppose \(\textstyle N\) patients received the same treatment as the single patient did. We now have the same PK model \eqref{ex_proba1} for each patient, except that each has its own individual PK parameters \(\textstyle V_i\) and \(\textstyle k_i\) and potentially its own residual error parameter \(\textstyle a_i\)\[ y_{ij} \sim {\cal N} \left( \frac{500}{V_i}e^{-k_i \, t_{ij}} , a_i^2 \right) \]

Here, \(\textstyle \psi_i = (V_i,k_i,a_i)\). One possible model is then to assume the same residual error model for all patients, and log-normal distributions for \(\textstyle V\) and \(\textstyle k\)\[ \begin{align} a_i &= a \\ \log(V_i) &\sim_{i.i.d.} {\cal N}\left(\log(V_{\rm pop})+\beta\,\log(w_i/70), \omega_V^2\right) \\ \log(k_i) &\sim_{i.i.d.} {\cal N}\left(\log(k_{\rm pop}), \omega_k^2\right). \end{align} \]

where the only covariate we choose to consider, \(\textstyle w_i\), is the weight (in kg) of patient \(\textstyle i\). The model therefore consists of the conditional distribution of the concentrations defined in \eqref{ex_proba2a} and the distribution of the individual PK parameters defined in \eqref{ex_proba2b}. The inputs of the model are the population parameters \(\textstyle \theta = (V_{\rm pop},k_{\rm pop},\omega_V,\omega_k,\beta,a)\), the covariates (here, the weight) \(\textstyle (w_i, 1\leq i \leq N)\), and the design \(\textstyle \bt\).

A model for the population parameters

In some cases, it may turn out that it is useful or important to consider that the population parameter \(\textstyle \theta\) is itself random, rather than fixed. There are various reasons for this, such as if we want to model uncertainty in its value, introduce a priori information in an estimation context, or model an inter-population variability if the model is not looking at only one given population.

If so, let us denote \(\textstyle \pth\) the distribution of \(\textstyle \theta\). As the status of \(\textstyle \theta\) has therefore changed, the model now becomes the joint distribution of its random variables, i.e., of \(\textstyle \by\), \(\textstyle \bpsi\) and \(\textstyle \theta\), and can be decomposed as follows:

\( \pypsith(\by,\bpsi,\theta;\bt,\bc) = \pcypsi(\by |\bpsi;\bt) \, \pcpsith(\bpsi|\theta;\bc) \, \pth(\theta) . \)

Remarks:

  1. The formula is identical for \(\textstyle \ppsi(\bpsi; \theta)\) and \(\textstyle \pcpsith(\bpsi|\theta)\). What has changed is the status of \(\textstyle \theta\). It is not random in \(\textstyle \ppsi(\bpsi; \theta)\), the distribution of \(\textstyle \bpsi\) for any given value of \(\textstyle \theta\), whereas it is random in \(\textstyle \pcpsith(\bpsi|\theta)\), the conditional distribution of \(\textstyle \bpsi\), i.e., the distribution of \(\textstyle \bpsi\) obtaining after randomly generating \(\textstyle \theta\).
  1. If \(\textstyle \pth\) is a parametric distribution with parameter \(\textstyle \varphi\), this dependence can be made explicit by writing \(\textstyle \pth(\theta;\varphi)\) for the distribution of \(\textstyle \theta\).
  1. Not necessarily all of the components of \(\textstyle \theta\) need be random. If it is possible to decompose \(\textstyle \theta\) into \(\textstyle (\theta_F,\theta_R)\), where \(\textstyle \theta_F\) is fixed and \(\textstyle \theta_R\) random, then the decomposition \eqref{proba3a} becomes

\( \pypsith(\by,\bpsi,\theta_R;\bt,\theta_F,\bc) = \pcypsi(\by |\bpsi;\bt) \, \pcpsith(\bpsi|\theta_R;\theta_F,\bc) \, \pth(\theta_R). \)

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} #[-] In this context, the model is the joint distribution of the observations, the individual parameters and the population parameters: ::<div style="text-align: left"> '"`UNIQ-MathJax98-QINU`"' #[-] The inputs of the model are the individual covariates '"`UNIQ-MathJax99-QINU`"' and the measurement times '"`UNIQ-MathJax100-QINU`"'. \end{minipage}}

Example: We can introduce prior distributions in order to model the inter-population variability of the population parameters \(\textstyle V_{\rm pop}\) and \(\textstyle k_{\rm pop}\):

\(\begin{align} V_{\rm pop} &\sim {\cal N}\left(30,3^2\right), \\ k_{\rm pop} &\sim {\cal N}\left(0.1,0.01^2\right). \end{align} \)

As before, the conditional distribution of the concentration is given by \eqref{ex_proba2a}. Now, \eqref{ex_proba2b} is the conditional distribution of the individual PK parameters, given \(\textstyle \theta_R=(V_{\rm pop},k_{\rm pop})\). The distribution of \(\textstyle \theta_R\) is defined in \eqref{ex_proba3}. Here, the inputs of the model are the fixed population parameters \(\textstyle \theta_F = (\omega_V,\omega_k,\beta,a)\), the weights \(\textstyle (w_i)\) and the design \(\textstyle \bt\).

A model for the covariates

Another scenario is to suppose that in fact it is the covariates \(\textstyle \bc\) that are random, not the population parameters. This may either be in the context of wanting to simulate individuals, or when modeling and wanting to take into account uncertainty in the covariate values. If we note \(\textstyle \pc\) the distribution of the covariates, the joint distribution \(\textstyle \ppsic\) of the individual parameters and the covariates decomposes naturally as:

\( \ppsic(\bpsi,\bc;\theta) = \pcpsic(\bpsi | \bc;\theta) \, \pc(\bc) , \)

where \(\textstyle \pcpsic\) is the conditional distribution of \(\textstyle \bpsi\) given \(\textstyle \bc\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} #[-] In this context, the model is the joint distribution of the observations, the individual parameters and the covariates: ::<div style="text-align: left"> '"`UNIQ-MathJax116-QINU`"' #[-] The inputs of the model are the population parameters '"`UNIQ-MathJax117-QINU`"' and the measurement times '"`UNIQ-MathJax118-QINU`"'. \end{minipage}}

Example: We could assume a normal distribution as a prior for the weights:

\( w_i &\sim_{i.i.d.} {\cal N}\left(70,10^2\right) \).

Once more, \eqref{ex_proba2a} defines the conditional distribution of the concentrations. Now,  \eqref{ex_proba2b} is the conditional distribution of the individual PK parameters, given the weight \(\textstyle \bw\), which is now a random variable whose distribution is defined in \eqref{ex_proba4}. Now, the inputs of the model are  the population parameters \(\textstyle \theta= (V_{\rm pop},k_{\rm pop},\omega_V,\omega_k,\beta,a)\) and the design \(\textstyle \bt\).

A model for the measurement times

Another scenario is to suppose that there is uncertainty in the measurement times \(\textstyle \bt=(t_{ij})\) and not the population parameters or covariates. If we note \(\textstyle \nominal{\bt}=(\nominal{t}_{ij}, 1\leq i \leq N, 1\leq j \leq n_i)\) the nominal measurement times (i.e., those presented in a data set), then the ``true measurement times \(\textstyle \bt\) at which the measurement were made can be considered random fluctuations around \(\textstyle \nominal{\bt}\) following some distribution \(\textstyle \pt(\, \cdot \, ; \nominal{\bt})\).

Randomness with respect to time can also appear in the presence of dropout, i.e., individuals that prematurely leave a clinical trial. For such an individual \(\textstyle i\) who leaves at the random time \(\textstyle T_i\), measurement times are the nominal times before \(\textstyle T_i\):

\(\textstyle \bt_{i} = (\nominal{t}_{ij} {\rm s.t. } \nominal{t}_{ij}\leq T_i)\). In such situations, measurement times are therefore random and can be thought to come from a distribution \(\textstyle \pt(\, \cdot \, ; \nominal{\bt})\).

Remark: If there are also other regression variables \(\textstyle \bx=(x_{ij})\), it is of course possible to use the same approach and consider \(\textstyle \bx\) as a random variable fluctuating around \(\textstyle \nominal{\bx}\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} #[-] In this context, the model is the joint distribution of the observations, the individual parameters and the measurement times: ::<div style="text-align: left"> '"`UNIQ-MathJax136-QINU`"' #[-] The inputs of the model are the population parameters '"`UNIQ-MathJax137-QINU`"', the individual covariates '"`UNIQ-MathJax138-QINU`"' and the nominal design '"`UNIQ-MathJax139-QINU`"'. \end{minipage}}

Example: Let us assume as prior a normal distribution around the nominal times:

\( t_{ij} \sim_{i.i.d.} {\cal N}\left(\nominal{t}_{ij},0.03^2\right). \)

Here, \eqref{ex_proba5} defines the distribution of the now random variable \(\textstyle \bt\). The other components of the model defined in \eqref{ex_proba2a} and \eqref{ex_proba2b} remain unchanged. The inputs of the model are the population parameters \(\textstyle \theta\), the weights \(\textstyle (w_i)\) and the nominal measurement times \(\textstyle \nominal{\bt}\).

A model for the dose regimen

If the structural model is a dynamical system (e.g., defined by a system of ordinary differential equations), the source terms \(\textstyle \bu = (u_i, 1\leq i \leq N)\), i.e., the inputs of the dynamical system, are usually considered fixed and known. This is the case for example for doses administered to patients for a given treatment. Here, the source term \(\textstyle u_i\) is made up of the dose(s) given to patient \(\textstyle i\), the time(s) of administration, and their type (IV bolus, infusion, oral, etc.).

Here again, there may be differences between the nominal dosage regimen stated in the protocol and given in the data set, and the dosage regimem that was in reality administered. For example, it might be that the times of administration and/or dose were not exactly respected or recorded. Also, there may have been non compliance, i.e., certain doses that were not taken by the patient.

If we denote \(\textstyle \nominal{\bu}=(\nominal{u}_{i}, 1\leq i \leq N)\) the nominal dose regimens (reported in the dataset), then in this context the ``real dose regimens \(\textstyle \bu\) can be considered to randomly fluctuate around \(\textstyle \nominal{\bu}\) with some distribution \(\textstyle \pu(\, \cdot \, ; \nominal{\bu})\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} #[-] In this context, the model is the joint distribution of the observations, the individual parameters and the dose regimens: ::<div style="text-align: left"> '"`UNIQ-MathJax152-QINU`"' #[-] The inputs of the model are the population parameters '"`UNIQ-MathJax153-QINU`"', the individual covariates '"`UNIQ-MathJax154-QINU`"', the nominal design '"`UNIQ-MathJax155-QINU`"' and the nominal dose regimens '"`UNIQ-MathJax156-QINU`"'. \end{minipage}}

Example: Suppose that instead of the one dose given in the example up to now, there are now repeated doses \(\textstyle (d_{ik}, k \geq 1)\) administered to patient \(\textstyle i\) at times \(\textstyle (\tau_{ik} , k \geq 1)\). Then, it is easy to see that

\( y_{ij} \sim {\cal N}\left(f(t_{ij};V_i,k_i) , a_i^2 \right) , \)

where

\( f(t;V_i,k_i) = \sum_{k, \tau_{ik}<t}\frac{d_{ik}}{V_i} \, e^{-k_i \, (t- \tau_{ik})} . \)

The ``real dose regimen administrated to patient \(\textstyle i\) can be written \(\textstyle u_i=(d_{ik},\tau_{ik}, k\geq 1)\), and the prescribed dose regimen \(\textstyle \nominal{u}_i=(\nominal{d}_{ik},\nominal{\tau}_{ik}, k\geq 1)\).

We can model the random fluctuations of the administration times \(\textstyle \tau_{ik}\) around the nominal times \(\textstyle (\nominal{\tau}_{ij})\):

\( \tau_{ik} \sim_{i.i.d.} {\cal N}\left(\nominal{\tau}_{ik},0.02^2\right) , \) and the non compliance (here meaning that a dose is not taken):

\( \pi &= \prob{d_{ik} = 0} \nonumber \\ &= 1 - \prob{d_{ik}= \nominal{d}_{ik}}. \) Here, \eqref{ex_proba6b} and \eqref{ex_proba6a} define the conditional distributions of the concentrations \(\textstyle (y_{ij})\), \eqref{ex_proba2b} defines the distribution of \(\textstyle \bpsi\) and \eqref{ex_proba6c} and \eqref{ex_proba6d} define the distribution of \(\textstyle \bu\). The inputs are the population parameters \(\textstyle \theta\), the weights \(\textstyle (w_i)\), the measurement times \(\textstyle \bt\) and the nominal dose regimens \(\textstyle \nominal{\bu}\).

A complete model

We have now seen the variety of ways in which the variables in a model either play the role of random variables whose distribution is defined by the model, or that of non random variables or parameters. Any combination is possible, depending on the context. For instance, the population parameters \(\textstyle \theta\) and covariates \(\textstyle \bc\) could be random with parametric probability distributions \(\textstyle \pth(\, \cdot \,;\varphi)\) and \(\textstyle \pc(\, \cdot \,;\gamma)\), and the dose regimen \(\textstyle \bu\) and measurement times \(\textstyle \bt\) reported with uncertainty and therefore modeled as random variables with distribution \(\textstyle \pu\) and \(\textstyle \pt\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{\textwidth} #[-] In this context, the model is the joint distribution of the observations, the individual parameters, the population parameters, the dose regimens, the covariates and the measurement times: ::<div style="text-align: left"> '"`UNIQ-MathJax184-QINU`"' #[-] The inputs of the model are the nominal dose regimens '"`UNIQ-MathJax185-QINU`"', the nominal measurement times '"`UNIQ-MathJax186-QINU`"' and the ``hyper-parameters'' '"`UNIQ-MathJax187-QINU`"' and '"`UNIQ-MathJax188-QINU`"'. \end{minipage}}

\newpage

Using the model for executing tasks

In a modeling and simulation context, the tasks to execute make specific use of the various probability distributions associated with a model.

Simulation

By definition, simulation makes direct use of the probability distribution that defines the model. Simulation of the global model is straightforward as soon as the joint distribution can be decomposed into a product of easily simulated conditional distributions.

Consider for example that the variables involved in the model are those introduced in \hyperref[sec_intro31]{the previous section}:

  1. The population parameters \(\textstyle \theta\) can either be given, or simulated from the distribution \(\textstyle \pth\). # The individual covariates \(\textstyle \bc\) can either be given, or simulated from the distribution \(\textstyle \pc\). # The individual parameters \(\textstyle \bpsi\) can be simulated from the distribution \(\textstyle \pcpsithc(\, \cdot \, | \theta,\bc)\) using the values of \(\textstyle \theta\) and \(\textstyle \bc\) obtained in steps 1 and 2. # The dose regimen \(\textstyle \bu\) can either be given, or simulated from the distribution \(\textstyle \pu\). # The measurement times \(\textstyle \bt\) (or regression variables \(\textstyle \bx\)) can either be given, or simulated from the distribution \(\textstyle \pt\). # Lastly, observations \(\textstyle \by\) can be simulated from the distribution \(\textstyle \pcypsiut(\, \cdot \, | \bpsi,\bu,\bt)\) using the values of \(\textstyle \bpsi\), \(\textstyle \bu\) and \(\textstyle \bt\) obtained at steps 3, 4 and 5.

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Simulation of a set of variables '"`UNIQ-MathJax207-QINU`"' using another given set of variables '"`UNIQ-MathJax208-QINU`"' requires: \item[-] a model, i.e., a distribution '"`UNIQ-MathJax209-QINU`"' if '"`UNIQ-MathJax210-QINU`"' is treated as a non random variable, or a conditional distribution '"`UNIQ-MathJax211-QINU`"' if '"`UNIQ-MathJax212-QINU`"' is treated as a random variable. \item[-] the input '"`UNIQ-MathJax213-QINU`"', i.e., a value of '"`UNIQ-MathJax214-QINU`"' which allows the distribution '"`UNIQ-MathJax215-QINU`"' or the conditional distribution '"`UNIQ-MathJax216-QINU`"' to be defined. \item[-] an algorithm which allows us to generate '"`UNIQ-MathJax217-QINU`"' from '"`UNIQ-MathJax218-QINU`"' or '"`UNIQ-MathJax219-QINU`"'. \end{minipage}}

Example: Imagine instead that the population parameter \(\textstyle \theta\) and the design \(\textstyle (\bu,\bt)\) are given, and we want to simulate the individual covariates \(\textstyle \bc\), the individual parameters \(\textstyle \bpsi\) and the observations \(\textstyle \by\). Here, the variables to simulate are \(\textstyle w=(\bc,\bpsi,\by)\) and the variables which are given are \(\textstyle z=(\theta,\bu,\bt)\). If the components of \(\textstyle z\) are taken to be non random variables, then: \item[-] The model is the joint distribution \(\textstyle \pypsic(\by,\bpsi,\bc ;\theta,\bu,\bt)\). \item[-] The inputs required for the simulation are the values of \(\textstyle (\theta,\bu,\bt)\). \item[-] The algorithm should be able to generate \(\textstyle (\by,\bpsi,\bc)\) from the joint distribution \(\textstyle \pypsic(\by,\bpsi,\bc ;\theta,\bu,\bt)\). Decomposing the model into three submodels leads to decomposing the joint distribution as

\( \pypsic(\by,\bpsi,\bc ;\theta,\bu,\bt) = \pc(\bc) \, \pcpsic(\bpsi | \bc;\theta) \, \pcypsi(\by |\bpsi;\bu,\bt) .\)

The algorithm therefore reduces to successively drawing \(\textstyle \bc\), \(\textstyle \bpsi\) and \(\textstyle \by\) from \(\textstyle \pc(\bc)\), \(\textstyle \pcpsic(\bpsi | \bc;\theta)\) and \(\textstyle \pcypsi(\by |\bpsi;\bu,\bt)\).

Example: Imagine instead that the individual covariates \(\textstyle \bc\), the observations \(\textstyle \by\), the design \(\textstyle (\bu,\bt)\) and the population parameter \(\textstyle \theta\) are given (in a modeling context for instance, \(\textstyle \theta\) may have been estimated), and we want to simulate the individual parameters \(\textstyle \bpsi\). The only variable to simulate is \(\textstyle w=\bpsi\) and the variables which are given are \(\textstyle z=(\by,\bc,\theta,\bu,\bt)\). Here, we will treat \(\textstyle \by\) as if it is a random variable. The other components of \(\textstyle z\) can be treated as non random variables. Here, \item[-] The model is the conditional distribution \(\textstyle \pcpsiy(\bpsi | \by ;\bc,\theta,\bu,\bt)\). \item[-] The inputs required for the simulation are the values of \(\textstyle (\by,\bc,\theta,\bu,\bt)\). \item[-] The algorithm should be able to sample from the conditional distribution \(\textstyle \pcpsiy(\bpsi | \by ;\bc,\theta,\bu,\bt)\). Markov Chain Monte Carlo (MCMC) algorithms can be used for sampling from such complex conditional distributions.

Estimation of the population parameters

In a modeling context, we usually assume that we have data that includes the observations \(\textstyle \by\) and the measurement times \(\textstyle \bt\). There may also be individual covariates \(\textstyle \bc\), and in pharmacological applications the dose regimen \(\textstyle \bu\). For clarity, let us consider the most general case where all are present.

Any statistical method for estimating the population parameters \(\textstyle \theta\) will be based on some specific probability distribution. Let us illustrate this with two common statistical methods: maximum likelihood and Bayesian estimation.

Maximum likelihood estimation consists in maximizing with respect to \(\textstyle \theta\) the observed likelihood, defined by:

\(\like(\theta ; \by,\bc,\bu,\bt) &\eqdef \py(\by ; \bc,\bu,\bt,\theta) \\ &= \int \pypsi(\by,\bpsi ; \bc,\bu,\bt,\theta) \, d \bpsi . \end{align} \) The variance of the estimator \(\textstyle \thmle\) and therefore confidence intervals can be derived from the observed Fisher information matrix, which itself is calculated using the observed likelihood (i.e., the p.d.f. of the observations \(\textstyle \by\)):

\( \ofim(\thmle ; \by,\bc,\bu,\bt) \eqdef - \frac{\partial^2}{\partial \theta^2} \log(\like(\thmle ; \by,\bc,\bu,\bt)) . \)

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Maximum likelihood estimation of the population parameter '"`UNIQ-MathJax262-QINU`"' requires: \item[-] a model, i.e., a joint distribution '"`UNIQ-MathJax263-QINU`"'. \item[-] inputs '"`UNIQ-MathJax264-QINU`"', '"`UNIQ-MathJax265-QINU`"', '"`UNIQ-MathJax266-QINU`"' and '"`UNIQ-MathJax267-QINU`"'. \item[-] an algorithm which allows us to maximize '"`UNIQ-MathJax268-QINU`"' with respect to '"`UNIQ-MathJax269-QINU`"' and to compute '"`UNIQ-MathJax270-QINU`"'. \end{minipage}}

Bayesian estimation consists in estimating and/or maximizing the conditional distribution

\(\begin{align} \pcthy(\theta | \by ;\bc,\bu,\bt) &= \frac{\pyth(\by , \theta ; \bc,\bu,\bt)}{\py(\by ; \bc,\bu,\bt)} \\ &= \frac{\int \pypsith(\by,\bpsi,\theta ; \bc,\bu,\bt) \, d \bpsi}{\py(\by ; \bc,\bu,\bt)} \end{align} \)

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Bayesian estimation of the population parameter '"`UNIQ-MathJax272-QINU`"' requires: \item[-] a model, i.e., a joint distribution '"`UNIQ-MathJax273-QINU`"'. \item[-] inputs '"`UNIQ-MathJax274-QINU`"', '"`UNIQ-MathJax275-QINU`"', '"`UNIQ-MathJax276-QINU`"' and '"`UNIQ-MathJax277-QINU`"'. \item[-] an algorithm able to estimate and maximize '"`UNIQ-MathJax278-QINU`"'. MCMC methods can be used for estimating this conditional distribution. For nonlinear models, optimization tools are required for computing its mode, i.e., finding its maximum. \end{minipage}}

Estimation of the individual parameters

When \(\textstyle \theta\) is given (or estimated), various estimators of the individual parameters \(\textstyle \bpsi\) are available. They are all based on a probability distribution:

Maximum likelihood estimation consists of maximizing with respect to \(\textstyle \bpsi\) the conditional likelihood

\( \like(\bpsi ; \by,\bu,\bt) &\eqdef& \pcypsi(\by | \bpsi ;\bu,\bt) . \)

The maximum a posteriori (MAP) estimator is obtained by maximizing with respect to \(\textstyle \bpsi\) the conditional distribution

\( \pcpsiy(\bpsi | \by ; \theta,\bc,\bu,\bt) = \frac{\pypsi(\by , \bpsi;\theta,\bc,\bu,\bt)}{\py(\by ; \theta,\bc,\bu,\bt)}. \)

The conditional mean of \(\textstyle \bpsi\) is defined as the mean of the conditional distribution \(\textstyle \pcpsiy(\bpsi | \by ; \theta,\bc,\bu,\bt)\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Estimation of the individual parameters '"`UNIQ-MathJax287-QINU`"' requires: \item[-] a model, i.e., a joint distribution '"`UNIQ-MathJax288-QINU`"'. \item[-] inputs '"`UNIQ-MathJax289-QINU`"', '"`UNIQ-MathJax290-QINU`"', '"`UNIQ-MathJax291-QINU`"', '"`UNIQ-MathJax292-QINU`"' and '"`UNIQ-MathJax293-QINU`"'. \item[-] an algorithm able to estimate and maximize '"`UNIQ-MathJax294-QINU`"'. MCMC methods can be used for estimating this conditional distribution. For nonlinear models, optimization tools are required for computing its mode (i.e., its MAP). \end{minipage}}

Model selection

Likelihood ratio tests and statistical information criteria (BIC, AIC) compare the observed likelihoods computed under different models, i.e., the probability distribution functions \(\textstyle \py^{(1)}(\by ; \bc,\bu,\bt,\thmle_1)\), \(\textstyle \py^{(2)}(\by ; \bc,\bu,\bt,\thmle_2)\), \ldots , \(\textstyle \py^{(K)}(\by ; \bc,\bu,\bt,\thmle_K)\) computed under models \(\textstyle {\cal M}_1, {\cal M}_2, \ldots, {\cal M}_K\), where \(\textstyle \thmle_k\) maximizes the observed likelihood \(\textstyle \py^{(k)}(\by ; \bc,\bu,\bt,\theta)\) under model \(\textstyle {\cal M}_k\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Computing the observed likelihood and information criteria require: \item[-] a model, i.e., a joint distribution '"`UNIQ-MathJax302-QINU`"'. \item[-] inputs '"`UNIQ-MathJax303-QINU`"', '"`UNIQ-MathJax304-QINU`"', '"`UNIQ-MathJax305-QINU`"', '"`UNIQ-MathJax306-QINU`"' and '"`UNIQ-MathJax307-QINU`"'. \item[-] an algorithm able to compute '"`UNIQ-MathJax308-QINU`"'. For nonlinear models, linearization methods or Monte-Carlo methods can be used. \end{minipage}}

Optimal design

In the design of experiments for estimating statistical models, optimal designs allow parameters to be estimated with minimum variance by optimizing some statistical criteria. Common optimality criteria are functionals of the eigenvalues of the expected Fisher information matrix:

\( \efim(\theta ; \bu,\bt) \eqdef \esps{y}{\ofim(\theta ; \by,\bu,\bt)} , \)

where \(\textstyle \ofim\) is the observed Fisher information matrix defined in . For the sake of simplicity, we consider models without covariates \(\textstyle \bc\).

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Optimal design for minimum variance estimation requires: \item[-] a model, i.e., a joint distribution '"`UNIQ-MathJax312-QINU`"'. \item[-] a vector of population parameters '"`UNIQ-MathJax313-QINU`"'. \item[-] a criteria '"`UNIQ-MathJax314-QINU`"' derived from the expected Fisher information matrix '"`UNIQ-MathJax315-QINU`"'. \item[-] an algorithm able to estimate '"`UNIQ-MathJax316-QINU`"' for any design '"`UNIQ-MathJax317-QINU`"' and to maximize '"`UNIQ-MathJax318-QINU`"' with respect to '"`UNIQ-MathJax319-QINU`"' and '"`UNIQ-MathJax320-QINU`"'. \end{minipage}}

In a clinical trial context, studies are designed to optimize the probability of reaching some predefined target \(\textstyle {\cal A}\), i.e., \(\textstyle \prob{(\by, \bpsi,\bc) \in {\cal A} ; \bu,\bt,\theta}\). This may include optimizing safety and efficacy, and things like the probability of reaching sustained virologic response, etc.

\setlength{\fboxsep}{3mm} \fbox{\begin{minipage}{0.8\textwidth} Optimal design for clinical trials requires: \item[-] a model, i.e., a joint distribution '"`UNIQ-MathJax323-QINU`"'\,. \item[-] a vector of population parameters '"`UNIQ-MathJax324-QINU`"'. \item[-] a target '"`UNIQ-MathJax325-QINU`"'. \item[-] an algorithm able to estimate '"`UNIQ-MathJax326-QINU`"' and to maximize it with respect to '"`UNIQ-MathJax327-QINU`"' and '"`UNIQ-MathJax328-QINU`"'. \end{minipage}}

\newpage

Implementing models with MLXtran and running tasks

Example 1

Consider first the model defined by the joint distribution

\( \pypsi(\by,\bpsi ; \theta ,\bt) = \pcypsi(\by|\bpsi;\bt) \pcpsic(\bpsi ; \theta)\)

where as in our running example, \item \(\textstyle \by = (y_{ij}, 1\leq i \leq N , 1 \leq j \leq n_i)\) are concentrations \item \(\textstyle \bpsi= (\psi_i, 1\leq i \leq N)\) are individual parameters; here \(\textstyle \psi_i=(V_i,k_i,a_i)\) \item \(\textstyle \theta=(V_{\rm pop},k_{\rm pop},\omega_V,\omega_k,a)\) are population parameters \item \(\textstyle \bt = (t_{ij}, 1\leq i \leq N , 1 \leq j \leq n_i)\) are the measurement times. We aim to define a joint model for \(\textstyle \by\) and \(\textstyle \bpsi\). We will characterize each component of the model and see how it can be implemented with \mlxtran.

\begin{minipage}[t]{0.45\textwidth} \textcolor{marron}{'"`UNIQ-MathJax337-QINU`"'} \vspace*{0.3cm} \hrule width 7cm \vspace*{0.5cm} \textcolor{marron}{'"`UNIQ-MathJax338-QINU`"'} \begin{align} \log(V_i) &\sim& {\cal N}\left(\log(V_{\rm pop}), \, \omega_V^2\right) \ \log(k_i) &\sim& {\cal N}\left(\log(k_{\rm pop}),\, \omega_k^2\right) \end{align}

\vspace*{0.8cm}

\hrule width 7cm

\vspace*{0.5cm}

\textcolor{marron}{\(\textstyle \pcypsi(y|\bpsi; \bt)\)} \\[0.2cm] \begin{align} f(t;V_i,k_i) &=& \frac{500}{V_i}e^{-k_i \, t} \\[0.2cm] y_{ij} &\sim& {\cal N} \left(f(t_{ij};V_i,k_i) , a^2 \right) \end{align} \hrule width 7cm \end{minipage} \begin{minipage}[t]{0.55\textwidth} jointModel2.txt \begin{lstlisting}[frame=trBL,linewidth=10cm] [INDIVIDUAL PARAMETER] input={V_pop,k_pop,omega_V,omega_k} DEFINITION: V = {distribution=logNormal, prediction=V_pop, sd=omega_V} k = {distribution=logNormal, prediction=k_pop, sd=omega_k} [OBSERVATION] input={V,k,a} EQUATION: f = 500/V*exp(-k*t) DEFINITION: y = {distribution=normal, prediction=f, sd=a} \end{lstlisting} \end{minipage}

We could then use this model for simulation, using for example a R function\footnote{or a Matlab function \ldots} \verb!simulate! \begin{Verbatim}[formatcom=\color{blue}] >res=simulate(model="jointModel.txt",input=data,output,simulSettings) \end{Verbatim} where \verb!data! is a R list (or a Matlab structure) which contains the design and the input variables, \verb!output! contains the names of the variables to simulate and \verb!simulSettings! some settings eventually required for the simulation. Let's see some examples

\item[i)] if we want to simulate both \(\textstyle \by\) and \(\textstyle \bpsi\) with the joint distribution \(\textstyle \pypsi(\by,\bpsi ; \theta , \bt)\), \verb!data! contains the measurement times \(\textstyle \bt\) and the population parameter \(\textstyle \theta\), and \verb!output = c("V","k","y")!. The settings are for example the seed used for generating random numbers. \item[ii)] if we want to simulate \(\textstyle \bpsi\) with the conditional distribution \(\textstyle \pcpsiy(\bpsi | \by ; \theta \bt)\), \verb!data! contains the measurement times \(\textstyle \bt\), the observations \(\textstyle \by\) and the population parameter \(\textstyle \theta\), and \verb!output = c("V","k")!. Here, an MCMC algorithm should be used for simulating this conditional distribution. Then, \verb!simulSettings! are the settings used for MCMC (number of iterations, transition kernels, \ldots).

The same model could be used for computing any p.d.f. (and then any log-likelihood) with a function \verb!computepdf!. \begin{Verbatim}[formatcom=\color{blue}] >res=computepdf(model="jointModel.txt",input=data,output,pdfSettings) \end{Verbatim} If we want to compute the observed log-likelihood for a given value of \(\textstyle \theta\), we could use \verb!computepdf! for computing the pdf of the observations \(\textstyle \py(\by ; \theta,\bt)\). In this case, \verb!data! contains the measurement times \(\textstyle \bt\) and the population parameter \(\textstyle \theta\), and \verb!output = "y"!. Here, \verb!pdfSettings! are for example the settings of the Monte Carlo method used for estimating \(\textstyle \py(\by ; \theta,\bt)\).

The same model could also be used for maximizing a p.d.f. (and then computing an estimate of some parameters) with a function \verb!maximizepdf! \begin{Verbatim}[formatcom=\color{blue}] >res=maximizepdf(model="jointModel.txt",input=data,output,variable,estimSettings) \end{Verbatim} \verb!maximizepdf! can be used for computing the maximum likelihood estimate of \(\textstyle \theta\): \verb!data! contains the measurement times \(\textstyle \bt\) and the observations \(\textstyle \by\), \verb!output! = "y" is the name of the observation, \ \verb!variable=c("V_pop","k_pop","omega_V","omega_k",a")! is the list of population parameters and \verb!estimSettings! are settings for SAEM.

Example 2

Consider now the model defined by the joint distribution

\( \pypsithc(\by,\bpsi, \theta, \bc ; \bt) = \pcypsi(\by|\bpsi;\bt) \pcpsic(\bpsi|\bc ; \theta) \, \pth(\theta) \pc(\bc) ,\)

where the covariates are the weights of the individuals \(\textstyle \bc = (w_i, 1\leq i \leq N)\). The other variables and parameters are those already defined in the previous example.

We now aim to define a joint model for \(\textstyle \by\), \(\textstyle \bpsi\), \(\textstyle \bc\) and \(\textstyle \theta_R=(V_{\rm pop},k_{\rm pop})\).

\begin{minipage}[t]{0.45\textwidth} \textcolor{marron}{'"`UNIQ-MathJax364-QINU`"'} \vspace*{0.2cm} \hrule width 7cm \vspace*{0.3cm} \textcolor{marron}{'"`UNIQ-MathJax365-QINU`"'} \begin{align} V_{\rm pop} &\sim& {\cal N}\left(30,3^2\right) \ k_{\rm pop} &\sim& {\cal N}\left(0.1,0.01^2\right) \end{align}

\hrule width 7cm

\vspace*{0.5cm}

\textcolor{marron}{\(\textstyle \pc(\bc)\)} \begin{align} w_i &\sim& {\cal N}\left(70,10^2\right) \end{align}

\vspace*{0.7cm}

\hrule width 7cm

\vspace*{0.5cm}

\textcolor{marron}{\(\textstyle \pcpsic(\bpsi |\bc;\theta)\)} \begin{align} \hat{V}_i &=& V_{\rm pop}\left(\frac{w_i}{70}\right)^\beta \\[0.4cm] \log(V_i) &\sim& {\cal N}\left(\log(\hat{V}_i), \, \omega_V^2\right) \ \log(k_i) &\sim& {\cal N}\left(\log(k_{\rm pop}),\, \omega_k^2\right) \end{align}

\vspace*{0.8cm}

\hrule width 7cm

\vspace*{0.5cm}

\textcolor{marron}{\(\textstyle \pcypsi(y|\bpsi; \bt)\)} \\[0.2cm] \begin{align} f(t;V_i,k_i) &=& \frac{500}{V_i}e^{-k_i \, t} \\[0.2cm] y_{ij} &\sim& {\cal N} \left(f(t_{ij};V_i,k_i) , a^2 \right) \end{align} \hrule width 7cm \end{minipage} \begin{minipage}[t]{0.55\textwidth} jointModel2.txt \begin{lstlisting}[frame=trBL,linewidth=10cm] [POPULATION PARAMETER] DEFINITION: V_pop = {distribution=normal, mean=30, sd=3} k_pop = {distribution=normal, mean=0.1, sd=0.01} [COVARIATE] DEFINITION: weight = {distribution=normal, mean=70, sd=10} [INDIVIDUAL PARAMETER] input={V_pop,k_pop,omega_V,omega_k,beta,weight} EQUATION: V_pred = V_pop*(weight/70)^beta DEFINITION: V = {distribution=logNormal, prediction=V_pred, sd=omega_V} k = {distribution=logNormal, prediction=k_pop, sd=omega_k} [OBSERVATION] input={V,k,a} EQUATION: f = 500/V*exp(-k*t) DEFINITION: y = {distribution=normal, prediction=f, sd=a} \end{lstlisting} \end{minipage}

We could use the approach described above for different tasks, e.g. simulating \(\textstyle (\by,\bpsi, \bc, \theta_R)\) for a given input \(\textstyle (\theta_F, \bt)\), simulating the population parameters \(\textstyle (V_{\rm pop},k_{\rm pop})\) with the conditional distribution \(\textstyle p_{\theta_R|\by, \bc}( \, \cdot \, | \by, \bc ; \theta_F,\bt)\), estimating the log-likelihood, maximizing the observed likelihood, computing the MAP, \ldots