<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.inria.fr/wikis/popix/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marc</id>
	<title>Popix - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.inria.fr/wikis/popix/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marc"/>
	<link rel="alternate" type="text/html" href="https://wiki.inria.fr/popix/Special:Contributions/Marc"/>
	<updated>2026-11-03T08:36:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.6</generator>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7176</id>
		<title>Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7176"/>
		<updated>2013-06-04T19:01:25Z</updated>

		<summary type="html">&lt;p&gt;Marc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;$&lt;br /&gt;
\def\simulix{\mathsf{simulix} } &lt;br /&gt;
$&lt;br /&gt;
The desire to model a biological or physical phenomenon often arises when we are able to record some observations issued from that phenomenon. Nothing would be more natural therefore than to begin this introduction by looking at some observed data.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= This first plot displays the viral load of four patients with hepatitis C who started  a treatment at time $t=0$.&lt;br /&gt;
|image = NEWintro1.png&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=This second example involves weight data for rats measured over 14 weeks, for a sub-chronic toxicity study related to the question of genetically modified corn.&lt;br /&gt;
|image = NEWintro2.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= In this third example, data are fluorescence intensities measured over time in a cellular biology experiment.&lt;br /&gt;
|image=NEWintro3.png }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= Note that repeated measurements are not necessarily always functions of time.&lt;br /&gt;
For example, we may be interested in corn production as a function of fertilizer quantity.&lt;br /&gt;
|image= NEWintro4.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even though these examples come from quite different domains, in each case the data is made up of repeated measurements on several individuals from a population. What we will call a &amp;quot;population approach&amp;quot; is therefore relevant for characterizing and modeling this data. The modeling goal is thus twofold: characterize the biological or physical phenomena observed for each individual, and secondly, the variability seen between individuals.&lt;br /&gt;
&lt;br /&gt;
In the example with the rats, the model needs to integrate a growth model that describes how a rat's weight increases with time, and a statistical model that describes why these kinetics can vary from one rat to another. The goal is thus to finish with a &amp;quot;typical&amp;quot; curve for the population (in red) and to be able to explain the variability in the individual's curves (in green) around this population curve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:NEWintro5.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model will explain some of this variability by individual covariates such as sex or diet (rats 1 and 3 are male while rats 2 and 4 are female), but some of the variability will remain unexplained and will be considered as random. Integrating into the same model effects considered fixed and others considered random  leads naturally to the use of mixed-effects models.&lt;br /&gt;
&lt;br /&gt;
An alternative yet equivalent approach considers this model as a hierarchical one: each curve is described by a single model, and the variability between individual models is described by a population model. In the case of parametric models, this means that the observations for a given individual are described by a model of the observations that depends on a vector of individual parameters: this is the classic individual approach. The population approach is then a direct extension of [[The individual approach|the individual approach]]: we add a component to the model that describes the variability of the individual parameters within the population.&lt;br /&gt;
&lt;br /&gt;
A model can thus be seen as a [[What is a model? A joint probability distribution! | joint probability distribution]], which can easily be extended to the case where other variables in the model are considered as random variables: covariates, population parameters, the design, etc. The hierarchical structure of the model leads to a natural decomposition of the joint distribution into a product of conditional and marginal distributions.&lt;br /&gt;
&lt;br /&gt;
Models for [[Modeling the individual parameters |individual parameters]] and models for [[Modeling the observations | observations]] are described in the [[Introduction_%26_notation|Models]] chapter. In particular, models for [[Continuous data models|continuous observations]], [[Model for categorical data|categorical data]], [[Models for count data|count data]] and [[ Models for time-to-event data | survival data]] are presented and illustrated by various examples. Extensions for [[ Mixture models|mixture models]], [[Hidden Markov models|hidden Markov models]] and [[Stochastic differential equations based models| stochastic differential equation based models]] are also presented.&lt;br /&gt;
&lt;br /&gt;
The  Tasks &amp;amp; Tools chapter presents practical examples of using these models: [[Visualization|exploration and visualization]], [[Estimation|estimation]], [[Model evaluation#Model diagnostics|model diagnostics]], [[Model evaluation#Model selection|model selection]] and [[Simulation|simulation]]. All approaches and proposed methods  are rigorously detailed in the [[Introduction and notation|Methods]] chapter.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a model is to be used. Mathematical modeling and statistics remain useful tools  for many disciplines (biology, agronomy, environmental studies, pharmacology, etc.), but it is important that these tools are used properly. The various software packages used in this wiki have been developed with this in mind: they serve the modeler well, while fully complying with a coherent mathematical formalism and using well-known and theoretically justified methods.&lt;br /&gt;
&lt;br /&gt;
Tools for model exploration ($\mlxplore$), modeling ($\monolix$) and simulation ($\simulix$) use the same model coding language $\mlxtran$. This allows us to define a complete workflow using the same model implementation, i.e., to run several different tasks based on the same model.&lt;br /&gt;
 &lt;br /&gt;
$\mlxtran$  is extremely flexible and well-adapted to implementing complex mixed-effects models.&lt;br /&gt;
With $\mlxtran$ we can easily write ODE-based models, implement  [[Introduction_to_PK_modeling_using_MLXPlore_-_Part_I|pharmacokinetic models]] with complex administration schedules, include inter-individual variability in parameters, define statistical models for covariates, etc.&lt;br /&gt;
Another crucial property of $\mlxtran$ is that it rigorously adopts the model representation formalism proposed in $\wikipopix$. In other words,  the model implementation is fully consistent with its mathematical representation.&lt;br /&gt;
&lt;br /&gt;
$\mlxplore$ provides a clear graphical interface that allows us to visualize not only the structural model but also the statistical model, which is of fundamental importance in the population approach. We can  visualize for instance the impact of covariates and inter-individual variability of model parameters on predictions.  Then, $\mlxplore$ is an ideal tool for teaching or discovering what is a [[Introduction_to_PK_modeling_using_MLXPlore_-_Part_I|pharmacokinetic model]] for example.&lt;br /&gt;
&lt;br /&gt;
The algorithms implemented in $\monolix$ (Stochastic Approximation of EM, MCMC, Simulated Annealing, Importance Sampling, etc.) are extremely efficient for a wide variety of complex models. Furthermore,  convergence of SAEM and its extensions (mixture models, hidden Markov models, SDE-based models, censored data, etc.)  has been rigorously proved and published in statistical journals.&lt;br /&gt;
&lt;br /&gt;
$\simulix$ is a model computation engine which enables us to simulate a $\mlxtran$ model from within various environments. $\simulix$ is now available for the Matlab and R   platforms, allowing any user to combine the flexibility of R and Matlab scripts  with the power of $\mlxtran$ in order to easily encode complex models and simulate data.&lt;br /&gt;
&lt;br /&gt;
For these reasons, $\wikipopix$ and these   tools can be used with confidence for training and teaching. This is even more the case because  $\mlxplore$, $\monolix$ and $\simulix$ are free for academic research and education purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Next&lt;br /&gt;
|link=The individual approach }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7175</id>
		<title>Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7175"/>
		<updated>2013-06-04T18:52:36Z</updated>

		<summary type="html">&lt;p&gt;Marc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;$&lt;br /&gt;
\def\simulix{\mathsf{simulix} } &lt;br /&gt;
$&lt;br /&gt;
The desire to model a biological or physical phenomenon often arises when we are able to record some observations issued from that phenomenon. Nothing would be more natural therefore than to begin this introduction by looking at some observed data.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= This first plot displays the viral load of four patients with hepatitis C who started  a treatment at time $t=0$.&lt;br /&gt;
|image = NEWintro1.png&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=This second example involves weight data for rats measured over 14 weeks, for a sub-chronic toxicity study related to the question of genetically modified corn.&lt;br /&gt;
|image = NEWintro2.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= In this third example, data are fluorescence intensities measured over time in a cellular biology experiment.&lt;br /&gt;
|image=NEWintro3.png }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= Note that repeated measurements are not necessarily always functions of time.&lt;br /&gt;
For example, we may be interested in corn production as a function of fertilizer quantity.&lt;br /&gt;
|image= NEWintro4.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even though these examples come from quite different domains, in each case the data is made up of repeated measurements on several individuals from a population. What we will call a &amp;quot;population approach&amp;quot; is therefore relevant for characterizing and modeling this data. The modeling goal is thus twofold: characterize the biological or physical phenomena observed for each individual, and secondly, the variability seen between individuals.&lt;br /&gt;
&lt;br /&gt;
In the example with the rats, the model needs to integrate a growth model that describes how a rat's weight increases with time, and a statistical model that describes why these kinetics can vary from one rat to another. The goal is thus to finish with a &amp;quot;typical&amp;quot; curve for the population (in red) and to be able to explain the variability in the individual's curves (in green) around this population curve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:NEWintro5.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model will explain some of this variability by individual covariates such as sex or diet (rats 1 and 3 are male while rats 2 and 4 are female), but some of the variability will remain unexplained and will be considered as random. Integrating into the same model effects considered fixed and others considered random  leads naturally to the use of mixed-effects models.&lt;br /&gt;
&lt;br /&gt;
An alternative yet equivalent approach considers this model as a hierarchical one: each curve is described by a single model, and the variability between individual models is described by a population model. In the case of parametric models, this means that the observations for a given individual are described by a model of the observations that depends on a vector of individual parameters: this is the classic individual approach. The population approach is then a direct extension of [[The individual approach|the individual approach]]: we add a component to the model that describes the variability of the individual parameters within the population.&lt;br /&gt;
&lt;br /&gt;
A model can thus be seen as a [[What is a model? A joint probability distribution! | joint probability distribution]], which can easily be extended to the case where other variables in the model are considered as random variables: covariates, population parameters, the design, etc. The hierarchical structure of the model leads to a natural decomposition of the joint distribution into a product of conditional and marginal distributions.&lt;br /&gt;
&lt;br /&gt;
Models for [[Modeling the individual parameters |individual parameters]] and models for [[Modeling the observations | observations]] are described in the [[Introduction_%26_notation|Models]] chapter. In particular, models for [[Continuous data models|continuous observations]], [[Model for categorical data|categorical data]], [[Models for count data|count data]] and [[ Models for time-to-event data | survival data]] are presented and illustrated by various examples. Extensions for [[ Mixture models|mixture models]], [[Hidden Markov models|hidden Markov models]] and [[Stochastic differential equations based models| stochastic differential equation based models]] are also presented.&lt;br /&gt;
&lt;br /&gt;
The  Tasks &amp;amp; Tools chapter presents practical examples of using these models: [[Visualization|exploration and visualization]], [[Estimation|estimation]], [[Model evaluation#Model diagnostics|model diagnostics]], [[Model evaluation#Model selection|model selection]] and [[Simulation|simulation]]. All approaches and proposed methods  are rigorously detailed in the [[Introduction and notation|Methods]] chapter.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a model is to be used. Mathematical modeling and statistics remain useful tools  for many disciplines (biology, agronomy, environmental studies, pharmacology, etc.), but it is important that these tools are used properly. The various software packages used in this wiki have been developed with this in mind: they serve the modeler well, while fully complying with a coherent mathematical formalism and using well-known and theoretically justified methods.&lt;br /&gt;
&lt;br /&gt;
Tools for model exploration ($\mlxplore$), modeling ($\monolix$) and simulation ($\simulix$) use the same model coding language $\mlxtran$. This allows us to define a complete workflow using the same model implementation, i.e., to run several different tasks based on the same model.&lt;br /&gt;
 &lt;br /&gt;
$\mlxtran$  is extremely flexible and well-adapted to implementing complex mixed-effects models.&lt;br /&gt;
With $\mlxtran$ we can easily write ODE-based models, implement  pharmacokinetic models with complex administration schedules, include inter-individual variability in parameters, define statistical models for covariates, etc.&lt;br /&gt;
Another crucial property of $\mlxtran$ is that it rigorously adopts the model representation formalism proposed in $\wikipopix$. In other words,  the model implementation is fully consistent with its mathematical representation.&lt;br /&gt;
&lt;br /&gt;
$\mlxplore$ provides a clear graphical interface that allows us to visualize not only the structural model but also the statistical model, which is of fundamental importance in the population approach. We can  visualize for instance the impact of covariates and inter-individual variability of model parameters on predictions.&lt;br /&gt;
&lt;br /&gt;
The algorithms implemented in $\monolix$ (Stochastic Approximation of EM, MCMC, Simulated Annealing, Importance Sampling, etc.) are extremely efficient for a wide variety of complex models. Furthermore,  convergence of SAEM and its extensions (mixture models, hidden Markov models, SDE-based models, censored data, etc.)  has been rigorously proved and published in statistical journals.&lt;br /&gt;
&lt;br /&gt;
$\simulix$ is a model computation engine which enables us to simulate a $\mlxtran$ model from within various environments. $\simulix$ is now available for the Matlab and R   platforms, allowing any user to combine the flexibility of R and Matlab scripts  with the power of $\mlxtran$ in order to easily encode complex models and simulate data.&lt;br /&gt;
&lt;br /&gt;
For these reasons, $\wikipopix$ and these   tools can be used with confidence for training and teaching. This is even more the case because  $\mlxplore$, $\monolix$ and $\simulix$ are free for academic research and education purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Next&lt;br /&gt;
|link=The individual approach }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7174</id>
		<title>Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7174"/>
		<updated>2013-06-04T18:48:36Z</updated>

		<summary type="html">&lt;p&gt;Marc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;$&lt;br /&gt;
\def\simulix{\mathsf{simulix} } &lt;br /&gt;
$&lt;br /&gt;
The desire to model a biological or physical phenomenon often arises when we are able to record some observations issued from that phenomenon. Nothing would be more natural therefore than to begin this introduction by looking at some observed data.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= This first plot displays the viral load of four patients with hepatitis C who started  a treatment at time $t=0$.&lt;br /&gt;
|image = NEWintro1.png&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=This second example involves weight data for rats measured over 14 weeks, for a sub-chronic toxicity study related to the question of genetically modified corn.&lt;br /&gt;
|image = NEWintro2.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= In this third example, data are fluorescence intensities measured over time in a cellular biology experiment.&lt;br /&gt;
|image=NEWintro3.png }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= Note that repeated measurements are not necessarily always functions of time.&lt;br /&gt;
For example, we may be interested in corn production as a function of fertilizer quantity.&lt;br /&gt;
|image= NEWintro4.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even though these examples come from quite different domains, in each case the data is made up of repeated measurements on several individuals from a population. What we will call a &amp;quot;population approach&amp;quot; is therefore relevant for characterizing and modeling this data. The modeling goal is thus twofold: characterize the biological or physical phenomena observed for each individual, and secondly, the variability seen between individuals.&lt;br /&gt;
&lt;br /&gt;
In the example with the rats, the model needs to integrate a growth model that describes how a rat's weight increases with time, and a statistical model that describes why these kinetics can vary from one rat to another. The goal is thus to finish with a &amp;quot;typical&amp;quot; curve for the population (in red) and to be able to explain the variability in the individual's curves (in green) around this population curve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:NEWintro5.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model will explain some of this variability by individual covariates such as sex or diet (rats 1 and 3 are male while rats 2 and 4 are female), but some of the variability will remain unexplained and will be considered as random. Integrating into the same model effects considered fixed and others considered random  leads naturally to the use of mixed-effects models.&lt;br /&gt;
&lt;br /&gt;
An alternative yet equivalent approach considers this model as a hierarchical one: each curve is described by a single model, and the variability between individual models is described by a population model. In the case of parametric models, this means that the observations for a given individual are described by a model of the observations that depends on a vector of individual parameters: this is the classic individual approach. The population approach is then a direct extension of [[The individual approach|the individual approach]]: we add a component to the model that describes the variability of the individual parameters within the population.&lt;br /&gt;
&lt;br /&gt;
A model can thus be seen as a [[What is a model? A joint probability distribution! | joint probability distribution]], which can easily be extended to the case where other variables in the model are considered as random variables: covariates, population parameters, the design, etc. The hierarchical structure of the model leads to a natural decomposition of the joint distribution into a product of conditional and marginal distributions.&lt;br /&gt;
&lt;br /&gt;
Models for [[Modeling the individual parameters |individual parameters]] and models for [[Modeling the observations | observations]] are described in the [[Introduction_%26_notation|Models]] chapter. In particular, models for [[Continuous data models|continuous observations]], [[Model for categorical data|categorical]], [[Models for count data|count]] and [[ Models for time-to-event data | survival data]] are presented and illustrated by various examples. Extensions for [[ Mixture models|mixture models]], [[Hidden Markov models|hidden Markov models]] and [[Stochastic differential equations based models| stochastic differential equation-based models are also presented]].&lt;br /&gt;
&lt;br /&gt;
The  Tasks &amp;amp; Tools chapter presents practical examples of using these models: [[Visualization|exploration and visualization]], [[Estimation|estimation]], [[Model evaluation#Model diagnostics|model diagnostics]], [[Model evaluation#Model selection|model selection]] and [[Simulation|simulation]]. All approaches and proposed methods  are rigorously detailed in the [[Introduction and notation|Methods]] chapter.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a model is to be used. Mathematical modeling and statistics remain useful tools  for many disciplines (biology, agronomy, environmental studies, pharmacology, etc.), but it is important that these tools are used properly. The various software packages used in this wiki have been developed with this in mind: they serve the modeler well, while fully complying with a coherent mathematical formalism and using well-known and theoretically justified methods.&lt;br /&gt;
&lt;br /&gt;
Tools for model exploration ($\mlxplore$), modeling ($\monolix$) and simulation ($\simulix$) use the same model coding language $\mlxtran$. This allows us to define a complete workflow using the same model implementation, i.e., to run several different tasks based on the same model.&lt;br /&gt;
 &lt;br /&gt;
$\mlxtran$  is extremely flexible and well-adapted to implementing complex mixed-effects models.&lt;br /&gt;
With $\mlxtran$ we can easily write ODE-based models, implement  pharmacokinetic models with complex administration schedules, include inter-individual variability in parameters, define statistical models for covariates, etc.&lt;br /&gt;
Another crucial property of $\mlxtran$ is that it rigorously adopts the model representation formalism proposed in $\wikipopix$. In other words,  the model implementation is fully consistent with its mathematical representation.&lt;br /&gt;
&lt;br /&gt;
$\mlxplore$ provides a clear graphical interface that allows us to visualize not only the structural model but also the statistical model, which is of fundamental importance in the population approach. We can  visualize for instance the impact of covariates and inter-individual variability of model parameters on predictions.&lt;br /&gt;
&lt;br /&gt;
The algorithms implemented in $\monolix$ (Stochastic Approximation of EM, MCMC, Simulated Annealing, Importance Sampling, etc.) are extremely efficient for a wide variety of complex models. Furthermore,  convergence of SAEM and its extensions (mixture models, hidden Markov models, SDE-based models, censored data, etc.)  has been rigorously proved and published in statistical journals.&lt;br /&gt;
&lt;br /&gt;
$\simulix$ is a model computation engine which enables us to simulate a $\mlxtran$ model from within various environments. $\simulix$ is now available for the Matlab and R   platforms, allowing any user to combine the flexibility of R and Matlab scripts  with the power of $\mlxtran$ in order to easily encode complex models and simulate data.&lt;br /&gt;
&lt;br /&gt;
For these reasons, $\wikipopix$ and these   tools can be used with confidence for training and teaching. This is even more the case because  $\mlxplore$, $\monolix$ and $\simulix$ are free for academic research and education purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Next&lt;br /&gt;
|link=The individual approach }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7173</id>
		<title>Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Overview&amp;diff=7173"/>
		<updated>2013-06-04T18:47:01Z</updated>

		<summary type="html">&lt;p&gt;Marc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;$&lt;br /&gt;
\def\simulix{\mathsf{simulix} } &lt;br /&gt;
$&lt;br /&gt;
The desire to model a biological or physical phenomenon often arises when we are able to record some observations issued from that phenomenon. Nothing would be more natural therefore than to begin this introduction by looking at some observed data.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= This first plot displays the viral load of four patients with hepatitis C who started  a treatment at time $t=0$.&lt;br /&gt;
|image = NEWintro1.png&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=This second example involves weight data for rats measured over 14 weeks, for a sub-chronic toxicity study related to the question of genetically modified corn.&lt;br /&gt;
|image = NEWintro2.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= In this third example, data are fluorescence intensities measured over time in a cellular biology experiment.&lt;br /&gt;
|image=NEWintro3.png }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= Note that repeated measurements are not necessarily always functions of time.&lt;br /&gt;
For example, we may be interested in corn production as a function of fertilizer quantity.&lt;br /&gt;
|image= NEWintro4.png}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even though these examples come from quite different domains, in each case the data is made up of repeated measurements on several individuals from a population. What we will call a &amp;quot;population approach&amp;quot; is therefore relevant for characterizing and modeling this data. The modeling goal is thus twofold: characterize the biological or physical phenomena observed for each individual, and secondly, the variability seen between individuals.&lt;br /&gt;
&lt;br /&gt;
In the example with the rats, the model needs to integrate a growth model that describes how a rat's weight increases with time, and a statistical model that describes why these kinetics can vary from one rat to another. The goal is thus to finish with a &amp;quot;typical&amp;quot; curve for the population (in red) and to be able to explain the variability in the individual's curves (in green) around this population curve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:NEWintro5.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The model will explain some of this variability by individual covariates such as sex or diet (rats 1 and 3 are male while rats 2 and 4 are female), but some of the variability will remain unexplained and will be considered as random. Integrating into the same model effects considered fixed and others considered random  leads naturally to the use of mixed-effects models.&lt;br /&gt;
&lt;br /&gt;
An alternative yet equivalent approach considers this model as a hierarchical one: each curve is described by a single model, and the variability between individual models is described by a population model. In the case of parametric models, this means that the observations for a given individual are described by a model of the observations that depends on a vector of individual parameters: this is the classic individual approach. The population approach is then a direct extension of [[The individual approach|the individual approach]]: we add a component to the model that describes the variability of the individual parameters within the population.&lt;br /&gt;
&lt;br /&gt;
A model can thus be seen as a [[What is a model? A joint probability distribution! | joint probability distribution]], which can easily be extended to the case where other variables in the model are considered as random variables: covariates, population parameters, the design, etc. The hierarchical structure of the model leads to a natural decomposition of the joint distribution into a product of conditional and marginal distributions.&lt;br /&gt;
&lt;br /&gt;
Models for [[Modeling the individual parameters | individual parameters]] and models for [[Modeling the observations | observations]] are described in the Models chapter. In particular, models for [[Continuous data models|continuous observations]], [[Model for categorical data|categorical]], [[Models for count data|count]] and [[ Models for time-to-event data | survival data]] are presented and illustrated by various examples. Extensions for [[ Mixture models|mixture models]], [[Hidden Markov models|hidden Markov models]] and [[Stochastic differential equations based models| stochastic differential equation-based models are also presented]].&lt;br /&gt;
&lt;br /&gt;
The  Tasks &amp;amp; Tools chapter presents practical examples of using these models: [[Visualization|exploration and visualization]], [[Estimation|estimation]], [[Model evaluation#Model diagnostics|model diagnostics]], [[Model evaluation#Model selection|model selection]] and [[Simulation|simulation]]. All approaches and proposed methods  are rigorously detailed in the [[Introduction and notation|Methods]] chapter.&lt;br /&gt;
&lt;br /&gt;
The main purpose of a model is to be used. Mathematical modeling and statistics remain useful tools  for many disciplines (biology, agronomy, environmental studies, pharmacology, etc.), but it is important that these tools are used properly. The various software packages used in this wiki have been developed with this in mind: they serve the modeler well, while fully complying with a coherent mathematical formalism and using well-known and theoretically justified methods.&lt;br /&gt;
&lt;br /&gt;
Tools for model exploration ($\mlxplore$), modeling ($\monolix$) and simulation ($\simulix$) use the same model coding language $\mlxtran$. This allows us to define a complete workflow using the same model implementation, i.e., to run several different tasks based on the same model.&lt;br /&gt;
 &lt;br /&gt;
$\mlxtran$  is extremely flexible and well-adapted to implementing complex mixed-effects models.&lt;br /&gt;
With $\mlxtran$ we can easily write ODE-based models, implement  pharmacokinetic models with complex administration schedules, include inter-individual variability in parameters, define statistical models for covariates, etc.&lt;br /&gt;
Another crucial property of $\mlxtran$ is that it rigorously adopts the model representation formalism proposed in $\wikipopix$. In other words,  the model implementation is fully consistent with its mathematical representation.&lt;br /&gt;
&lt;br /&gt;
$\mlxplore$ provides a clear graphical interface that allows us to visualize not only the structural model but also the statistical model, which is of fundamental importance in the population approach. We can  visualize for instance the impact of covariates and inter-individual variability of model parameters on predictions.&lt;br /&gt;
&lt;br /&gt;
The algorithms implemented in $\monolix$ (Stochastic Approximation of EM, MCMC, Simulated Annealing, Importance Sampling, etc.) are extremely efficient for a wide variety of complex models. Furthermore,  convergence of SAEM and its extensions (mixture models, hidden Markov models, SDE-based models, censored data, etc.)  has been rigorously proved and published in statistical journals.&lt;br /&gt;
&lt;br /&gt;
$\simulix$ is a model computation engine which enables us to simulate a $\mlxtran$ model from within various environments. $\simulix$ is now available for the Matlab and R   platforms, allowing any user to combine the flexibility of R and Matlab scripts  with the power of $\mlxtran$ in order to easily encode complex models and simulate data.&lt;br /&gt;
&lt;br /&gt;
For these reasons, $\wikipopix$ and these   tools can be used with confidence for training and teaching. This is even more the case because  $\mlxplore$, $\monolix$ and $\simulix$ are free for academic research and education purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Next&lt;br /&gt;
|link=The individual approach }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=The_SAEM_algorithm_for_estimating_population_parameters&amp;diff=7172</id>
		<title>The SAEM algorithm for estimating population parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=The_SAEM_algorithm_for_estimating_population_parameters&amp;diff=7172"/>
		<updated>2013-06-04T18:25:47Z</updated>

		<summary type="html">&lt;p&gt;Marc: /* Bibliography */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SAEM (Stochastic Approximation of EM) algorithm is a stochastic algorithm for calculating the maximum likelihood estimator (MLE) in the quite general setting of incomplete data models. SAEM has been shown to be a very powerful NLMEM tool, known to accurately estimate population parameters as well as having good theoretical properties. In fact, it converges to the MLE under very general hypotheses.&lt;br /&gt;
&lt;br /&gt;
SAEM was first implemented in the $\monolix$ software. It has also been implemented in NONMEM, the {{Verbatim|R}} package {{Verbatim|saemix}} and the Matlab statistics toolbox as the function {{Verbatim|nlmefitsa.m}}.&lt;br /&gt;
&lt;br /&gt;
Here, we consider a model that includes observations $\by=(y_i , 1\leq i \leq N)$, unobserved individual parameters $\bpsi=(\psi_i , 1\leq i \leq N)$ and a vector of parameters $\theta$. By definition, the maximum likelihood estimator of $\theta$ maximizes&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; {\like}(\theta ; \by) = \py(\by ; \theta) =  \displaystyle{ \int \pypsi(\by,\bpsi ; \theta) \, d \bpsi}.&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SAEM is an iterative algorithm that essentially consists of constructing $N$ Markov chains $(\psi_1^{(k)})$, ..., $(\psi_N^{(k)})$ that converge to the conditional distributions $\pmacro(\psi_1|y_1),\ldots , \pmacro(\psi_N|y_N)$, using at each step the complete data $(\by,\bpsi^{(k)})$ to calculate a new parameter vector $\theta_k$. We will present a general description of the algorithm highlighting the connection with the EM algorithm, and present by way of a simple example how to implement SAEM and use it in practice.&lt;br /&gt;
&lt;br /&gt;
We will also give some extensions of the base algorithm that allow us to improve the convergence properties of the algorithm. For instance, it is possible to stabilize the algorithm's convergence by using several Markov chains per individual. Also, a simulated annealing version of SAEM allows us improve the chances of converging to the global maximum of the likelihood rather than to local maxima.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==The EM algorithm==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We first remark that if the individual parameters $\bpsi=(\psi_i)$ are observed, estimation is not thwarted by any particular problem because an estimator could be found by directly maximizing the joint distribution $\pypsi(\by,\bpsi ; \theta) $.&lt;br /&gt;
&lt;br /&gt;
However, since the $\psi_i$  are not observed, the EM algorithm replaces $\bpsi$ by its conditional expectation. Then, given some initial value $\theta_0$,  iteration $k$  updates ${\theta}_{k-1}$ to ${\theta}_{k}$ with the two following steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{E-step:}$  evaluate the quantity&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta)=\esp{\log \pmacro(\by,\bpsi;\theta){{!}} \by;\theta_{k-1} } .&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{M-step:}$  update the estimation of $\theta$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \theta_{k} = \argmax{\theta} \, Q_k(\theta) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In can be proved that each EM iteration increases the likelihood of observations and that the EM sequence $(\theta_k)$ converges to a&lt;br /&gt;
stationary point of the observed likelihood under mild regularity conditions.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, in the framework of nonlinear mixed-effects models, there is no explicit expression for the E-step since the relationship between observations $\by$ and individual parameters $\bpsi$ is nonlinear. However, even though this expectation cannot be computed in a closed-form, it can be approximated by simulation. For instance,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The Monte Carlo EM (MCEM) algorithm replaces the E-step  by a Monte Carlo approximation based on a large number of independent simulations of the non-observed individual parameters $\bpsi$.&lt;br /&gt;
&lt;br /&gt;
* The SAEM algorithm replaces the E-step by a stochastic approximation based on a single simulation of $\bpsi$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The SAEM algorithm==&lt;br /&gt;
&lt;br /&gt;
At iteration $k$ of SAEM:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Simulation step}$: for $i=1,2,\ldots, N$, draw $\psi_i^{(k)}$ from the conditional distribution  $\pmacro(\psi_i |y_i ;\theta_{k-1})$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Stochastic approximation}$: update $Q_k(\theta)$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta) = Q_{k-1}(\theta) + \gamma_k ( \log \pmacro(\by,\bpsi^{(k)};\theta) - Q_{k-1}(\theta) ),&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $(\gamma_k)$ is a decreasing sequence of positive numbers  such that $\gamma_1=1$, $ \sum_{k=1}^{\infty} \gamma_k = \infty$ and $\sum_{k=1}^{\infty} \gamma_k^2 &amp;lt; \infty$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Maximization step}$: update $\theta_{k-1}$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \theta_{k} = \argmax{\theta} \, Q_k(\theta) .&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks &lt;br /&gt;
|title=Remarks&lt;br /&gt;
|text=  &amp;amp;#32;&lt;br /&gt;
* Setting $\gamma_k=1$ for all $k$ means that there is no memory in the stochastic approximation:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta) =  \log \pmacro(\by,\bpsi^{(k)};\theta) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: This algorithm, known as  Stochastic EM (SEM) thus consists  of successively simulating $\bpsi^{(k)}$ with the conditional distribution $\pmacro(\bpsi^{(k)} {{!}} \by;\theta_{k-1})$, then computing $\theta_k$ by maximizing the joint distribution $\pmacro(\by,\bpsi^{(k)};\theta)$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When the number $N$ of subjects is small,  convergence of SAEM  can be improved by running $L$ Markov chains for each individual instead of  one. The simulation step at iteration $k$ then requires us  to draw $L$ sequences $ { \phi_i^{(k,1)} } ,\ldots , { \phi_i^{(k,L)} } $ for each individual $i$ and to combine stochastic approximation and Monte Carlo in the approximation step:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta) = Q_{k-1}(\theta) + \gamma_k \left( \frac{1}{L}\sum_{\ell=1}^{L} \log \pmacro(\by,\bpsi^{(k,\ell)};\theta) - Q_{k-1}(\theta) \right) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: By default, $\monolix$ selects $L$ so that $N\times L \geq 50$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Implementation of SAEM is simplified when the complete model $\pmacro(\by,\bpsi;\theta)$ belongs to a regular (curved) exponential family:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \pmacro(\by,\bpsi ;\theta) = \exp\left\{ - \zeta(\theta) + \langle \tilde{S}(\by,\bpsi) , \varphi(\theta) \rangle \right\} , &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $\tilde{S}(\by,\bpsi)$ is a sufficient statistic of the complete model (i.e., whose value contains all the information needed to compute any estimate of $\theta$) which takes its values in an open subset ${\cal S}$ of $\Rset^m$. Then, there exists a function $\tilde{\theta}$ such that for any $s\in {\cal S}$,&lt;br /&gt;
&lt;br /&gt;
{{EquationWithRef&lt;br /&gt;
|equation=&amp;lt;div id=&amp;quot;eq:saem_stat&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\tilde{\theta}(s) = \argmax{\theta} \left\{ - \zeta(\theta) + \langle s , \varphi(\theta) \rangle \right\} .&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|reference=(1) }}&lt;br /&gt;
&lt;br /&gt;
The approximation step of SAEM simplifies to a general Robbins-Monro-type scheme for approximating this conditional expectation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Stochastic approximation}$: update $s_k$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
s_k = s_{k-1} + \gamma_k ( \tilde{S}(\by,\bpsi^{(k)}) - s_{k-1} ) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the E-step of EM simplifies to computing $s_k=\esp{\tilde{S}(\by,\bpsi) | \by ; \theta_{k-1}}$.&lt;br /&gt;
&lt;br /&gt;
Then, both EM and SAEM algorithms use [[#eq:saem_stat|(1)]] for the M-step:  $\theta_k = \tilde{\theta}(s_k)$.&lt;br /&gt;
&lt;br /&gt;
Precise results for convergence of SAEM were obtained in the [[Estimation of the observed Fisher information matrix#Estimation using linearization of the model|Estimation of the F.I.M. using a linearization of the model]] chapter in the case where $\pmacro(\by,\bpsi;\theta)$ belongs to a regular curved exponential family. This first version of [[The SAEM algorithm for estimating population parameters|SAEM]] and these first results assume that the individual parameters are simulated exactly under the conditional distribution at each iteration. Unfortunately, for most nonlinear models or non-Gaussian models, the unobserved data cannot be simulated exactly under this conditional distribution. A well-known alternative consists in using the Metropolis-Hastings algorithm: introduce a transition probability which has as unique invariant distribution the conditional distribution we want to simulate.&lt;br /&gt;
&lt;br /&gt;
In other words, the procedure consists of replacing the Simulation step of SAEM at iteration $k$ by $m$ iterations of the&lt;br /&gt;
Metropolis-Hastings (MH) algorithm described in [[The Metropolis-Hastings algorithm for simulating the individual parameters|The Metropolis-Hastings algorithm]] section. It was shown in the [[Estimation of the observed Fisher information matrix#Estimation using linearization of the model|Estimation of the F.I.M. using a linearization of the model]] section that [[The SAEM algorithm for estimating population parameters|SAEM]] still converges under general conditions when coupled with a Markov chain Monte Carlo procedure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title= Remark&lt;br /&gt;
|text= Convergence of the Markov chains $(\psi_i^{(k)})$ is not necessary at each SAEM  iteration. It suffices to run a few MH iterations with various transition kernels  before resetting $\theta_{k-1}$. In $\monolix$ by default, three transition kernels are used twice each, successively, in each SAEM iteration.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing SAEM ==&lt;br /&gt;
&lt;br /&gt;
Implementation of SAEM can be difficult to describe when looking at complex statistical models such as mixture models, models with inter-occasion variability, etc. We are therefore going to limit ourselves to looking at some basic models in order to illustrate how SAEM can be implemented.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===SAEM for general hierarchical  models===&lt;br /&gt;
&lt;br /&gt;
Consider first a very general model for any type (continuous, categorical, survival, etc.) of data $(y_i)$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation= &amp;lt;math&amp;gt;\begin{eqnarray} y_i {{!}} \psi_i &amp;amp;\sim&amp;amp; \pcyipsii(y_i {{!}} \psi_i) \\&lt;br /&gt;
h(\psi_i) &amp;amp;\sim&amp;amp; {\cal N}( \mu , \Omega),&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $h(\psi_i)=(h_1(\psi_{i,1}), h_2(\psi_{i,2}), \ldots , h_d(\psi_{i,d}) )^\transpose$ is a $d$-vector of (transformed) individual parameters, $\mu$ a $d$-vector of fixed effects and  $\Omega$ a $d\times d$ variance-covariance matrix.&lt;br /&gt;
&lt;br /&gt;
We assume here that $\Omega$ is positive-definite. Then, a sufficient statistic for the complete model $\pmacro(\by,\bpsi;\theta)$ is&lt;br /&gt;
$\tilde{S}(\bpsi) = (\tilde{S}_1(\bpsi),\tilde{S}_2(\bpsi))$, where&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\tilde{S}_1(\bpsi) &amp;amp;= &amp;amp; \sum_{i=1}^N h(\psi_i) \\&lt;br /&gt;
\tilde{S}_2(\bpsi) &amp;amp;= &amp;amp; \sum_{i=1}^N h(\psi_i) h(\psi_i)^\transpose .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
At iteration $k$ of SAEM, we have:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Simulation step}$: for $i=1,2,\ldots, N$, draw $\psi_i^{(k)}$ from $m$ iterations of the MH algorithm described in [[The Metropolis-Hastings algorithm for simulating the individual parameters|The Metropolis-Hastings algorithm]]  with $\pmacro(\psi_i |y_i ;\mu_{k-1},\Omega_{k-1})$ as limiting distribution.&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Stochastic approximation}$: update $s_k=(s_{k,1},s_{k,2})$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
s_{k,1} &amp;amp;=&amp;amp; s_{k-1,1} + \gamma_k \left( \sum_{i=1}^N h(\psi_i^{(k)}) - s_{k-1,1} \right) \\&lt;br /&gt;
s_{k,2} &amp;amp;=&amp;amp; s_{k-1,2} + \gamma_k \left( \sum_{i=1}^N h(\psi_i^{(k)})h(\psi_i^{(k)})^\transpose  - s_{k-1,2} \right) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Maximization step}$:  update $(\mu_{k-1},\Omega_{k-1})$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\mu_{k} &amp;amp;=&amp;amp; \frac{1}{N} s_{k,1} \\&lt;br /&gt;
\Omega_k &amp;amp;=&amp;amp; \frac{1}{N}\left( s_{k,2}  - s_{k,1}s_{k,1}^\transpose \right) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is remarkable is that it suffices to be able to calculate $\pcyipsii(y_i | \psi_i)$ for all $\psi_i$ and $y_i$ in order to be able to run SAEM. In effect, this allows the simulation step to be run using MH since the acceptance probabilities can be calculated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SAEM for continuous data models===&lt;br /&gt;
Consider now a continuous data model in which the residual error variance is now constant:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
y_{ij} &amp;amp;=&amp;amp; f(t_{ij},\phi_i) + a \teps_{ij} \\&lt;br /&gt;
h(\psi_i) &amp;amp;\sim&amp;amp; {\cal N}( \mu , \Omega) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the individual parameters are $\psi_i=(\phi_i,a)$. The variance-covariance matrix for $\psi_i$ is not positive-definite in this case because $a$ has no variability. If we suppose that the variance matrix $\Omega$ is positive-definite, then noting $\theta=(\mu,\Omega,a)$, a natural decomposition of the model is:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\pmacro(\by,\bpsi;\theta) = \pmacro(\by {{!}} \bpsi;a)\pmacro(\bpsi;\mu,\Omega) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The previous statistic $\tilde{S}(\bpsi) = (\tilde{S}_1(\bpsi),\tilde{S}_2(\bpsi))$ is not sufficient for estimating $a$. Indeed, we need an additional component which is a function both of $\by$ and $\bpsi$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \tilde{S}_3(\by, \bpsi) =\sum_{i=1}^N \sum_{j=1}^{n_i}(y_{ij} - f(t_{ij},\psi_i))^2. &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Then,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \begin{eqnarray}&lt;br /&gt;
s_{k,3} &amp;amp;=&amp;amp; s_{k-1,3} + \gamma_k ( \tilde{S}_3(\by, \bpsi) - s_{k-1,3} ) \\&lt;br /&gt;
a_k^2 &amp;amp;=&amp;amp; \displaystyle{ \frac{1}{\sum_{i=1}^N n_i} s_{k,3} }\ .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The choice of step-size $(\gamma_k)$ is extremely important for ensuring convergence of SAEM. The sequence $(\gamma_k)$ used in $\monolix$ decreases like $k^{-\alpha}$. We recommend using $\alpha=0$ (that is, $\gamma_k=1$) during the first $K_1$ iterations, in order to converge quickly to a neighborhood of a maximum of the likelihood, and $\alpha=1$ during the next $K_2$ iterations.&lt;br /&gt;
Indeed, the initial guess  $\theta_0$ may  be far  from the  maximum likelihood value  we are looking for, and the first iterations with $\gamma_k=1$ allow SAEM to converge quickly to a neighborhood of this value. Following this, smaller step-sizes ensure the&lt;br /&gt;
almost sure convergence of the algorithm to the maximum likelihood estimator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Example&lt;br /&gt;
|title=Example&lt;br /&gt;
|text= Consider a simple model for continuous data:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
y_{ij} &amp;amp;\sim&amp;amp; {\cal N}(A_i\,e^{-k_i \, t_{ij} } , a^2) \\&lt;br /&gt;
\log(A_i)&amp;amp;\sim&amp;amp;{\cal N}(\log(A_{\rm pop}) , \omega_A^2) \\&lt;br /&gt;
\log(k_i)&amp;amp;\sim&amp;amp;{\cal N}(\log(k_{\rm pop}) , \omega_k^2) ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $A_{\rm pop}=6$, $k_{\rm pop}=0.25$, $\omega_A=0.3$, $\omega_k=0.3$ and $a=0.2$.&lt;br /&gt;
Let us look at the effect of different settings for $(\gamma_k)$ (and $L$)  for estimating the population parameters of the model with SAEM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. For all $k$, $\gamma_k = 1$: the sequence $(\theta_{k})$ converges very quickly to a neighborhood of the &amp;quot;solution&amp;quot;. The sequence $(\theta_{k})$ is a homogeneous Markov Chain that converges in distribution but does not converge almost surely. &lt;br /&gt;
&lt;br /&gt;
[[File:saem1.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. For all $k$, $\gamma_k = 1/k$: the sequence $(\theta_{k})$ converges  almost surely  to the maximum likelihood estimate of $\theta$, but very slowly. &lt;br /&gt;
&lt;br /&gt;
[[File:saem2.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. $\gamma_k = 1$, $k=1$, ...,$40$, $\gamma_k = 1/(k-40)$, $k \geq 41$: the sequence $(\theta_{k})$ converges  almost surely  to the maximum likelihood estimate of $\theta$, and quickly.&lt;br /&gt;
&lt;br /&gt;
[[File:saem3.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. $L=10$, $\gamma_k = 1$, $k \geq 1$: the sequence $(\theta_{k})$ is an homogeneous Markov chain that converges in distribution, as in Example 1, but the variance  is reduced by a factor $\sqrt{10}$; in this case, SAEM behaves like EM. &lt;br /&gt;
&lt;br /&gt;
[[File:saem4.png|link=]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A simple example to understand why SAEM converges in  practice==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at a very simple Gaussian model, with only one observation per individual:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\psi_i &amp;amp;\sim&amp;amp; {\cal N}(\theta,\omega^2) , \ \ \ 1 \leq i \leq N \\&lt;br /&gt;
y_i &amp;amp;\sim&amp;amp; {\cal N}(\psi_i,\sigma^2).&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We will furthermore  assume  that both $\omega^2$ and $\sigma^2$ are known.&lt;br /&gt;
&lt;br /&gt;
Here, the maximum likelihood estimator $ \hat{\theta}$ of $\theta$ is easy to compute since $y_i \sim_{i.i.d.} {\cal N}(\theta,\omega^2+\sigma^2)$. We find that&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \hat{\theta}  = \displaystyle{\frac{1}{N} }\sum_{i=1}^{N} y_i  .&lt;br /&gt;
&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
We now propose to try and compute  $\hat{\theta}$ using SAEM instead. The simulation step  is straightforward since the conditional distribution of $\psi_i$ is a normal distribution:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
\psi_i {{!}} y_i \sim {\cal N}(a \theta + (1-a)y_i  , \gamma^2) ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
a  &amp;amp;= &amp;amp; \displaystyle{ \frac{1}{\omega^2} } \left(\displaystyle{ \frac{1}{\sigma^2} }+ \displaystyle{\frac{1}{\omega^2} }\right)^{-1} \\&lt;br /&gt;
\gamma^2 &amp;amp;= &amp;amp;\left(\displaystyle{ \frac{1}{\sigma^2} }+ \displaystyle{\frac{1}{\omega^2} }\right)^{-1}.&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The maximization step is also straightforward. Indeed, a sufficient statistic for estimating $\theta$ is&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; {\cal S}(\bpsi) = \sum_{i=1}^{N} \psi_i. &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Then,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\tilde{\theta}({\cal S(\bpsi)} ) &amp;amp;=&amp;amp; \argmax{\theta} \pmacro(y_1,\ldots,y_N,\psi_1,\ldots,\psi_N;\theta) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \argmax{\theta} \pmacro(\psi_1,\ldots,\psi_N;\theta) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \frac{ {\cal S}(\bpsi)}{N}.&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Let us first look at the behavior of SAEM  when $\gamma_k=1$. At iteration $k$,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Simulation step:  $\psi_i^{(k)} \sim {\cal N}( a \theta_{k-1} + (1-a)y_i  , \gamma^2). $&lt;br /&gt;
&lt;br /&gt;
* Maximization step: $\theta_k =  \displaystyle{ \frac{ {\cal S}(\bpsi^{(k)})}{N} } = \displaystyle{ \frac{1}{N} }\sum_{i=1}^{N} \psi_i^{(k)}$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can be shown that:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;  \theta_k - \hat{\theta} = a(\theta_{k-1} - \hat{\theta}) + e_k ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $e_k \sim {\cal N}(0, \gamma^2 /N)$. Then, the sequence $(\theta_k)$ is an autoregressive process of order 1 (AR(1)) which converges in distribution to a normal distribution when $k\to \infty$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\theta_k  \limite{}{\cal D} {\cal N}\left(\hat{\theta} , \displaystyle{ \frac{\gamma^2}{N(1-a^2)} }\right) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saemb1.png|caption=10 sequences $(\theta_k)$ obtained with different initial values and $\gamma_k=1$ for $1\leq k \leq 50$ }} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us see what happens instead when $\gamma_k$ decreases like $1/k$. At iteration $k$,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Simulation step: $\psi_i^{(k)} \sim {\cal N}( a \theta_{k-1} + (1-a)y_i  , \gamma^2) $&lt;br /&gt;
&lt;br /&gt;
* Maximization step:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation= &amp;lt;math&amp;gt;\theta_k = \theta_{k-1} + \displaystyle{ \frac{1}{k} }\left( \displaystyle{ \frac{1}{N} }\sum_{i=1}^{N} \psi_i^{(k)} -\theta_{k-1} \right). &lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Here, we can show that:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \theta_k - \hat{\theta} = \displaystyle{ \frac{k-a}{k} }(\theta_{k-1} - \hat{\theta}) + \displaystyle{\frac{e_k}{k} }, &lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: where $e_k \sim {\cal N}(0, \gamma^2 /N)$. Then, the sequence $(\theta_k)$ converges almost surely to $\hat{\theta}$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saemb2.png|caption=10 sequences $(\theta_k)$ obtained with different initial values and $\gamma_k=1/k$ for $1\leq k \leq 50$ }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, we see that by combining the two strategies, the sequence $(\theta_k)$ is a Markov chain that  converges to a random walk around $\hat{\theta}$ during the first $K_1$ iterations, then converges almost surely to $\hat{\theta}$ during the next $K_2$ iterations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saemb3.png|caption=10 sequences $(\theta_k)$ obtained with different initial values, $\gamma_k=1$ for $1\leq k \leq 20$ and $\gamma_k=1/(k-20)$ for $21\leq k \leq 50$ }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ShowVideo|image=saem5b.png|video=http://popix.lixoft.net/images/2/20/saem.mp4|caption=The SAEM algorithm in practice. }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- {{ImageWithCaptionL|image=saem5.png|size=750px|caption= The SAEM algorithm in practice. (a) the observations and the initialization $p_0(\psi_i)$, (b) the initialization $p_0(\psi_i)$ and the conditional distributions of the observations $p(y_i{{!}}\psi_i)$, (c) the conditional distributions $p_0(\psi_i{{!}}y_i)$ and the simulated individual parameters $(\psi_i^{(1)})$, (d)  the updated distribution $p_1(\psi_i)$. }} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A simulated annealing version of SAEM==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Convergence of SAEM can strongly depend on the initial guess when the likelihood ${\like}$ has several local maxima. A simulated annealing version of SAEM can improve convergence of the algorithm toward the global maximum of ${\like}$.&lt;br /&gt;
&lt;br /&gt;
To detail this, we can first  rewrite the joint pdf of $(\by,\bpsi)$ as follows:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\pmacro(\by,\bpsi;\theta)  =  C(\theta)\, \exp \left\{-U(\by,\bpsi;\theta)\right\} ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $C(\theta)$ is a normalizing constant that only depends on $\theta$. Then, for any &amp;quot;temperature&amp;quot; $T\geq0$, we consider the complete model&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\pmacro_T(\by,\bpsi;\theta)  =  C_T(\theta)\, \exp \left\{-\displaystyle{\frac{1}{T} }U(\by,\bpsi;\theta) \right\} ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $C_T(\theta)$ is still a normalizing constant.&lt;br /&gt;
&lt;br /&gt;
We then introduce a decreasing temperature sequence $(T_k, 1\leq k \leq K)$ and use the SAEM algorithm on the complete model $\pmacro_{T_k}(\by,\bpsi;\theta)$  at iteration $k$ (the usual version of SAEM uses $T_k=1$ at each iteration). The sequence $(T_k)$ is chosen to have large positive values during the first iterations, then decrease with an exponential rate to 1: $ T_k = \max(1, \tau \ T_{k-1}) $.&lt;br /&gt;
&lt;br /&gt;
Consider for example the following model for continuous data:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
y_{ij} &amp;amp;\sim&amp;amp; {\cal N}(f(t_{ij};\psi_i) , a^2) \\&lt;br /&gt;
h(\psi_i) &amp;amp;\sim&amp;amp; {\cal N}(\mu , \Omega) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Here, $\theta = (\mu,\Omega,a^2)$ and&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
\pmacro(\by,\bpsi;\theta)  =  C(\theta)\, \exp \left\{- \displaystyle{ \frac{1}{2 a^2} }\sum_{i=1}^N \sum_{j=1}^{n_i} (y_{ij} - f(t_{ij};\psi_i))^2 - \displaystyle{ \frac{1}{2} } \sum_{i=1}^N  (h(\psi_i)-\mu)^\transpose \Omega (h(\psi_i)-\mu)  \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $C(\theta)$ is a normalizing constant that only depends on $a$ and $\Omega$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see that $\pmacro_T(\by,\bpsi;\theta)$ will also be a normal distribution whose residual error variance $a^2$ is replaced by $T a^2$ and  variance matrix $\Omega$ for the random effects  by $T\Omega$.&lt;br /&gt;
In other words, a model with a &amp;quot;large temperature&amp;quot; is a model with large variances.&lt;br /&gt;
&lt;br /&gt;
The algorithm therefore consists in choosing large initial variances $\Omega_0$ and $a^2_0$ (that include the initial temperature $T_0$ implicitly) and setting $ a^2_k = \max(\tau \ a^2_{k-1} , \hat{a}(\by,\bpsi^{(k)}) $ and $ \Omega_k = \max(\tau \ \Omega_{k-1} , \hat{\Omega}(\bpsi^{(k)}) $ during the first iterations. Here, $0\leq\tau\leq 1$.&lt;br /&gt;
&lt;br /&gt;
These large values of the variance make the conditional distributions $\pmacro_T(\psi_i | y_i;\theta)$ less concentrated around their modes, and thus allow the sequence $(\theta_k)$ to &amp;quot;escape&amp;quot; from local maxima of the likelihood during the first iterations of SAEM and converge to a neighborhood of the global maximum of ${\like}$.&lt;br /&gt;
After these initial iterations, the usual SAEM algorithm is used to estimate these variances at each iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title= Remark&lt;br /&gt;
|text= We can use two different coefficients $\tau_1$ and $\tau_2$ for $\Omega$ and $a^2$ in $\monolix$. It is possible, for example, to choose $\tau_1&amp;lt;1$ and $\tau_2&amp;gt;1$, with large initial inter-subject variances $\Omega_0$  and small initial residual variance $a^2_0$. In this case, SAEM tries to obtain the best possible fit during the first iterations, allowing for a large inter-subject variability. During the next iterations, this variability is reduced and the residual variance increases until reaching the best possible trade-off between the two criteria.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Example&lt;br /&gt;
|title=A PK example&lt;br /&gt;
|text= &lt;br /&gt;
&lt;br /&gt;
Consider a simple one-compartment model for oral administration:&lt;br /&gt;
&lt;br /&gt;
{{EquationWithRef&lt;br /&gt;
|equation=&amp;lt;div id=&amp;quot;eq:saem_sa&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
f(t;ka,V,k) = \displaystyle{ \frac{D\, ka}{V(ka-ke)} }\left( e^{-ke \, t} - e^{-ka \, t} \right) .&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|reference=(2) }}&lt;br /&gt;
&lt;br /&gt;
We then simulate PK data from 80 patients using the following population PK parameters:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; ka_{\rm pop} = 1, \quad V_{\rm pop}=8, \quad ke_{\rm pop}=0.25 .&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We can see that the following parametrization gives the same prediction as the one given in [[#eq:saem_sa|(2)]]:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \tilde{ka} = ke, \quad \tilde{V}=V \times ke/ka, \quad \tilde{ke}=ka . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We can then expect a (global) maximum around $(ka,V,ke) = (1, \ 8, \ 0.25)$ and a (local) maximum of the likelihood around $(ka,V,ke) = (0.25, \ 2, \ 1).$&lt;br /&gt;
&lt;br /&gt;
The figure  below displays the convergence of SAEM without simulated annealing to a local maximum of the likelihood (deviance = $-2\,\log {\like} =816$).  The initial values of the population parameters we chose were $(ka_0,V_0,k_0) = (1,1,1)$.&lt;br /&gt;
&lt;br /&gt;
:{{ImageWithCaption_special|image=recuit1.png|caption=Convergence of SAEM to a local maxima of the likelihood}} &lt;br /&gt;
&lt;br /&gt;
Using the same initial guess, the simulated annealing version of SAEM converges to the global maximum of the likelihood (deviance = 734).&lt;br /&gt;
&lt;br /&gt;
:{{ImageWithCaption_special|image=recuit2.png|caption=Convergence of SAEM to the global maxima of the likelihood }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Bibliography ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{allassonniere2010construction,&lt;br /&gt;
  title={Construction of Bayesian deformable models via a stochastic approximation algorithm: a convergence study},&lt;br /&gt;
  author={Allassonnière, S. and Kuhn, E. and Trouvé, A.},&lt;br /&gt;
  journal={Bernoulli},&lt;br /&gt;
  volume={16},&lt;br /&gt;
  number={3},&lt;br /&gt;
  pages={641--678},&lt;br /&gt;
  year={2010},&lt;br /&gt;
  publisher={Bernoulli Society for Mathematical Statistics and Probability}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{delattre2012maximum,&lt;br /&gt;
  title={Maximum likelihood estimation in discrete mixed hidden Markov models using the SAEM algorithm},&lt;br /&gt;
  author={Delattre, M. and Lavielle, M.},&lt;br /&gt;
  journal={Computational Statistics &amp;amp; Data Analysis},&lt;br /&gt;
  year={2012},&lt;br /&gt;
 volume={56},&lt;br /&gt;
pages={2073-2085}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{delattre2013sde,&lt;br /&gt;
  title={Coupling the SAEM algorithm and the extended Kalman filter for maximum likelihood estimation in mixed-effects diffusion models},&lt;br /&gt;
  author={Delattre, M. and Lavielle, M.},&lt;br /&gt;
  journal={Statistics and its interfaces},&lt;br /&gt;
 year={2013},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{delyon1999convergence,&lt;br /&gt;
  title={Convergence of a stochastic approximation version of the EM algorithm},&lt;br /&gt;
  author={Delyon, B. and Lavielle, M. and Moulines, E.},&lt;br /&gt;
  journal={Annals of Statistics},&lt;br /&gt;
  pages={94-128},&lt;br /&gt;
  year={1999},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{dempster1977maximum,&lt;br /&gt;
  title={Maximum likelihood from incomplete data via the EM algorithm},&lt;br /&gt;
  author={Dempster, A.P. and Laird, N.M. and Rubin, D.B.},&lt;br /&gt;
  journal={Journal of the Royal Statistical Society. Series B (Methodological)},&lt;br /&gt;
  pages={1-38},&lt;br /&gt;
  year={1977},&lt;br /&gt;
  publisher={JSTOR}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{kuhn2004coupling,&lt;br /&gt;
  title={Coupling a stochastic approximation version of EM with an MCMC procedure},&lt;br /&gt;
  author={Kuhn, E. and Lavielle, M.},&lt;br /&gt;
  journal={ESAIM: Probability and Statistics},&lt;br /&gt;
  volume={8},&lt;br /&gt;
  pages={115-131},&lt;br /&gt;
  year={2004},&lt;br /&gt;
  publisher={EDP Sciences, 17 Avenue du Hoggar Les Ulis Cedex A BP 112 91944 France}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{lavielle2013improved,&lt;br /&gt;
  title={An improved SAEM algorithm for maximum likelihood estimation in mixtures of non linear mixed effects models},&lt;br /&gt;
  author={Lavielle, M. and Mbogning, C.},&lt;br /&gt;
  journal={Statistics and Computing},&lt;br /&gt;
  year={2013},&lt;br /&gt;
  publisher={Springer}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{mclachlan2007algorithm,&lt;br /&gt;
  title={The EM algorithm and extensions},&lt;br /&gt;
  author={McLachlan, G.J. and Krishnan, T.},&lt;br /&gt;
  volume={382},&lt;br /&gt;
  year={2007},&lt;br /&gt;
  publisher={Wiley-Interscience}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{samson2006extension,&lt;br /&gt;
  title={Extension of the SAEM algorithm to left-censored data in nonlinear mixed-effects model: Application to HIV dynamics model},&lt;br /&gt;
  author={Samson, A. and Lavielle, M. and Mentr&amp;amp;eacute;, F.},&lt;br /&gt;
  journal={Computational statistics &amp;amp; data analysis},&lt;br /&gt;
  volume={51},&lt;br /&gt;
  number={3},&lt;br /&gt;
  pages={1562-1574},&lt;br /&gt;
  year={2006},&lt;br /&gt;
  publisher={Elsevier}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{wei1990monte,&lt;br /&gt;
  title={A Monte Carlo implementation of the EM algorithm and the poor man's data augmentation algorithms},&lt;br /&gt;
  author={Wei, G. and Tanner, M.},&lt;br /&gt;
  journal={Journal of the American Statistical Association},&lt;br /&gt;
  volume={85},&lt;br /&gt;
  number={411},&lt;br /&gt;
  pages={699-704},&lt;br /&gt;
  year={1990},&lt;br /&gt;
  publisher={Taylor &amp;amp; Francis}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{wu1983convergence,&lt;br /&gt;
  title={On the convergence properties of the EM algorithm},&lt;br /&gt;
  author={Wu, C.F.},&lt;br /&gt;
  journal={The Annals of Statistics},&lt;br /&gt;
  volume={11},&lt;br /&gt;
  number={1},&lt;br /&gt;
  pages={95-103},&lt;br /&gt;
  year={1983},&lt;br /&gt;
  publisher={Institute of Mathematical Statistics}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Back&amp;amp;Next&lt;br /&gt;
|linkBack=Introduction and notation&lt;br /&gt;
|linkNext=The Metropolis-Hastings algorithm for simulating the individual parameters }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=The_SAEM_algorithm_for_estimating_population_parameters&amp;diff=7171</id>
		<title>The SAEM algorithm for estimating population parameters</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=The_SAEM_algorithm_for_estimating_population_parameters&amp;diff=7171"/>
		<updated>2013-06-04T18:24:47Z</updated>

		<summary type="html">&lt;p&gt;Marc: /* Bibliography */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SAEM (Stochastic Approximation of EM) algorithm is a stochastic algorithm for calculating the maximum likelihood estimator (MLE) in the quite general setting of incomplete data models. SAEM has been shown to be a very powerful NLMEM tool, known to accurately estimate population parameters as well as having good theoretical properties. In fact, it converges to the MLE under very general hypotheses.&lt;br /&gt;
&lt;br /&gt;
SAEM was first implemented in the $\monolix$ software. It has also been implemented in NONMEM, the {{Verbatim|R}} package {{Verbatim|saemix}} and the Matlab statistics toolbox as the function {{Verbatim|nlmefitsa.m}}.&lt;br /&gt;
&lt;br /&gt;
Here, we consider a model that includes observations $\by=(y_i , 1\leq i \leq N)$, unobserved individual parameters $\bpsi=(\psi_i , 1\leq i \leq N)$ and a vector of parameters $\theta$. By definition, the maximum likelihood estimator of $\theta$ maximizes&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; {\like}(\theta ; \by) = \py(\by ; \theta) =  \displaystyle{ \int \pypsi(\by,\bpsi ; \theta) \, d \bpsi}.&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SAEM is an iterative algorithm that essentially consists of constructing $N$ Markov chains $(\psi_1^{(k)})$, ..., $(\psi_N^{(k)})$ that converge to the conditional distributions $\pmacro(\psi_1|y_1),\ldots , \pmacro(\psi_N|y_N)$, using at each step the complete data $(\by,\bpsi^{(k)})$ to calculate a new parameter vector $\theta_k$. We will present a general description of the algorithm highlighting the connection with the EM algorithm, and present by way of a simple example how to implement SAEM and use it in practice.&lt;br /&gt;
&lt;br /&gt;
We will also give some extensions of the base algorithm that allow us to improve the convergence properties of the algorithm. For instance, it is possible to stabilize the algorithm's convergence by using several Markov chains per individual. Also, a simulated annealing version of SAEM allows us improve the chances of converging to the global maximum of the likelihood rather than to local maxima.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==The EM algorithm==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We first remark that if the individual parameters $\bpsi=(\psi_i)$ are observed, estimation is not thwarted by any particular problem because an estimator could be found by directly maximizing the joint distribution $\pypsi(\by,\bpsi ; \theta) $.&lt;br /&gt;
&lt;br /&gt;
However, since the $\psi_i$  are not observed, the EM algorithm replaces $\bpsi$ by its conditional expectation. Then, given some initial value $\theta_0$,  iteration $k$  updates ${\theta}_{k-1}$ to ${\theta}_{k}$ with the two following steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{E-step:}$  evaluate the quantity&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta)=\esp{\log \pmacro(\by,\bpsi;\theta){{!}} \by;\theta_{k-1} } .&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{M-step:}$  update the estimation of $\theta$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \theta_{k} = \argmax{\theta} \, Q_k(\theta) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In can be proved that each EM iteration increases the likelihood of observations and that the EM sequence $(\theta_k)$ converges to a&lt;br /&gt;
stationary point of the observed likelihood under mild regularity conditions.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, in the framework of nonlinear mixed-effects models, there is no explicit expression for the E-step since the relationship between observations $\by$ and individual parameters $\bpsi$ is nonlinear. However, even though this expectation cannot be computed in a closed-form, it can be approximated by simulation. For instance,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The Monte Carlo EM (MCEM) algorithm replaces the E-step  by a Monte Carlo approximation based on a large number of independent simulations of the non-observed individual parameters $\bpsi$.&lt;br /&gt;
&lt;br /&gt;
* The SAEM algorithm replaces the E-step by a stochastic approximation based on a single simulation of $\bpsi$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The SAEM algorithm==&lt;br /&gt;
&lt;br /&gt;
At iteration $k$ of SAEM:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Simulation step}$: for $i=1,2,\ldots, N$, draw $\psi_i^{(k)}$ from the conditional distribution  $\pmacro(\psi_i |y_i ;\theta_{k-1})$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Stochastic approximation}$: update $Q_k(\theta)$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta) = Q_{k-1}(\theta) + \gamma_k ( \log \pmacro(\by,\bpsi^{(k)};\theta) - Q_{k-1}(\theta) ),&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $(\gamma_k)$ is a decreasing sequence of positive numbers  such that $\gamma_1=1$, $ \sum_{k=1}^{\infty} \gamma_k = \infty$ and $\sum_{k=1}^{\infty} \gamma_k^2 &amp;lt; \infty$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Maximization step}$: update $\theta_{k-1}$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \theta_{k} = \argmax{\theta} \, Q_k(\theta) .&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks &lt;br /&gt;
|title=Remarks&lt;br /&gt;
|text=  &amp;amp;#32;&lt;br /&gt;
* Setting $\gamma_k=1$ for all $k$ means that there is no memory in the stochastic approximation:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta) =  \log \pmacro(\by,\bpsi^{(k)};\theta) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: This algorithm, known as  Stochastic EM (SEM) thus consists  of successively simulating $\bpsi^{(k)}$ with the conditional distribution $\pmacro(\bpsi^{(k)} {{!}} \by;\theta_{k-1})$, then computing $\theta_k$ by maximizing the joint distribution $\pmacro(\by,\bpsi^{(k)};\theta)$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When the number $N$ of subjects is small,  convergence of SAEM  can be improved by running $L$ Markov chains for each individual instead of  one. The simulation step at iteration $k$ then requires us  to draw $L$ sequences $ { \phi_i^{(k,1)} } ,\ldots , { \phi_i^{(k,L)} } $ for each individual $i$ and to combine stochastic approximation and Monte Carlo in the approximation step:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; Q_k(\theta) = Q_{k-1}(\theta) + \gamma_k \left( \frac{1}{L}\sum_{\ell=1}^{L} \log \pmacro(\by,\bpsi^{(k,\ell)};\theta) - Q_{k-1}(\theta) \right) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: By default, $\monolix$ selects $L$ so that $N\times L \geq 50$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Implementation of SAEM is simplified when the complete model $\pmacro(\by,\bpsi;\theta)$ belongs to a regular (curved) exponential family:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \pmacro(\by,\bpsi ;\theta) = \exp\left\{ - \zeta(\theta) + \langle \tilde{S}(\by,\bpsi) , \varphi(\theta) \rangle \right\} , &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $\tilde{S}(\by,\bpsi)$ is a sufficient statistic of the complete model (i.e., whose value contains all the information needed to compute any estimate of $\theta$) which takes its values in an open subset ${\cal S}$ of $\Rset^m$. Then, there exists a function $\tilde{\theta}$ such that for any $s\in {\cal S}$,&lt;br /&gt;
&lt;br /&gt;
{{EquationWithRef&lt;br /&gt;
|equation=&amp;lt;div id=&amp;quot;eq:saem_stat&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\tilde{\theta}(s) = \argmax{\theta} \left\{ - \zeta(\theta) + \langle s , \varphi(\theta) \rangle \right\} .&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|reference=(1) }}&lt;br /&gt;
&lt;br /&gt;
The approximation step of SAEM simplifies to a general Robbins-Monro-type scheme for approximating this conditional expectation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Stochastic approximation}$: update $s_k$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
s_k = s_{k-1} + \gamma_k ( \tilde{S}(\by,\bpsi^{(k)}) - s_{k-1} ) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the E-step of EM simplifies to computing $s_k=\esp{\tilde{S}(\by,\bpsi) | \by ; \theta_{k-1}}$.&lt;br /&gt;
&lt;br /&gt;
Then, both EM and SAEM algorithms use [[#eq:saem_stat|(1)]] for the M-step:  $\theta_k = \tilde{\theta}(s_k)$.&lt;br /&gt;
&lt;br /&gt;
Precise results for convergence of SAEM were obtained in the [[Estimation of the observed Fisher information matrix#Estimation using linearization of the model|Estimation of the F.I.M. using a linearization of the model]] chapter in the case where $\pmacro(\by,\bpsi;\theta)$ belongs to a regular curved exponential family. This first version of [[The SAEM algorithm for estimating population parameters|SAEM]] and these first results assume that the individual parameters are simulated exactly under the conditional distribution at each iteration. Unfortunately, for most nonlinear models or non-Gaussian models, the unobserved data cannot be simulated exactly under this conditional distribution. A well-known alternative consists in using the Metropolis-Hastings algorithm: introduce a transition probability which has as unique invariant distribution the conditional distribution we want to simulate.&lt;br /&gt;
&lt;br /&gt;
In other words, the procedure consists of replacing the Simulation step of SAEM at iteration $k$ by $m$ iterations of the&lt;br /&gt;
Metropolis-Hastings (MH) algorithm described in [[The Metropolis-Hastings algorithm for simulating the individual parameters|The Metropolis-Hastings algorithm]] section. It was shown in the [[Estimation of the observed Fisher information matrix#Estimation using linearization of the model|Estimation of the F.I.M. using a linearization of the model]] section that [[The SAEM algorithm for estimating population parameters|SAEM]] still converges under general conditions when coupled with a Markov chain Monte Carlo procedure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title= Remark&lt;br /&gt;
|text= Convergence of the Markov chains $(\psi_i^{(k)})$ is not necessary at each SAEM  iteration. It suffices to run a few MH iterations with various transition kernels  before resetting $\theta_{k-1}$. In $\monolix$ by default, three transition kernels are used twice each, successively, in each SAEM iteration.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementing SAEM ==&lt;br /&gt;
&lt;br /&gt;
Implementation of SAEM can be difficult to describe when looking at complex statistical models such as mixture models, models with inter-occasion variability, etc. We are therefore going to limit ourselves to looking at some basic models in order to illustrate how SAEM can be implemented.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===SAEM for general hierarchical  models===&lt;br /&gt;
&lt;br /&gt;
Consider first a very general model for any type (continuous, categorical, survival, etc.) of data $(y_i)$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation= &amp;lt;math&amp;gt;\begin{eqnarray} y_i {{!}} \psi_i &amp;amp;\sim&amp;amp; \pcyipsii(y_i {{!}} \psi_i) \\&lt;br /&gt;
h(\psi_i) &amp;amp;\sim&amp;amp; {\cal N}( \mu , \Omega),&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $h(\psi_i)=(h_1(\psi_{i,1}), h_2(\psi_{i,2}), \ldots , h_d(\psi_{i,d}) )^\transpose$ is a $d$-vector of (transformed) individual parameters, $\mu$ a $d$-vector of fixed effects and  $\Omega$ a $d\times d$ variance-covariance matrix.&lt;br /&gt;
&lt;br /&gt;
We assume here that $\Omega$ is positive-definite. Then, a sufficient statistic for the complete model $\pmacro(\by,\bpsi;\theta)$ is&lt;br /&gt;
$\tilde{S}(\bpsi) = (\tilde{S}_1(\bpsi),\tilde{S}_2(\bpsi))$, where&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\tilde{S}_1(\bpsi) &amp;amp;= &amp;amp; \sum_{i=1}^N h(\psi_i) \\&lt;br /&gt;
\tilde{S}_2(\bpsi) &amp;amp;= &amp;amp; \sum_{i=1}^N h(\psi_i) h(\psi_i)^\transpose .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
At iteration $k$ of SAEM, we have:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Simulation step}$: for $i=1,2,\ldots, N$, draw $\psi_i^{(k)}$ from $m$ iterations of the MH algorithm described in [[The Metropolis-Hastings algorithm for simulating the individual parameters|The Metropolis-Hastings algorithm]]  with $\pmacro(\psi_i |y_i ;\mu_{k-1},\Omega_{k-1})$ as limiting distribution.&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Stochastic approximation}$: update $s_k=(s_{k,1},s_{k,2})$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
s_{k,1} &amp;amp;=&amp;amp; s_{k-1,1} + \gamma_k \left( \sum_{i=1}^N h(\psi_i^{(k)}) - s_{k-1,1} \right) \\&lt;br /&gt;
s_{k,2} &amp;amp;=&amp;amp; s_{k-1,2} + \gamma_k \left( \sum_{i=1}^N h(\psi_i^{(k)})h(\psi_i^{(k)})^\transpose  - s_{k-1,2} \right) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* $\textbf{Maximization step}$:  update $(\mu_{k-1},\Omega_{k-1})$ according to&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\mu_{k} &amp;amp;=&amp;amp; \frac{1}{N} s_{k,1} \\&lt;br /&gt;
\Omega_k &amp;amp;=&amp;amp; \frac{1}{N}\left( s_{k,2}  - s_{k,1}s_{k,1}^\transpose \right) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is remarkable is that it suffices to be able to calculate $\pcyipsii(y_i | \psi_i)$ for all $\psi_i$ and $y_i$ in order to be able to run SAEM. In effect, this allows the simulation step to be run using MH since the acceptance probabilities can be calculated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SAEM for continuous data models===&lt;br /&gt;
Consider now a continuous data model in which the residual error variance is now constant:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
y_{ij} &amp;amp;=&amp;amp; f(t_{ij},\phi_i) + a \teps_{ij} \\&lt;br /&gt;
h(\psi_i) &amp;amp;\sim&amp;amp; {\cal N}( \mu , \Omega) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the individual parameters are $\psi_i=(\phi_i,a)$. The variance-covariance matrix for $\psi_i$ is not positive-definite in this case because $a$ has no variability. If we suppose that the variance matrix $\Omega$ is positive-definite, then noting $\theta=(\mu,\Omega,a)$, a natural decomposition of the model is:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\pmacro(\by,\bpsi;\theta) = \pmacro(\by {{!}} \bpsi;a)\pmacro(\bpsi;\mu,\Omega) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The previous statistic $\tilde{S}(\bpsi) = (\tilde{S}_1(\bpsi),\tilde{S}_2(\bpsi))$ is not sufficient for estimating $a$. Indeed, we need an additional component which is a function both of $\by$ and $\bpsi$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \tilde{S}_3(\by, \bpsi) =\sum_{i=1}^N \sum_{j=1}^{n_i}(y_{ij} - f(t_{ij},\psi_i))^2. &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Then,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \begin{eqnarray}&lt;br /&gt;
s_{k,3} &amp;amp;=&amp;amp; s_{k-1,3} + \gamma_k ( \tilde{S}_3(\by, \bpsi) - s_{k-1,3} ) \\&lt;br /&gt;
a_k^2 &amp;amp;=&amp;amp; \displaystyle{ \frac{1}{\sum_{i=1}^N n_i} s_{k,3} }\ .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The choice of step-size $(\gamma_k)$ is extremely important for ensuring convergence of SAEM. The sequence $(\gamma_k)$ used in $\monolix$ decreases like $k^{-\alpha}$. We recommend using $\alpha=0$ (that is, $\gamma_k=1$) during the first $K_1$ iterations, in order to converge quickly to a neighborhood of a maximum of the likelihood, and $\alpha=1$ during the next $K_2$ iterations.&lt;br /&gt;
Indeed, the initial guess  $\theta_0$ may  be far  from the  maximum likelihood value  we are looking for, and the first iterations with $\gamma_k=1$ allow SAEM to converge quickly to a neighborhood of this value. Following this, smaller step-sizes ensure the&lt;br /&gt;
almost sure convergence of the algorithm to the maximum likelihood estimator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Example&lt;br /&gt;
|title=Example&lt;br /&gt;
|text= Consider a simple model for continuous data:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
y_{ij} &amp;amp;\sim&amp;amp; {\cal N}(A_i\,e^{-k_i \, t_{ij} } , a^2) \\&lt;br /&gt;
\log(A_i)&amp;amp;\sim&amp;amp;{\cal N}(\log(A_{\rm pop}) , \omega_A^2) \\&lt;br /&gt;
\log(k_i)&amp;amp;\sim&amp;amp;{\cal N}(\log(k_{\rm pop}) , \omega_k^2) ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $A_{\rm pop}=6$, $k_{\rm pop}=0.25$, $\omega_A=0.3$, $\omega_k=0.3$ and $a=0.2$.&lt;br /&gt;
Let us look at the effect of different settings for $(\gamma_k)$ (and $L$)  for estimating the population parameters of the model with SAEM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. For all $k$, $\gamma_k = 1$: the sequence $(\theta_{k})$ converges very quickly to a neighborhood of the &amp;quot;solution&amp;quot;. The sequence $(\theta_{k})$ is a homogeneous Markov Chain that converges in distribution but does not converge almost surely. &lt;br /&gt;
&lt;br /&gt;
[[File:saem1.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. For all $k$, $\gamma_k = 1/k$: the sequence $(\theta_{k})$ converges  almost surely  to the maximum likelihood estimate of $\theta$, but very slowly. &lt;br /&gt;
&lt;br /&gt;
[[File:saem2.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. $\gamma_k = 1$, $k=1$, ...,$40$, $\gamma_k = 1/(k-40)$, $k \geq 41$: the sequence $(\theta_{k})$ converges  almost surely  to the maximum likelihood estimate of $\theta$, and quickly.&lt;br /&gt;
&lt;br /&gt;
[[File:saem3.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. $L=10$, $\gamma_k = 1$, $k \geq 1$: the sequence $(\theta_{k})$ is an homogeneous Markov chain that converges in distribution, as in Example 1, but the variance  is reduced by a factor $\sqrt{10}$; in this case, SAEM behaves like EM. &lt;br /&gt;
&lt;br /&gt;
[[File:saem4.png|link=]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A simple example to understand why SAEM converges in  practice==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at a very simple Gaussian model, with only one observation per individual:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\psi_i &amp;amp;\sim&amp;amp; {\cal N}(\theta,\omega^2) , \ \ \ 1 \leq i \leq N \\&lt;br /&gt;
y_i &amp;amp;\sim&amp;amp; {\cal N}(\psi_i,\sigma^2).&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We will furthermore  assume  that both $\omega^2$ and $\sigma^2$ are known.&lt;br /&gt;
&lt;br /&gt;
Here, the maximum likelihood estimator $ \hat{\theta}$ of $\theta$ is easy to compute since $y_i \sim_{i.i.d.} {\cal N}(\theta,\omega^2+\sigma^2)$. We find that&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \hat{\theta}  = \displaystyle{\frac{1}{N} }\sum_{i=1}^{N} y_i  .&lt;br /&gt;
&amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
We now propose to try and compute  $\hat{\theta}$ using SAEM instead. The simulation step  is straightforward since the conditional distribution of $\psi_i$ is a normal distribution:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
\psi_i {{!}} y_i \sim {\cal N}(a \theta + (1-a)y_i  , \gamma^2) ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
a  &amp;amp;= &amp;amp; \displaystyle{ \frac{1}{\omega^2} } \left(\displaystyle{ \frac{1}{\sigma^2} }+ \displaystyle{\frac{1}{\omega^2} }\right)^{-1} \\&lt;br /&gt;
\gamma^2 &amp;amp;= &amp;amp;\left(\displaystyle{ \frac{1}{\sigma^2} }+ \displaystyle{\frac{1}{\omega^2} }\right)^{-1}.&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The maximization step is also straightforward. Indeed, a sufficient statistic for estimating $\theta$ is&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; {\cal S}(\bpsi) = \sum_{i=1}^{N} \psi_i. &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Then,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\tilde{\theta}({\cal S(\bpsi)} ) &amp;amp;=&amp;amp; \argmax{\theta} \pmacro(y_1,\ldots,y_N,\psi_1,\ldots,\psi_N;\theta) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \argmax{\theta} \pmacro(\psi_1,\ldots,\psi_N;\theta) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \frac{ {\cal S}(\bpsi)}{N}.&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Let us first look at the behavior of SAEM  when $\gamma_k=1$. At iteration $k$,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Simulation step:  $\psi_i^{(k)} \sim {\cal N}( a \theta_{k-1} + (1-a)y_i  , \gamma^2). $&lt;br /&gt;
&lt;br /&gt;
* Maximization step: $\theta_k =  \displaystyle{ \frac{ {\cal S}(\bpsi^{(k)})}{N} } = \displaystyle{ \frac{1}{N} }\sum_{i=1}^{N} \psi_i^{(k)}$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It can be shown that:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;  \theta_k - \hat{\theta} = a(\theta_{k-1} - \hat{\theta}) + e_k ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $e_k \sim {\cal N}(0, \gamma^2 /N)$. Then, the sequence $(\theta_k)$ is an autoregressive process of order 1 (AR(1)) which converges in distribution to a normal distribution when $k\to \infty$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\theta_k  \limite{}{\cal D} {\cal N}\left(\hat{\theta} , \displaystyle{ \frac{\gamma^2}{N(1-a^2)} }\right) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saemb1.png|caption=10 sequences $(\theta_k)$ obtained with different initial values and $\gamma_k=1$ for $1\leq k \leq 50$ }} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us see what happens instead when $\gamma_k$ decreases like $1/k$. At iteration $k$,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Simulation step: $\psi_i^{(k)} \sim {\cal N}( a \theta_{k-1} + (1-a)y_i  , \gamma^2) $&lt;br /&gt;
&lt;br /&gt;
* Maximization step:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation= &amp;lt;math&amp;gt;\theta_k = \theta_{k-1} + \displaystyle{ \frac{1}{k} }\left( \displaystyle{ \frac{1}{N} }\sum_{i=1}^{N} \psi_i^{(k)} -\theta_{k-1} \right). &lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Here, we can show that:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \theta_k - \hat{\theta} = \displaystyle{ \frac{k-a}{k} }(\theta_{k-1} - \hat{\theta}) + \displaystyle{\frac{e_k}{k} }, &lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: where $e_k \sim {\cal N}(0, \gamma^2 /N)$. Then, the sequence $(\theta_k)$ converges almost surely to $\hat{\theta}$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saemb2.png|caption=10 sequences $(\theta_k)$ obtained with different initial values and $\gamma_k=1/k$ for $1\leq k \leq 50$ }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, we see that by combining the two strategies, the sequence $(\theta_k)$ is a Markov chain that  converges to a random walk around $\hat{\theta}$ during the first $K_1$ iterations, then converges almost surely to $\hat{\theta}$ during the next $K_2$ iterations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saemb3.png|caption=10 sequences $(\theta_k)$ obtained with different initial values, $\gamma_k=1$ for $1\leq k \leq 20$ and $\gamma_k=1/(k-20)$ for $21\leq k \leq 50$ }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ShowVideo|image=saem5b.png|video=http://popix.lixoft.net/images/2/20/saem.mp4|caption=The SAEM algorithm in practice. }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- {{ImageWithCaptionL|image=saem5.png|size=750px|caption= The SAEM algorithm in practice. (a) the observations and the initialization $p_0(\psi_i)$, (b) the initialization $p_0(\psi_i)$ and the conditional distributions of the observations $p(y_i{{!}}\psi_i)$, (c) the conditional distributions $p_0(\psi_i{{!}}y_i)$ and the simulated individual parameters $(\psi_i^{(1)})$, (d)  the updated distribution $p_1(\psi_i)$. }} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A simulated annealing version of SAEM==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Convergence of SAEM can strongly depend on the initial guess when the likelihood ${\like}$ has several local maxima. A simulated annealing version of SAEM can improve convergence of the algorithm toward the global maximum of ${\like}$.&lt;br /&gt;
&lt;br /&gt;
To detail this, we can first  rewrite the joint pdf of $(\by,\bpsi)$ as follows:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\pmacro(\by,\bpsi;\theta)  =  C(\theta)\, \exp \left\{-U(\by,\bpsi;\theta)\right\} ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $C(\theta)$ is a normalizing constant that only depends on $\theta$. Then, for any &amp;quot;temperature&amp;quot; $T\geq0$, we consider the complete model&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\pmacro_T(\by,\bpsi;\theta)  =  C_T(\theta)\, \exp \left\{-\displaystyle{\frac{1}{T} }U(\by,\bpsi;\theta) \right\} ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $C_T(\theta)$ is still a normalizing constant.&lt;br /&gt;
&lt;br /&gt;
We then introduce a decreasing temperature sequence $(T_k, 1\leq k \leq K)$ and use the SAEM algorithm on the complete model $\pmacro_{T_k}(\by,\bpsi;\theta)$  at iteration $k$ (the usual version of SAEM uses $T_k=1$ at each iteration). The sequence $(T_k)$ is chosen to have large positive values during the first iterations, then decrease with an exponential rate to 1: $ T_k = \max(1, \tau \ T_{k-1}) $.&lt;br /&gt;
&lt;br /&gt;
Consider for example the following model for continuous data:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
y_{ij} &amp;amp;\sim&amp;amp; {\cal N}(f(t_{ij};\psi_i) , a^2) \\&lt;br /&gt;
h(\psi_i) &amp;amp;\sim&amp;amp; {\cal N}(\mu , \Omega) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Here, $\theta = (\mu,\Omega,a^2)$ and&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
\pmacro(\by,\bpsi;\theta)  =  C(\theta)\, \exp \left\{- \displaystyle{ \frac{1}{2 a^2} }\sum_{i=1}^N \sum_{j=1}^{n_i} (y_{ij} - f(t_{ij};\psi_i))^2 - \displaystyle{ \frac{1}{2} } \sum_{i=1}^N  (h(\psi_i)-\mu)^\transpose \Omega (h(\psi_i)-\mu)  \right\},&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $C(\theta)$ is a normalizing constant that only depends on $a$ and $\Omega$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We see that $\pmacro_T(\by,\bpsi;\theta)$ will also be a normal distribution whose residual error variance $a^2$ is replaced by $T a^2$ and  variance matrix $\Omega$ for the random effects  by $T\Omega$.&lt;br /&gt;
In other words, a model with a &amp;quot;large temperature&amp;quot; is a model with large variances.&lt;br /&gt;
&lt;br /&gt;
The algorithm therefore consists in choosing large initial variances $\Omega_0$ and $a^2_0$ (that include the initial temperature $T_0$ implicitly) and setting $ a^2_k = \max(\tau \ a^2_{k-1} , \hat{a}(\by,\bpsi^{(k)}) $ and $ \Omega_k = \max(\tau \ \Omega_{k-1} , \hat{\Omega}(\bpsi^{(k)}) $ during the first iterations. Here, $0\leq\tau\leq 1$.&lt;br /&gt;
&lt;br /&gt;
These large values of the variance make the conditional distributions $\pmacro_T(\psi_i | y_i;\theta)$ less concentrated around their modes, and thus allow the sequence $(\theta_k)$ to &amp;quot;escape&amp;quot; from local maxima of the likelihood during the first iterations of SAEM and converge to a neighborhood of the global maximum of ${\like}$.&lt;br /&gt;
After these initial iterations, the usual SAEM algorithm is used to estimate these variances at each iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title= Remark&lt;br /&gt;
|text= We can use two different coefficients $\tau_1$ and $\tau_2$ for $\Omega$ and $a^2$ in $\monolix$. It is possible, for example, to choose $\tau_1&amp;lt;1$ and $\tau_2&amp;gt;1$, with large initial inter-subject variances $\Omega_0$  and small initial residual variance $a^2_0$. In this case, SAEM tries to obtain the best possible fit during the first iterations, allowing for a large inter-subject variability. During the next iterations, this variability is reduced and the residual variance increases until reaching the best possible trade-off between the two criteria.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Example&lt;br /&gt;
|title=A PK example&lt;br /&gt;
|text= &lt;br /&gt;
&lt;br /&gt;
Consider a simple one-compartment model for oral administration:&lt;br /&gt;
&lt;br /&gt;
{{EquationWithRef&lt;br /&gt;
|equation=&amp;lt;div id=&amp;quot;eq:saem_sa&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
f(t;ka,V,k) = \displaystyle{ \frac{D\, ka}{V(ka-ke)} }\left( e^{-ke \, t} - e^{-ka \, t} \right) .&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|reference=(2) }}&lt;br /&gt;
&lt;br /&gt;
We then simulate PK data from 80 patients using the following population PK parameters:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; ka_{\rm pop} = 1, \quad V_{\rm pop}=8, \quad ke_{\rm pop}=0.25 .&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We can see that the following parametrization gives the same prediction as the one given in [[#eq:saem_sa|(2)]]:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \tilde{ka} = ke, \quad \tilde{V}=V \times ke/ka, \quad \tilde{ke}=ka . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We can then expect a (global) maximum around $(ka,V,ke) = (1, \ 8, \ 0.25)$ and a (local) maximum of the likelihood around $(ka,V,ke) = (0.25, \ 2, \ 1).$&lt;br /&gt;
&lt;br /&gt;
The figure  below displays the convergence of SAEM without simulated annealing to a local maximum of the likelihood (deviance = $-2\,\log {\like} =816$).  The initial values of the population parameters we chose were $(ka_0,V_0,k_0) = (1,1,1)$.&lt;br /&gt;
&lt;br /&gt;
:{{ImageWithCaption_special|image=recuit1.png|caption=Convergence of SAEM to a local maxima of the likelihood}} &lt;br /&gt;
&lt;br /&gt;
Using the same initial guess, the simulated annealing version of SAEM converges to the global maximum of the likelihood (deviance = 734).&lt;br /&gt;
&lt;br /&gt;
:{{ImageWithCaption_special|image=recuit2.png|caption=Convergence of SAEM to the global maxima of the likelihood }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Bibliography ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{allassonniere2010construction,&lt;br /&gt;
  title={Construction of Bayesian deformable models via a stochastic approximation algorithm: a convergence study},&lt;br /&gt;
  author={Allassonni{\`e}re, S. and Kuhn, E. and Trouv{\'e}, A.},&lt;br /&gt;
  journal={Bernoulli},&lt;br /&gt;
  volume={16},&lt;br /&gt;
  number={3},&lt;br /&gt;
  pages={641--678},&lt;br /&gt;
  year={2010},&lt;br /&gt;
  publisher={Bernoulli Society for Mathematical Statistics and Probability}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{delattre2012maximum,&lt;br /&gt;
  title={Maximum likelihood estimation in discrete mixed hidden Markov models using the SAEM algorithm},&lt;br /&gt;
  author={Delattre, M. and Lavielle, M.},&lt;br /&gt;
  journal={Computational Statistics &amp;amp; Data Analysis},&lt;br /&gt;
  year={2012},&lt;br /&gt;
 volume={56},&lt;br /&gt;
pages={2073-2085}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{delattre2013sde,&lt;br /&gt;
  title={Coupling the SAEM algorithm and the extended Kalman filter for maximum likelihood estimation in mixed-effects diffusion models},&lt;br /&gt;
  author={Delattre, M. and Lavielle, M.},&lt;br /&gt;
  journal={Statistics and its interfaces},&lt;br /&gt;
 year={2013},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{delyon1999convergence,&lt;br /&gt;
  title={Convergence of a stochastic approximation version of the EM algorithm},&lt;br /&gt;
  author={Delyon, B. and Lavielle, M. and Moulines, E.},&lt;br /&gt;
  journal={Annals of Statistics},&lt;br /&gt;
  pages={94-128},&lt;br /&gt;
  year={1999},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{dempster1977maximum,&lt;br /&gt;
  title={Maximum likelihood from incomplete data via the EM algorithm},&lt;br /&gt;
  author={Dempster, A.P. and Laird, N.M. and Rubin, D.B.},&lt;br /&gt;
  journal={Journal of the Royal Statistical Society. Series B (Methodological)},&lt;br /&gt;
  pages={1-38},&lt;br /&gt;
  year={1977},&lt;br /&gt;
  publisher={JSTOR}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{kuhn2004coupling,&lt;br /&gt;
  title={Coupling a stochastic approximation version of EM with an MCMC procedure},&lt;br /&gt;
  author={Kuhn, E. and Lavielle, M.},&lt;br /&gt;
  journal={ESAIM: Probability and Statistics},&lt;br /&gt;
  volume={8},&lt;br /&gt;
  pages={115-131},&lt;br /&gt;
  year={2004},&lt;br /&gt;
  publisher={EDP Sciences, 17 Avenue du Hoggar Les Ulis Cedex A BP 112 91944 France}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{lavielle2013improved,&lt;br /&gt;
  title={An improved SAEM algorithm for maximum likelihood estimation in mixtures of non linear mixed effects models},&lt;br /&gt;
  author={Lavielle, M. and Mbogning, C.},&lt;br /&gt;
  journal={Statistics and Computing},&lt;br /&gt;
  year={2013},&lt;br /&gt;
  publisher={Springer}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{mclachlan2007algorithm,&lt;br /&gt;
  title={The EM algorithm and extensions},&lt;br /&gt;
  author={McLachlan, G.J. and Krishnan, T.},&lt;br /&gt;
  volume={382},&lt;br /&gt;
  year={2007},&lt;br /&gt;
  publisher={Wiley-Interscience}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{samson2006extension,&lt;br /&gt;
  title={Extension of the SAEM algorithm to left-censored data in nonlinear mixed-effects model: Application to HIV dynamics model},&lt;br /&gt;
  author={Samson, A. and Lavielle, M. and Mentr&amp;amp;eacute;, F.},&lt;br /&gt;
  journal={Computational statistics &amp;amp; data analysis},&lt;br /&gt;
  volume={51},&lt;br /&gt;
  number={3},&lt;br /&gt;
  pages={1562-1574},&lt;br /&gt;
  year={2006},&lt;br /&gt;
  publisher={Elsevier}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{wei1990monte,&lt;br /&gt;
  title={A Monte Carlo implementation of the EM algorithm and the poor man's data augmentation algorithms},&lt;br /&gt;
  author={Wei, G. and Tanner, M.},&lt;br /&gt;
  journal={Journal of the American Statistical Association},&lt;br /&gt;
  volume={85},&lt;br /&gt;
  number={411},&lt;br /&gt;
  pages={699-704},&lt;br /&gt;
  year={1990},&lt;br /&gt;
  publisher={Taylor &amp;amp; Francis}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{wu1983convergence,&lt;br /&gt;
  title={On the convergence properties of the EM algorithm},&lt;br /&gt;
  author={Wu, C.F.},&lt;br /&gt;
  journal={The Annals of Statistics},&lt;br /&gt;
  volume={11},&lt;br /&gt;
  number={1},&lt;br /&gt;
  pages={95-103},&lt;br /&gt;
  year={1983},&lt;br /&gt;
  publisher={Institute of Mathematical Statistics}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Back&amp;amp;Next&lt;br /&gt;
|linkBack=Introduction and notation&lt;br /&gt;
|linkNext=The Metropolis-Hastings algorithm for simulating the individual parameters }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Model_evaluation&amp;diff=7170</id>
		<title>Model evaluation</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Model_evaluation&amp;diff=7170"/>
		<updated>2013-06-04T18:21:44Z</updated>

		<summary type="html">&lt;p&gt;Marc: /* Bibliography */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Defining the expression &amp;quot;model evaluation&amp;quot; is a harder task than it may appear at first glance. Intuitively, it would seem to suggest evaluating the performance of a model based on the observed data, the same data that was used to build the model. Fair enough, but what then do we mean by the &amp;quot;performance&amp;quot; of a model?&lt;br /&gt;
&lt;br /&gt;
Do we mean the ability of the model to characterize and explain the phenomena being studied, in which case the goal is to use the model to understand the phenomena? Or do we mean the model's predictive performance when the model is used to predict the phenomena's behavior, either in the future or under new experimental conditions?&lt;br /&gt;
&lt;br /&gt;
What is comes down to is this: do we want to use the model to understand or to predict? This is the key question to ask before even starting to think about what tools to use and tasks to execute.&lt;br /&gt;
&lt;br /&gt;
Here, we will be for the most part focused on the ability of a model to explain the phenomena and data. Therefore, the first goal will be to check whether the data are in agreement with the model, and vice versa. In this process, model diagnostics can be used to eliminate model candidates that do not seem capable of reproducing the observed data.&lt;br /&gt;
As is the usual case in statistics, it is not because a model has not been rejected that it is necessarily the &amp;quot;true&amp;quot; one. All that we can say is that the experimental data does not allow us to reject this model. It is merely one of perhaps many models that cannot be rejected. Indeed, we can usually find several models that get past this first diagnostic step and are therefore not rejected.&lt;br /&gt;
&lt;br /&gt;
What to do, then, when several possible models are retained? Well, we can try to select the &amp;quot;best&amp;quot; one (or best ones if no leader distinguishes itself from the rest). This means developing a model selection process which allows us to compare the models to each other. Compare models? But with what criteria?&lt;br /&gt;
&lt;br /&gt;
In a purely explanatory context, Occam's razor is a useful parsimony principle which states that among competing hypotheses, the one with the fewest assumptions should be selected. In a modeling context, this means that among valid competing  models, the most simple one should be selected.&lt;br /&gt;
&lt;br /&gt;
Model diagnostic tools are for the most part graphical or visual: we  &amp;quot;see&amp;quot; when something is not right between a chosen model and the data it is hypothesized to describe. Model selection tools, on the other hand, are analytical: we calculate the value of some criteria that allows us to compare the models with each other. However, it is absolutely critical to keep in mind the limits of these tools. These are not decision-making tools. It is not a $p$-value or some information criteria that can automatically decide which model to choose. It is always the modeler who must have the last word! This person uses the model diagnostic and selection tools in order to guide their decision, but at the end, it is they that must make the final decision. There is nothing more dangerous that rules applied without thinking and arbitrary cut-off values used blindly without reflection.&lt;br /&gt;
&lt;br /&gt;
Here, we will not look model selection techniques based on the various models' predictive performances. One such approach consists of splitting the data into three sets: a ''learning set'' is used for fitting the model, a ''validation set''  for choosing between models and a ''test set'' to assess the quality of the predictions made by the chosen model.&lt;br /&gt;
&lt;br /&gt;
Very few model diagnostic and selection tools exist for mixed-effects models. One of the most complete is [http://xpose.sourceforge.net Xpose], an R-based model-building aid for population analysis using NONMEM   that facilitates model diagnostics, candidate covariate identification and model comparison. Here we will use $\monolix$ and illustrate these techniques with the  example used previously for model exploration and parameter estimation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model diagnostics==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Model diagnostics  and statistical tests ===&lt;br /&gt;
&lt;br /&gt;
Suppose first that a model has been entirely defined by the modeler, and that its parameters have either been chosen or estimated.&lt;br /&gt;
What we call the &amp;quot;model&amp;quot; is therefore  a joint probability distribution along with some parameter values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note ${\cal M}_0$ the model we wish to evaluate. We place ourselves in the framework of statistical testing, and would like to perform the following hypothesis test:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; H_0: \quad {\cal M}={\cal M}_0 \quad vs \quad H_1: \quad {\cal M}\neq{\cal M}_0. &amp;lt;/math&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Passing&amp;quot; the test does not mean that we accept $H_0$ but rather that we do not reject it. We will use the same point of view for model diagnostics whereby we eliminate model candidates that do not seem capable of reproducing the observed data, i.e., models for which we conclude that ${\cal M}\neq{\cal M}_0$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title=Remark&lt;br /&gt;
|text=Running a statistical test only makes sense when we have doubts on the hypothesis of retaining a model.&lt;br /&gt;
If it is clear from the beginning that for example the structural model is totally misspecified (e.g., we use a linear function of time even though a curve is clearly visible in the data), any basic goodness-of-fit plot (individual fits, observation vs prediction, residuals, etc.) will detect this misspecification without any doubt and without the need to evaluate the probability of making a mistake.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To put into practice  such a statistical test, we usually construct a test statistic $T(\by)$ which is a function of the observations and for which we are able to calculate a distribution under the null hypothesis $H_0$.&lt;br /&gt;
&lt;br /&gt;
For a given significance level $\alpha$, we then define a rejection region $R_\alpha$ such that:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation= &amp;lt;math&amp;gt;\probs{H_0}{T(\by) \in R_\alpha} = \alpha . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Thus, $\alpha$ is the probability of incorrectly rejecting the null hypothesis $H_0$.&lt;br /&gt;
&lt;br /&gt;
The difficulty in creating and using such tests comes from two main things:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* We need to be capable of calculating the distribution of the test statistic $T(\by)$ under $H_0$ in order to carefully track the significance level, i.e., ensure that the probability of incorrectly rejecting $H_0$ is indeed $\alpha$.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Being able to control the type I error $\alpha$ is of no interest if the test has low power, i.e., if the probability of correctly rejecting $H_0$ is low.&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the present context, the first point is clearly a problem. Due to the complexity of the models we are interested in, it is impossible to analytically calculate the distribution of a function of the observations, even for something as simple as the empirical mean $\overline{\by}=\sum_{i,j}y_{ij}/\sum_i{n_i}$.&lt;br /&gt;
Using limit theorems to approximate such distributions is also more or less hopeless. Perhaps the most powerful, general and precise solution we have available to us is Monte Carlo simulation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* Generate independent values $\by^{(1)}, \by^{(2)}, \ldots , \by^{(L)}$ under the model ${\cal M}_0$ using the same design and covariates as in the original data. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Calculate the $L$ statistics $T(\by^{(1)}), T(\by^{(2)}), \ldots , T(\by^{(L)})$.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Estimate the distribution of $T(\by)$ under ${\cal M}_0$ with the empirical distribution of the $T(\by^{(\ell)})$.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The estimation error essentially depends on the number $L$ of  simulated data sets. We must therefore choose $L$ large enough so that this error is negligible.&lt;br /&gt;
&lt;br /&gt;
This solves part of the problem. But it remains hard to define a rejection region $R_\alpha$ if the test statistic is multidimensional. We can of course calculate  relevant prediction intervals for each component of $T(\by)$ individually, but this does not really help us to define a real multidimensional rejection region.&lt;br /&gt;
&lt;br /&gt;
Consequently, diagnostics methods are essentially visual: we compare the observed statistic $T(\by)$ with the expected distribution under ${\cal M}_0$ by graphically displaying (for example) 90% or 95% prediction intervals for each component of $T(\by)$.&lt;br /&gt;
&lt;br /&gt;
The second point is also delicate because we need to decide what ${\cal M}\neq{\cal M}_0$ means, i.e., $H_0$ being false.&lt;br /&gt;
Does it mean that the structural model is misspecified? Or the distribution of the random effects, the residual error model, the covariate model? There are so many ways in which a model can be misspecified that we cannot realistically expect to be able to create one unique statistic sufficiently powerful to detect all of these at once. We therefore prefer to construct several different test statistics, i.e., several graphical diagnostics tools, each good at dealing with one particular type of misspecification. It is then the combination of all these tools that will make up our test; we can fairly reasonably hope that a misspecified model will not succeed in passing through this filter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Diagnostic plots using  individual parameters===&lt;br /&gt;
&lt;br /&gt;
Diagnostic plots constructed using only the observations are useful for looking at the distribution $\qy$ of the observations,&lt;br /&gt;
but do not help with testing hypotheses made on the non-observed individual parameters (about the distribution, covariate model, etc.).&lt;br /&gt;
&lt;br /&gt;
One possible solution is to estimate the individual parameters (using for example the conditional mode) and then use these estimates to create new diagnostic tools. This strategy is only useful when the individual parameters have been estimated well.&lt;br /&gt;
&lt;br /&gt;
If instead the data does not contain enough information to estimate certain individual parameters well, the individual estimates are all shrunk towards the same (population) value; this is the mode (resp. mean) of the population distribution of the parameter if we use the conditional mode (resp. conditional mean). For a parameter $\psi_i$ which is a function of a random effect $\eta_i$, we can quantify this phenomena  by defining the so-called $\eta$-shrinkage as&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \eta\text{-shrinkage} = 1 - \displaystyle{\frac{\var{\hat{\eta}_i} }{\var{\eta_i} } }, &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $\hat{\eta}_i$ is an estimate of $\eta_i$ (the conditional mode, conditional mean, etc.).&lt;br /&gt;
&lt;br /&gt;
This shrinkage phenomenon is simple to understand because the conditional distribution $\qcetaiyi$ of $\eta_i$ is defined by the product $\pmacro(y_i|\eta_i)\pmacro(\eta_i)$. Saying that the observations $y_i$ provides little information about $\eta_i$ means that the conditional distribution of $y_i$ has a reduced importance in the construction of $\qcetaiyi$. The mode (resp. mean) of $\qcetaiyi$ will therefore be close to 0 which is both the mode and mean of $\qetai$. The result is a high level of shrinkage (close to 1) whenever $\var{\hat{\eta}_i}\ll\var{\eta_i}$.&lt;br /&gt;
&lt;br /&gt;
Estimates of the $\psi_i$ are therefore biased because they do not correctly reflect the marginal distribution $\qpsii$ (in particular, their variance is much less). A particularly effective solution is to simulate the individual parameters $\psi_i$ with the conditional distribution $\qcpsiiyi$ rather than taking the mode. The resulting estimator is unbiased in the following sense:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\pmacro(\psi_i) &amp;amp;=&amp;amp; \displaystyle{ \int \pmacro(\psi_i {{!}}  y_i )\pmacro( y_i ) d\, y_i }\\&lt;br /&gt;
&amp;amp;=&amp;amp; \esps{y_i}{\pmacro(\psi_i {{!}} y_i )} .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
This relationship is a fundamental one when considering inverse problems, incomplete data models, mixed-effects models, etc. So what does it imply exactly? Well, if we randomly draw a vector $y_i$ of observations for an individual in a population and then generate a vector $\psi_i$ using the conditional distribution $\qcpsiiyi$, then the distribution of $\psi_i$ is the population distribution $\qpsii$. In other words, even if each $\psi_i$ is simulated using its own conditional distribution, the fact of pooling them allows us to look at them as if they were a sample from $\qpsii$, i.e., the marginal distribution $\qpsii$ is a mixture of conditional distributions $\qcpsiiyi$.&lt;br /&gt;
&lt;br /&gt;
The procedure is therefore as follows: we generate several values from each conditional distribution $\qcpsiiyi$ using the [[The Metropolis-Hastings algorithm for simulating the individual parameters|Metropolis-Hastings algorithm]], and use them in addition to the observations in order to build various diagnostic plots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== An example ===&lt;br /&gt;
&lt;br /&gt;
We are going to use the same model used for model exploration in the [[Visualization]] section and parameter estimation in the [[Estimation#Maximum likelihood estimation of the population parameters | Maximum likelihood estimation of the population parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The structural model that defines the concentration in the central compartment and the hazard function for the events (hemorrhaging) is&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
Cc(t) &amp;amp;=&amp;amp; \displaystyle{ \frac{D \, ka}{V(ka-Cl/V)} }\left(e^{-(Cl/V)\,t} - e^{-ka\,t} \right) \\&lt;br /&gt;
h(t) &amp;amp;=&amp;amp; h_0 \, \exp(\gamma\, Cc(t)) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The statistical model assumes that $ka_i$ and $V_i$ are log-normally distributed, $Cl_i$ normal, $h0_i$  probit-normal and $\gamma$ logit-normal. No covariates are used in this model. Lastly, we suppose a constant residual error model. Now we are going to review several different diagnostic plots and look at the conclusions that can be made using them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) &amp;lt;u&amp;gt;Individual fits.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the continuous data model $y_{ij}=f(t_{ij};\psi_i) + f(t_{ij};\psi_i)\teps_{ij}$,  estimation of the population parameters $\psi_{\rm pop}$ and individual parameters $\psi_{i}$ allows us to compute for each individual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* $f(t ; \hat{\psi}_{\rm pop})$, the predicted profile given by the estimated population model&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* $f(t ; \hat{\psi}_{i})$, the predicted profile given by the estimated individual model.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=The figure plotting for each individual the two curves for the predicted concentration shows evidence of inter-individual variability in the kinetics, and furthermore does not allow us to reject the proposed PK model since the fits seem acceptable.&lt;br /&gt;
|image=indfits1.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) &amp;lt;u&amp;gt;Observations vs predictions.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The population and individual models also allow us to calculate for each individual predictions at the observation times&lt;br /&gt;
$f(t_{ij} ; \hat{\psi}_{\rm pop})$ and $f(t_{ij} ; \hat{\psi}_{i})$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= The figure showing observations vs individuals reveals no obvious misspecification. In particular it does not allow us to reject the constant residual error model.&lt;br /&gt;
|image=obspred1.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) &amp;lt;u&amp;gt;Residuals.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several types of residuals can be defined: ''population weighted residuals'' $({\rm PWRES}_{ij})$, ''individual weighted residuals'' $({\rm IWRES}_{ij})$, ''normalised prediction distribution errors'' $({\rm NPDE}_{ij})$, etc. The first two are defined by:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
{\rm PWRES}_{ij} &amp;amp;=&amp;amp; \frac{y_{ij} - \hat{\mathbb{E} }(y_{ij})}{\hat{\rm std}(y_{ij})} \\ {\rm IWRES}_{ij} &amp;amp;=&amp;amp; \frac{y_{ij} - f(t_{ij} ; \hat{\psi}_{i})}{g(t_{ij} ; \hat{\psi}_{i})},&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $\hat{\mathbb{E}}(y_{ij})$ and $\hat{\rm std}(y_{ij})$ are the  mean and variance of $y_{ij}$ estimated by Monte Carlo.&lt;br /&gt;
${\rm NPDE}_{ij}$ is a nonparametric version of ${\rm PWRES}_{ij}$, based on a rank statistic. See [http://www.npde.biostat.fr  npde] for more details.&lt;br /&gt;
&lt;br /&gt;
Statistics useful for summarizing the residuals are the  10%, 50% (median) and 90% quantiles. The procedure described earlier for estimating prediction intervals of these quantiles using Monte Carlo can again be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= Both the individual residuals and the NPDEs suggest that the model is misspecified. Indeed, under ${\cal M}_0$ residuals are expected to behave as i.i.d. ${\cal N}(0,1)$ random variables, which is clearly not the case here. It is nevertheless difficult to identify the reasons for this misspecification using only these figures.&lt;br /&gt;
|image=residual1.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= These plots show at each observation time the order 10%, 50% and 90% quantiles of the IWRES and NPDE.&lt;br /&gt;
The 90% prediction intervals are also displayed. These plots are more informative than the original residual plots.&lt;br /&gt;
We can now reasonably conclude that the behavior of the three quantiles is not the one expected under ${\cal M}_0$. In particular, a proportional component in the residual error model appears not to have been taken into account.&lt;br /&gt;
|image=residual2.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4) &amp;lt;u&amp;gt;The distributions of the individual parameters.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The hypotheses we have made about the distributions of the individual parameters can be tested by visually comparing the pdf of the pre-selected distribution of each parameter with the empirical distribution of that parameter. We are going to see that using the estimated individual parameters does not allow us to construct a pertinent diagnostic plot, and that we must rather use parameters simulated with the conditional distribution  $\qcpsiiyi$ for each individual.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= The plots show for each model parameter the pdf obtained from the estimated parameters and the empirical distribution, shown as a histogram, of the estimated individual parameters (here the estimated parameters are the modes of the conditional distributions).&lt;br /&gt;
|image=distparam0.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= Instead of histograms, $\monolix$ can also display the empirical distribution of a continuous variable using  nonparametric density estimation. This is a better way to represent continuous distributions than a histogram.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
It is also possible to display the $\eta$-shrinkage for each parameter. As expected, $\eta$-shrinkage is large for the parameters associated with the time-to-events process. That does not mean that the statistical models for $h_0$ and $\gamma$ are misspecified, but that the data does not allow us to correctly recover these individual parameters.&lt;br /&gt;
|image=distparam1.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= The simulated individual parameters now allow us to construct a diagnostic tool for the distributions of the individual parameters. Only the distribution of the clearance $Cl$ would appear to be rejected. Though the model had supposed a normal distribution, the simulated parameters seem to suggest an asymmetric distribution. This diagnostic plot leads us to think about testing the hypothesis of a log-normal distribution for $Cl$.&lt;br /&gt;
|image=distparam2.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) &amp;lt;u&amp;gt;Covariate model.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model assumes that for a given individual parameter $\psi_i$, there exists a function $h$ such that $h(\psi_i) = h(\psi_{\rm pop}) + \eta_i$, where the random effects are i.i.d. Gaussian variables. We can then graphically display the random effects simulated with the conditional distributions as a function of the various covariates in order to see whether this hypothesis is valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= These plots clearly show that the simulated random effects for $V$ and $Cl$ are correlated with the weight and have different distributions depending on gender. The assumption that volume $V$ and clearance $Cl$ are independent of weight should be rejected. The statistical model also needs to take into account the fact that both predicted volume and clearance increase with weight.&lt;br /&gt;
|image=Eval_covariate2.png &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6) &amp;lt;u&amp;gt;The correlation model.&amp;lt;/u&amp;gt;&lt;br /&gt;
The model assumes that for a given individual, the random effects associated with the each individual parameter are independent.&lt;br /&gt;
We can plot each pair of  random effects simulated with the conditional distributions against each other to see if this hypothesis is valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=The various point clouds  show no correlation between random effects except for $(\eta_V,\eta_{Cl})$ and perhaps $(\eta_{ka},\eta_V)$.&lt;br /&gt;
|image=correl1.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7) &amp;lt;u&amp;gt;Visual predictive checks.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A VPC is a diagnostic tool well suited to continuous data. It allows us to summarize in the same figure the structural and statistical models. The VPC shown uses the order 10%, 50% and 90% for the observations after having regrouped them into bins for successive intervals. Then, prediction intervals for these quantiles under ${\cal M}_0$ are estimated using Monte Carlo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text=To make it easier to interpret VPCs, we represent in red the zones where the observed quantiles are outside the prediction intervals. Here, the structural model seems to be ok, but the statistical model exhibits some incoherencies. In particular, the three quantiles obtained using the observations appear much closer together than the model ${\cal M}_0$ would suggest. This adds weight to the suggestion that a proportional component should be added to the error model.&lt;br /&gt;
|image=vpc4.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8) &amp;lt;u&amp;gt;Kaplan Meier plots.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Special diagnostic plots need to be defined for non-continuous observations.&lt;br /&gt;
We can for survival (time-to-event) data use  Kaplan Meier plots (for the first event) as a statistic, and/or the average cumulated number of events per individual (i.e., the mean number of observed events before time $t$). The prediction intervals for these statistics can be estimated by Monte Carlo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithImage&lt;br /&gt;
|text= The shapes of the curves seem correct. The model appears to slightly overestimate the survival function after the 15 hr mark, but it is difficult at this point to decide whether this comes from the time-to-event model itself,  the statistical model or  the model for the concentration.&lt;br /&gt;
|image=km2.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{OutlineText&lt;br /&gt;
|text=  In summary, this ensemble of diagnostic plots has suggested to us that we should suppose:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* a log-normal distribution for $Cl$&lt;br /&gt;
&lt;br /&gt;
* a combined residual error model, e.g., $y=f+(a+b*f)\teps$&lt;br /&gt;
&lt;br /&gt;
* a statistical model for $Cl$ and $V$ which incorporates weight as a covariate, assuming for instance a linear relationship between $\log(V)$ and $\log({\rm weight})$ and a linear relationship between $\log(Cl)$ and $\log({\rm weight})$&lt;br /&gt;
&lt;br /&gt;
*a linear correlation between $\log(Cl)$ and $\log(V)$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This new model can  be easily implemented in $\monolix$. Population parameters and individual parameters are then estimated anew and new diagnostic plots drawn. A few of these are displayed below and clearly show that the new model is better than the previous one, and can likely be retained as a candidate model.&lt;br /&gt;
&lt;br /&gt;
::[[File:diagnostic.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Model selection == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Statistical tools for model selection ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistical tools for model selection include information criteria (AIC and BIC) and hypothesis tests such as the Wald test and  likelihood ratio test (LRT).&lt;br /&gt;
&lt;br /&gt;
The Akaike Information Criteria (AIC) and the Bayesian information Criteria (BIC) are defined by&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
AIC &amp;amp;=&amp;amp; - 2 {\llike}(\theta;\by) + 2 P \\&lt;br /&gt;
BIC &amp;amp;=&amp;amp; - 2 {\llike}(\theta;\by) + \log(N) P ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $P$ is the total number of parameters to be estimated and $N$ the number of subjects. The models being compared using AIC or BIC need not be nested, unlike the case when models are being compared using an F-test or likelihood ratio test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title=Remarks&lt;br /&gt;
|text=  	&amp;amp;#32;&lt;br /&gt;
* Surprisingly, the formula for calculating the BIC  differs from one software to another. The reason is that the effective sample size is not clearly defined in the context of mixed-effects models. The question is whether we should use the number of subjects $N$ or the total number of observations $n_{\mathrm{tot} }$ in the penalty term. The penalty using $n_{\mathrm{tot} }$ is implemented in the R package nlme &amp;lt;!--[http://cran.r-project.org/web/packages/nlme/nlme.pdf  nlme]--&amp;gt; and  the SPSS procedure MIXED &amp;lt;!--[http://www.spss.ch/upload/1126184451_Linear%20Mixed%20Effects%20Modeling%20in%20SPSS.pdf   MIXED]--&amp;gt;, while $N$  is used in saemix for $\monolix$, &amp;lt;!--[http://cran.r-project.org/web/packages/saemix/saemix.pdf  saemix]--&amp;gt; and in SAS proc NLMIXED&amp;lt;!--[http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#nlmixed_toc.htm  NLMIXED]--&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
: An appropriate decomposition of the complete log-likelihood combined with the Laplace approximation can be used to derive the asymptotic BIC approximation. This leads to an optimal BIC penalty based on two terms proportional to $\log N$ and $\log n_{\mathrm{tot} }$ that adapts to the mixed-effects structure of the model. This new approach is not implemented yet in any software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* AIC and BIC are justified based on asymptotic criteria (the AIC heuristic uses Wilks' theorem and BIC uses Bayesian statistics), i.e., when the number of individuals increases and the model dimension stays fixed. In the alternative, non-asymptotic approach, the model size can increase freely. The form of the penalty can differ from one model to the next in this framework. It can be shown for example that for certain Gaussian models, the penalty term has the form   $c_1P + c_2P\log(N/P)$. The problem then becomes to calibrate the coefficients $c_1$ and $c_2$ in order to obtain an optimal penalty, which is not necessarily a simple task, making it harder to use this approach in real applications.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The observed log-likelihood ${\llike}(\theta;\by) = \log(\py(\by;\theta))$ cannot be computed in closed form for nonlinear mixed-effects models. It can be estimated by Monte Carlo using the importance sampling algorithm described in the [[Estimation of the log-likelihood]] section.&lt;br /&gt;
&lt;br /&gt;
When comparing two nested models ${\cal M}_0$ and ${\cal M}_1$ with dimensions $P_0$ and $P_1$ (with $P_1&amp;gt;P_0$), the ''likelihood ratio test'' (LRT) uses the test statistic&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
LRT = 2 ( {\llike}(\hthetag_1;\by) -  {\llike}(\hthetag_0;\by) ) ,&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $\hthetag_0$ and $\hthetag_1$ are the MLE of $\theta$ under ${\cal M}_0$ and ${\cal M}_1$.&lt;br /&gt;
&lt;br /&gt;
Depending on the hypotheses, the limit distribution of $LRT$ is either a $\chi ^2$ distribution or a mixture of a $\chi^2$ distribution and a Dirac $\delta$ distribution. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
-  Testing whether some fixed effects are null and assuming the same covariance structure for the random effects implies that&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; LRT \limite{N\to \infty}{} \chi^2(P_1-P_0) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-  Testing whether some correlations in the covariance matrix $\IIV$ are null and assuming the same covariate model implies that&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
LRT \limite{N\to \infty}{} \chi^2(P_1-P_0) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Testing whether the variance of one of the random effects is zero and assuming the same covariate model  implies that&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
LRT \limite{N\to \infty}{} \displaystyle{ \frac{1}{2} }\chi^2(1) + \displaystyle{ \frac{1}{2} }\delta_0 .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Statistical tests,  as is the case for BIC, help us decide whether the difference between two models is statistically significant.&lt;br /&gt;
Suppose that we want to test  whether a fixed model parameter $\beta$ is null:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
H_0: \quad \beta=0 \quad vs \quad H_1: \quad \beta\neq0 .&lt;br /&gt;
&amp;lt;/math&amp;gt; }} &lt;br /&gt;
&lt;br /&gt;
We construct a statistical test $T$ for which the distribution under $H_0$ allows us to calculate a $p$-value, i.e., the probability that $T$ is at least as big as the value observed under $H_0$. A small $p$-value leads us to reject $H_0$ with high confidence. It is usual to use the arbitrary cutoff of 5% to make this decision: we frequently read statements such as &amp;quot;a decrease in the objective function of a least 3.84 was required to identify a signifiant covariate&amp;quot;.&lt;br /&gt;
In the same way we could select models based on their BIC values under $H_0$ and $H_1$ by providing an arbitrary decision rule. It is sometimes suggested to choose $H_1$ if the difference $BIC_{H_1} -BIC_{H_0}$ is inferior to a certain arbitrary cutoff.&lt;br /&gt;
&lt;br /&gt;
These approaches seem to simplify the modeler's life because they provide decision rules that can be applied systematically without thinking and thus justify decisions. But a rule, whatever it is, should never stop us asking why we are applying it and whether it is applicable in the present case. Remember that even a very small difference will be statistically significant if the sample size is large enough. The question is thus not  to know whether a difference is statistically significant, but whether it is physically or biologically significant. We must therefore look carefully at the size of an effect and its real impact, both for understanding the model and for understanding its impact on the model's predictive capacities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An example===&lt;br /&gt;
&lt;br /&gt;
We are going to continue using our joint model for concentration data and hemorrhaging events. The structural model is chosen to be the one used earlier for the diagnostic tests. We would now like to compare several statistical models:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
${\cal M}_1$: all the individual parameters are log-normally distributed, there is no correlation between individual parameters,  the residual error model is a combined one ($y=f+(a+b*f)*\teps$), both $\log(V)$ and $\log(Cl)$ are linear functions of $\log({\rm weight})$.  &lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
${\cal M}_2$: model ${\cal M}_1$, assuming that $\log(V_i)$ and $\log(Cl_i)$ are linearly correlated.  &lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
${\cal M}_3$: model ${\cal M}_2$, assuming that $\gamma_i=\gamma_{\rm pop}$ (i.e., $\omega_\gamma = 0$). &lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
${\cal M}_4$: model ${\cal M}_2$, assuming that $Cl$ is not a function of the weight.  &lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The results for these four models are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;20&amp;quot; style=&amp;quot;margin-left:20%; margin-right=20%; width:50%&amp;quot;&lt;br /&gt;
! Model || $-2\times {\llike}$ || BIC &lt;br /&gt;
|-  &lt;br /&gt;
| ${\cal M}_1$ || 1390 || 1451 &lt;br /&gt;
|-&lt;br /&gt;
|  ${\cal M}_2$ || 1370 || 1436 &lt;br /&gt;
|-&lt;br /&gt;
|  ${\cal M}_3$ || 1370 ||1432 &lt;br /&gt;
|-&lt;br /&gt;
| ${\cal M}_4$ || 1446 || 1477 &lt;br /&gt;
|}   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clearly models ${\cal M}_2$ and ${\cal M}_3$ are the best in terms of BIC. We can therefore envisage selecting a model that includes both a correlation between $\log(V)$ and $\log(Cl)$ and that supposes that the volume $V$ is a function of the weight.&lt;br /&gt;
&lt;br /&gt;
Rather than a purely statistical criteria (LRT or BIC) it is particularly the estimated value of the standard deviation of  $\gamma$ ($\hat{\omega}_\gamma = 0.002$) under the model ${\cal M}_2$ that would lead us to conclude that the inter-individual variability of $\gamma$ is negligible.&lt;br /&gt;
&lt;br /&gt;
It is also important to try and evaluate the impact that a bad decision could have. Retaining $\hat{\omega}_\gamma = 0.002$ would have little impact on predictions because $\gamma_i$ is log-normally distributed, representing a variability of around 0.2%. Models ${\cal M}_2$ and ${\cal M}_3$ are thus practically identical and there is no particular advantage of selecting one over the other.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Bibliography ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{akaike1983information,&lt;br /&gt;
  title={Information measures and model selection},&lt;br /&gt;
  author={Akaike, H.},&lt;br /&gt;
  journal={Bulletin of the International Statistical Institute},&lt;br /&gt;
  volume={50},&lt;br /&gt;
  number={1},&lt;br /&gt;
  pages={277-291},&lt;br /&gt;
  year={1983}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{arlot2010survey,&lt;br /&gt;
  title={A survey of cross-validation procedures for model selection},&lt;br /&gt;
  author={Arlot, S. and Celisse, A.},&lt;br /&gt;
  journal={Statistics Surveys},&lt;br /&gt;
  volume={4},&lt;br /&gt;
  pages={40 - 79},&lt;br /&gt;
  year={2010},&lt;br /&gt;
  publisher={The author, under a Creative Commons Attribution License}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{berger1996intrinsic,&lt;br /&gt;
  title={The intrinsic Bayes factor for model selection and prediction},&lt;br /&gt;
  author={Berger, J.O. and Pericchi, L.R.},&lt;br /&gt;
  journal={Journal of the American Statistical Association},&lt;br /&gt;
  volume={91},&lt;br /&gt;
  number={433},&lt;br /&gt;
  pages={109-122},&lt;br /&gt;
  year={1996},&lt;br /&gt;
  publisher={Taylor &amp;amp; Francis}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{bergstrand2011prediction,&lt;br /&gt;
  title={Prediction-corrected visual predictive checks for diagnosing nonlinear mixed-effects models},&lt;br /&gt;
  author={Bergstrand, M. and Hooker, A.C. and Wallin, J.E. and Karlsson, M.O.},&lt;br /&gt;
  journal={The AAPS journal},&lt;br /&gt;
  volume={13},&lt;br /&gt;
  number={2},&lt;br /&gt;
  pages={143-151},&lt;br /&gt;
  year={2011},&lt;br /&gt;
  publisher={Springer}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{burnham2002model,&lt;br /&gt;
  title={Model selection and multi-model inference: a practical information-theoretic approach},&lt;br /&gt;
  author={Burnham, K.P. and Anderson, D.R.},&lt;br /&gt;
  year={2002},&lt;br /&gt;
  publisher={Springer Verlag}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{comets2010model,&lt;br /&gt;
  title={Model evaluation in nonlinear mixed effect models, with applications to pharmacokinetics},&lt;br /&gt;
  author={Comets,E. and Brendel,K.},&lt;br /&gt;
  journal={Journal de la Soci&amp;amp;eacute;t&amp;amp;eacute; Fran&amp;amp;ccedil;aise de Statistique},&lt;br /&gt;
  volume={151},&lt;br /&gt;
  number={1},&lt;br /&gt;
  pages={106-128},&lt;br /&gt;
  year={2010}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{comets2008computing,&lt;br /&gt;
  title={Computing normalised prediction distribution errors to evaluate nonlinear mixed-effect models: the npde add-on package for R},&lt;br /&gt;
  author={Comets, E. and Brendel, K. and Mentr&amp;amp;eacute;, F.},&lt;br /&gt;
  journal={Computer methods and programs in biomedicine},&lt;br /&gt;
  volume={90},&lt;br /&gt;
  number={2},&lt;br /&gt;
  pages={154-166},&lt;br /&gt;
  year={2008},&lt;br /&gt;
  publisher={Elsevier}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{hausman1984specification,&lt;br /&gt;
  title={Specification tests for the multinomial logit model},&lt;br /&gt;
  author={Hausman, J. and McFadden, D.},&lt;br /&gt;
  journal={Econometrica: Journal of the Econometric Society},&lt;br /&gt;
  pages={1219-1240},&lt;br /&gt;
  year={1984},&lt;br /&gt;
  publisher={JSTOR}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@ARTICLE{Hooker2009Xpose,&lt;br /&gt;
author = {Hooker, A. and Karlsson, M.O. and Jonsson, E.N.},&lt;br /&gt;
title = {Model diagnostic using XPOSE},&lt;br /&gt;
url = {http://xpose.sourceforge.net/generic\_chm/xpose.VPC.html},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@INPROCEEDINGS{KarlssonHolford2008Tutorial,&lt;br /&gt;
  author = {Karlsson, M.O. and Holford, N.},&lt;br /&gt;
  title = {A Tutorial on Visual Predictive Checks},&lt;br /&gt;
  booktitle = {PAGE 2008},&lt;br /&gt;
  year = {2008},&lt;br /&gt;
  owner = {kb},&lt;br /&gt;
  timestamp = {2011.04.18},&lt;br /&gt;
  url = {http://www.page-meeting.org/pdf\_assets/8694-Karlsson_Holford_VPC_Tutorial_hires.pdf}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{lavielle2011automatic,&lt;br /&gt;
  title={Automatic data binning for improved visual diagnosis of pharmacometric models},&lt;br /&gt;
  author={Lavielle, M. and Bleakley, K.},&lt;br /&gt;
  journal={Journal of pharmacokinetics and pharmacodynamics},&lt;br /&gt;
  volume={38},&lt;br /&gt;
  number={6},&lt;br /&gt;
  pages={861-871},&lt;br /&gt;
  year={2011},&lt;br /&gt;
  publisher={Springer}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@misc{massart2007concentration,&lt;br /&gt;
  title={Concentration Inequalities and Model Selection, Ecole d’Et&amp;amp;eacute; de Probabilit&amp;amp;eacute;s de Saint-Flour XXXIII-2003 Lecture Notes in Mathematics 1896},&lt;br /&gt;
  author={Massart, P.},&lt;br /&gt;
  year={2007},&lt;br /&gt;
  publisher={Springer-Verlag, Berlin}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{neyman1992problem,&lt;br /&gt;
  title={On the problem of the most efficient tests of statistical hypotheses},&lt;br /&gt;
  author={Neyman, J. and Pearson, E.S.},&lt;br /&gt;
  year={1992},&lt;br /&gt;
  publisher={Springer}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{schwarz1978estimating,&lt;br /&gt;
  title={Estimating the dimension of a model},&lt;br /&gt;
  author={Schwarz, G.},&lt;br /&gt;
  journal={The annals of statistics},&lt;br /&gt;
  volume={6},&lt;br /&gt;
  number={2},&lt;br /&gt;
  pages={461-464},&lt;br /&gt;
  year={1978},&lt;br /&gt;
  publisher={Institute of Mathematical Statistics}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{shimodaira1999multiple,&lt;br /&gt;
  title={Multiple comparisons of log-likelihoods with applications to phylogenetic inference},&lt;br /&gt;
  author={Shimodaira, H. and Hasegawa, M.},&lt;br /&gt;
  journal={Molecular biology and evolution},&lt;br /&gt;
  volume={16},&lt;br /&gt;
  pages={1114-1116},&lt;br /&gt;
  year={1999},&lt;br /&gt;
  publisher={UNIVERSITY OF CHICAGO PRESS}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{vaida2005conditional,&lt;br /&gt;
  title={Conditional Akaike information for mixed-effects models},&lt;br /&gt;
  author={Vaida, F. and Blanchard, S.},&lt;br /&gt;
  journal={Biometrika},&lt;br /&gt;
  volume={92},&lt;br /&gt;
  number={2},&lt;br /&gt;
  pages={351--370},&lt;br /&gt;
  year={2005},&lt;br /&gt;
  publisher={Biometrika Trust}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{wald1943tests,&lt;br /&gt;
  title={Tests of statistical hypotheses concerning several parameters when the number of observations is large},&lt;br /&gt;
  author={Wald, A.},&lt;br /&gt;
  journal={Transactions of the American Mathematical Society},&lt;br /&gt;
  volume={54},&lt;br /&gt;
  number={3},&lt;br /&gt;
  pages={426-482},&lt;br /&gt;
  year={1943},&lt;br /&gt;
  publisher={JSTOR}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{wilks1938large,&lt;br /&gt;
  title={The large-sample distribution of the likelihood ratio for testing composite hypotheses},&lt;br /&gt;
  author={Wilks, S.S.},&lt;br /&gt;
  journal={The Annals of Mathematical Statistics},&lt;br /&gt;
  volume={9},&lt;br /&gt;
  number={1},&lt;br /&gt;
  pages={60-62},&lt;br /&gt;
  year={1938},&lt;br /&gt;
  publisher={JSTOR}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{zhao2006model,&lt;br /&gt;
  title={On model selection consistency of Lasso},&lt;br /&gt;
  author={Zhao, P. and Yu, B.},&lt;br /&gt;
  journal={The Journal of Machine Learning Research},&lt;br /&gt;
  volume={7},&lt;br /&gt;
  pages={2541-2563},&lt;br /&gt;
  year={2006},&lt;br /&gt;
  publisher={JMLR. org}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Back&amp;amp;Next&lt;br /&gt;
|linkBack=Visualization&lt;br /&gt;
|linkNext=Simulation }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Estimation&amp;diff=7169</id>
		<title>Estimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Estimation&amp;diff=7169"/>
		<updated>2013-06-04T18:19:51Z</updated>

		<summary type="html">&lt;p&gt;Marc: /* Bibliography */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In the modeling context, we usually assume that we have data that includes  observations $\by$,  measurement times $\bt$ and possibly  additional regression variables $\bx$.  There may also be individual covariates $\bc$, and in pharmacological applications the dose regimen $\bu$. For clarity, in the following notation we will omit  the design variables $\bt$, $\bx$ and $\bu$, and the covariates  $\bc$.&lt;br /&gt;
&lt;br /&gt;
Here, we find ourselves in the classical framework of incomplete data models. Indeed, only $\by = (y_{ij})$ is observed in the joint model $\pypsi(\by,\bpsi;\theta)$.&lt;br /&gt;
&lt;br /&gt;
Estimation tasks are common ones seen in statistics:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Estimate the population parameter $\theta$ using the available observations and possibly  a priori information that is available.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Evaluate the precision of the proposed estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reconstruct missing data, here being the individual parameters $\bpsi=(\psi_i, 1\leq i \leq N)$. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the log-likelihood for a given model, i.e., for a given joint distribution $\qypsi$ and value of $\theta$.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maximum likelihood estimation of the population parameters== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Maximum likelihood estimation''  consists of maximizing with respect to $\theta$ the ''observed likelihood''  defined by:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\like(\theta ; \by) &amp;amp;\eqdef&amp;amp; \py(\by ; \theta) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \int \pypsi(\by,\bpsi ;\theta) \, d \bpsi .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Maximum likelihood estimation of the population parameter $\theta$ requires:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
* A model, i.e., a joint distribution $\qypsi$.  Depending on the software used, the model can be implemented using a script or a graphical user interface. $\monolix$ is extremely flexible and allows us to combine both. It is possible for instance to code the structural model using $\mlxtran$ and use the GUI for implementing the statistical model. Whatever the options selected, the complete model can always be saved as a text file. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Inputs $\by$, $\bc$, $\bu$ and $\bt$.  All of these variables tend to be stored in a unique data file (see the [[Visualization#Data exploration | Data Exploration ]] Section). &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* An algorithm which allows us to maximize $\int \pypsi(\by,\bpsi ;\theta) \, d \bpsi$ with respect to $\theta$. Each software package has its own algorithms implemented. It is not our goal here to rate and compare the various algorithms and implementations. We will use exclusively the SAEM algorithm as described in [[The SAEM algorithm for estimating population parameters | The SAEM algorithm]] and implemented in $\monolix$ as we are entirely satisfied by both its theoretical and practical qualities: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
** The algorithms implemented in $\monolix$ including SAEM and its extensions (mixture models, hidden Markov models, SDE-based model, censored data, etc.) have been published in statistical journals. Furthermore, convergence of SAEM has been rigorously proved.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
** The SAEM implementation in $\monolix$ is extremely efficient for a wide variety of complex models.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
** The SAEM implementation in $\monolix$ was done by the same group that proposed the algorithm and studied in detail its theoretical and practical properties.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title=Remark&lt;br /&gt;
|text= It is important to highlight the fact that for a parameter $\psi_i$ whose distribution is the tranformation of a normal one (log-normal, logit-normal, etc.) the MLE $\hat{\psi}_{\rm pop}$ of the reference parameter $\psi_{\rm pop}$ is neither the mean nor the mode of the distribution. It is in fact the median.&lt;br /&gt;
&lt;br /&gt;
To show why this is the case, let $h$ be a nonlinear, twice continuously derivable and strictly increasing function such that $h(\psi_i)$ is normally distributed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  First we show that it is not the mean. By definition, the MLE of $h(\psi_{\rm pop})$ is  $h(\hat{\psi}_{\rm pop})$. Thus, the estimated distribution of $h(\psi_i)$ is the normal distribution with mean $h(\hat{\psi}_{\rm pop})$, but $\esp{h(\psi_i)} = h(\hat{\psi}_{\rm pop})$ implies  that $\esp{\psi_i} \neq \hat{\psi}_{\rm pop}$ since $h$ is nonlinear. In other words, $\hat{\psi}_{\rm pop}$ is not the mean of the estimated distribution of $\psi_i$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Next we show that it is not the mode. Let $f$ be the pdf of $\psi_i$ and let $f_h$ be the pdf of $h(\psi_i)$. By definition, for any $h(t)\in \mathbb{R}$,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
f(t) = h^\prime(t)f_h(h(t)) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: Thus,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; &lt;br /&gt;
f^\prime(t) = h^{\prime \prime}(t)f_h(h(t)) + h^{\prime 2}(t)f_h^\prime(h(t)) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: By definition of the mode, $f_h^\prime(h(\hat{\psi}_{\rm pop}))=0$. Since $h$ is nonlinear, $h^{\prime \prime}(\hat{\psi}_{\rm pop})\neq 0$ a.s. and  $f^\prime(\hat{\psi}_{\rm pop})\neq 0$ a.s.. In other words, $\hat{\psi}_{\rm pop}$ is not the mode of the estimated distribution of $\psi_i$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Now we show that it is the median. Since $h$ is a strictly increasing function,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\probs{\hat{\psi}_{\rm pop} }{\psi_i \leq \hat{\psi}_{\rm pop} } &amp;amp;=&amp;amp; \probs{\hat{\psi}_{\rm pop} }{h(\psi_i) \leq h(\hat{\psi}_{\rm pop})} \\&lt;br /&gt;
&amp;amp;=&amp;amp; 0.5 .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }} &lt;br /&gt;
&lt;br /&gt;
: In other words, $\hat{\psi}_{\rm pop}$ is the median of the estimated distribution of $\psi_i$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Let us again look at the model used in the [[Visualization#Model exploration | Model Visualization]] Section. For the case of a unique dose $D$ given at time $t=0$, the structural model is written:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
ke&amp;amp;=&amp;amp;Cl/V \\&lt;br /&gt;
Cc(t) &amp;amp;=&amp;amp; \displaystyle{\frac{D \, ka}{V(ka-ke)} }\left(e^{-ke\,t} - e^{-ka\,t} \right) \\&lt;br /&gt;
h(t) &amp;amp;=&amp;amp; h_0 \, \exp(\gamma\, Cc(t)) ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $Cc$ is the concentration in the central compartment and $h$ the hazard function for the event of interest (hemorrhaging). Supposing a constant error model for the concentration, the model for the observations can be easily implemented using $\mlxtran$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MLXTran&lt;br /&gt;
|name=joint1est_model.txt&lt;br /&gt;
|text=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt; &lt;br /&gt;
INPUT:&lt;br /&gt;
parameter =  {ka, V, Cl, h0, gamma}&lt;br /&gt;
&lt;br /&gt;
EQUATION:&lt;br /&gt;
ke=Cl/V&lt;br /&gt;
Cc  = amtDose*ka/(V*(ka-ke))*(exp(-ke*t) - exp(-ka*t))&lt;br /&gt;
h = h0*exp(gamma*Cc)&lt;br /&gt;
&lt;br /&gt;
OBSERVATION:&lt;br /&gt;
Concentration = {type=continuous, prediction=Cc, errorModel=constant}&lt;br /&gt;
Hemorrhaging  = {type=event, hazard=h}&lt;br /&gt;
&lt;br /&gt;
OUTPUT:&lt;br /&gt;
output = {Concentration, Hemorrhaging}&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, {{Verbatim|amtDose}} is a reserved keyword for the last  administered dose.&lt;br /&gt;
&lt;br /&gt;
The model's parameters are the absorption rate constant $ka$, the volume of distribution $V$, the clearance $Cl$, the baseline hazard $h_0$ and the coefficient $\gamma$. The statistical model for the individual parameters can be defined in the $\monolix$ project file (left) and/or the $\monolix$ GUI (right):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithCode&amp;amp;Image&lt;br /&gt;
|title=&lt;br /&gt;
|text=&lt;br /&gt;
|code={{MLXTranForTable&lt;br /&gt;
|name=&lt;br /&gt;
|text=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt; &lt;br /&gt;
INDIVIDUAL:&lt;br /&gt;
     ka    = {distribution=logNormal, iiv=yes}&lt;br /&gt;
     V     = {distribution=logNormal, iiv=yes},&lt;br /&gt;
     Cl    = {distribution=normal, iiv=yes},&lt;br /&gt;
     h0    = {distribution=probitNormal, iiv=yes},&lt;br /&gt;
     gamma = {distribution=logitNormal, iiv=yes},&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
|image=&lt;br /&gt;
[[File:Vsaem1.png]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the model is implemented, tasks such as maximum likelihood estimation can be performed using the SAEM algorithm. Certain settings in SAEM must be provided by the user. Even though SAEM is quite insensitive to the initial parameter values,&lt;br /&gt;
it is possible to perform a preliminary sensitivity analysis in order to select &amp;quot;good&amp;quot; initial values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=Vsaem2.png|caption=Looking for good initial values for SAEM}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, when we run SAEM, it converges easily and quickly to the MLE:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{JustCode&lt;br /&gt;
|code=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt;Estimation of the population parameters&lt;br /&gt;
&lt;br /&gt;
              parameter&lt;br /&gt;
ka          :    0.974&lt;br /&gt;
V           :     7.07&lt;br /&gt;
Cl          :     2.00&lt;br /&gt;
h0          :   0.0102&lt;br /&gt;
gamma       :    0.485&lt;br /&gt;
&lt;br /&gt;
omega_ka    :    0.668&lt;br /&gt;
omega_V     :    0.365&lt;br /&gt;
omega_Cl    :    0.588&lt;br /&gt;
omega_h0    :    0.105&lt;br /&gt;
omega_gamma :   0.0901&lt;br /&gt;
&lt;br /&gt;
a_1         :    0.345&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parameter estimation can therefore be seen as estimating the reference values and variance of the random effects.&lt;br /&gt;
&lt;br /&gt;
In addition to these numbers, it is important to be able to graphically represent these distributions in order to see them and therefore understand them better. In effect, the interpretation of certain parameters is not always simple. Of course, we know what a normal distribution represents and in particular its mean, median and mode, which are equal (see the distribution of $Cl$ below for instance). These measures of central tendency can be different among themselves for other asymmetric distributions such as the log-normal (see the distribution of $ka$).&lt;br /&gt;
&lt;br /&gt;
Interpreting dispersion terms like  $\omega_{ka}$  and $\omega_{V}$ is not obvious either when the parameter distributions are not normal. In such cases, quartiles or quantiles of order 5% and 95% (for example) may be useful for quantitively describing the variability of these parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks &lt;br /&gt;
|title=Remarks&lt;br /&gt;
|text=&lt;br /&gt;
For a parameter $\psi$ whose distribution is log-normal, we can approximate the coefficient of variation for $\psi$ by the standard deviation $\omega_{\psi}$ of the random effect $\eta$ if this is fairly small. In effect, when $\omega_{\psi}$ is small,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\psi &amp;amp;=&amp;amp; \psi_{\rm pop} e^{\eta} \\&lt;br /&gt;
&amp;amp;\approx &amp;amp; \psi_{\rm pop}(1+ \eta) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Thus&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\esp{\psi} &amp;amp;\approx&amp;amp; \psi_{\rm pop} \\&lt;br /&gt;
\std{\psi} &amp;amp;\approx &amp;amp; \psi_{\rm pop}\omega_{\psi},&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
{\rm cv}(\psi) &amp;amp;=&amp;amp; \frac{\std{\psi} }{\esp{\psi} } \\&lt;br /&gt;
 &amp;amp;\approx &amp;amp; \omega_{\psi} .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Do not forget that this approximation is only valid when $\omega$ is small and in the case of log-normal distributions. It does not carry over to any other distribution. Thus, when $\omega_{h0}=0.1$ for a probit-normal distribution or $\omega_{\gamma}=0.09$ for a logit-normal one, there is no immediate interpretation available. Only by looking at the graphical display of the pdf or by calculating some quantiles of interest can we begin to get an idea of dispersion in the parameters $h0$ and $\gamma$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saem3b.png|caption=Estimation of the population distributions of the individual parameters of the model }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bayesian estimation of the population parameters==&lt;br /&gt;
&lt;br /&gt;
The ''Bayesian approach'' considers $\theta$ as a random vector with a ''prior distribution'' $\qth$. We can then define the posterior  distribution of $\theta$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\pcthy(\theta {{!}} \by ) &amp;amp;=&amp;amp; \displaystyle{ \frac{\pth( \theta )\pcyth(\by {{!}} \theta )}{\py(\by)} }\\&lt;br /&gt;
&amp;amp;=&amp;amp; \displaystyle{ \frac{\pth( \theta ) \int \pypsith(\by,\bpsi {{!}}\theta) \, d \bpsi}{\py(\by)} }.&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We can estimate this conditional distribution and derive any statistics (posterior mean, standard deviation, percentiles, etc.) or derive the so-called ''Maximum a Posteriori'' (MAP) estimate of $\theta$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\hat{\theta}^{\rm MAP} &amp;amp;=&amp;amp; \argmax{\theta}  \pcthy(\theta {{!}} \by ) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \argmax{\theta} \left\{  {\llike}(\theta ; \by) + \log( \pth( \theta ) ) \right\} .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The MAP estimate  therefore maximizes a penalized version of the observed likelihood.   In other words, maximum a posteriori estimation reduces to penalized maximum likelihood estimation. Suppose for instance that $\theta$ is a scalar parameter and the prior is a normal distribution with mean $\theta_0$ and variance $\gamma^2$. Then, the MAP estimate minimizes&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
\hat{\theta}^{\rm MAP}  =\argmax{\theta} \left\{  {\llike} (\theta ; \by) - \displaystyle{ \frac{1}{2\gamma^2} }(\theta - \theta_0)^2 \right\} .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The MAP estimate is a trade-off between the MLE which maximizes ${\llike}(\theta ; \by)$ and $\theta_0$ which minimizes $(\theta - \theta_0)^2$. The weight given to the prior directly depends on the variance of the prior distribution: the smaller $\gamma^2$ is, the closer to $\theta_0$ the MAP is. The limiting distribution considers that $\gamma^2=0$: this prior means here that $\theta$ is fixed as $\theta_0$ and no longer needs to be estimated.&lt;br /&gt;
&lt;br /&gt;
Both the Bayesian and frequentist approaches have their supporters and detractors. But rather than being dogmatic and blindly following the same rule-book every time, we need to be pragmatic and ask the right methodological questions when confronted with a new problem.&lt;br /&gt;
&lt;br /&gt;
We have to remember that Bayesian methods have been extremely successful, in particular for numerical calculations. For instance, (Bayesian) MCMC methods allow us to estimate more or less any conditional distribution coming from any hierarchical model, whereas frequentist approaches such as maximum likelihood estimation can be much more difficult to implement.&lt;br /&gt;
&lt;br /&gt;
All things said, the problem comes down to knowing whether the data contains sufficient information to answer a given question, and whether some other information may be available to help answer it. This is the essence of the art of modeling: finding the right compromise between the confidence we have in the data and prior knowledge of the problem. Each problem is different and requires a specific approach. For instance, if all the patients in a pharmacokinetic trial have essentially the same weight, it is pointless to estimate a relationship between weight and the model's PK parameters using the trial data. In this case, the modeler would be better served trying to use prior information based on physiological criteria rather than just a statistical model.&lt;br /&gt;
&lt;br /&gt;
Therefore, we can use information available to us, of course! Why not? But this information needs to be pertinent. Systematically using a prior for the parameters is not always meaningful. Can we reasonable suppose that we have access to such information? For continuous data for example, what does putting a prior on the residual error model's parameters mean in reality? A reasoned statistical approach consists of only including prior information for certain parameters (those for which we have real prior information) and having confidence in the data for the others.&lt;br /&gt;
&lt;br /&gt;
$\monolix$ allows this hybrid approach which  reconciles the Bayesian and frequentist approaches. A given parameter can be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* a fixed constant if we have absolute confidence in its value or the data does not allow it to be estimated, essentially due to identifiability constraints.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* estimated by maximum likelihood, either because we have great confidence in the data or have no information on the parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* estimated by introducing a prior and calculating the MAP estimate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* estimated by introducing a prior and then estimating the posterior distribution.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We put aside dealing with the fixed components of $\theta$ in the following. Here are some possible situations:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; ''Combined maximum likelihood and maximum a posteriori estimation'':  decompose $\theta$ into $(\theta_E,\theta_{M})$ where $\theta_E$ are the components of $\theta$ to be estimated with MLE and $\theta_{M}$ those with a prior distribution whose posterior distribution is to be maximized. Then,  $(\hat{\theta}_E , \hat{\theta}_{M} )$ below  maximizes the penalized  likelihood of $(\theta_E,\theta_{M})$: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
(\hat{\theta}_E , \hat{\theta}_{M} )  &amp;amp;=&amp;amp; \argmax{\theta_E , \theta_{M} } \log(\py(\by , \theta_{M}; \theta_E)) \\&lt;br /&gt;
&amp;amp;=&amp;amp;  \argmax{\theta_E , \theta_{M} }  \left\{  {\llike}(\theta_E , \theta_{M}; \by) + \log( \pth( \theta_M ) ) \right\} ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where ${\llike} (\theta_E , \theta_{M}; \by) \ \  \eqdef \ \ \log\left(\py(\by | \theta_{M}; \theta_E)\right).$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; ''Combined maximum likelihood and posterior distribution estimation'': here, decompose  $\theta$ into $(\theta_E,\theta_{R})$ where $\theta_E$ are the components of $\theta$ to be estimated with MLE and $\theta_{R}$ those with a prior distribution whose posterior distribution is to be estimated. We  propose the following strategy for estimating $\theta_E$ and $\theta_{R}$: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:lower-roman&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Compute the maximum likelihood of $\theta_E$: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\hat{\theta}_E  &amp;amp;=&amp;amp; \argmax{\theta_E}  \log(\py(\by ; \theta_E)) \\&lt;br /&gt;
&amp;amp;=&amp;amp;  \argmax{\theta_E}  \int \pmacro(\by , \theta_R ; \theta_E ) d \theta_R .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Estimate the conditional distribution $\pmacro(\theta_{R} | \by ;\hat{\theta}_E)$. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is then straightforward to extend this approach to more complex situations where  some components of $\theta$ are estimated with MLE, others using MAP estimation and others still by estimating their conditional distributions.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Example1&lt;br /&gt;
|title1=Example&lt;br /&gt;
|title2=A PK example&lt;br /&gt;
|text=&lt;br /&gt;
In this example we use only the pharmacokinetic data and aim to estimate the population parameter distributions of the PK parameters $ka$, $V$ and $Cl$. We assume log-normal distributions for these three parameters. All of the model's population parameters are estimated by maximum likelihood estimation except $ka_{\rm pop}$ for which a log-normal distribution is used as a prior:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \log(ka_{\rm pop}) \sim {\cal N}(\log(1.5), \gamma^2) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
$\monolix$ allows us to compute the MAP estimate and to estimate the posterior distribution of $ka_{\rm pop}$ for various values of $\gamma$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:17%; margin-right:17%; align:center&amp;quot;&amp;gt;&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;  align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
{{!}} $\gamma$ {{!}}{{!}} 0 {{!}}{{!}} 0.01 {{!}}{{!}} 0.025 {{!}}{{!}} 0.05 {{!}}{{!}} 0.1 {{!}}{{!}} 0.2 {{!}}{{!}} $+ \infty$ &lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}$\hat{ka}_{\rm pop}^{\rm MAP}$ {{!}}{{!}} 1.5 {{!}}{{!}} 1.49 {{!}}{{!}} 1.47 {{!}}{{!}} 1.39 {{!}}{{!}} 1.22 {{!}}{{!}} 1.11 {{!}}{{!}} 1.05 &lt;br /&gt;
{{!}}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=bayes1.png|caption=Prior and posterior distributions of $ka_{\rm pop}$ for different values of $\gamma$}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As expected, the posterior distribution converges to the prior distribution when the  standard deviation $\gamma$ of the prior distribution decreases. Also, the mode of the posterior distribution converges to the maximum likelihood estimate of $ka_{\rm pop}$ when $\gamma$ increases.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Estimation of the Fisher information matrix ==&lt;br /&gt;
&lt;br /&gt;
The variance of the estimator $\thmle$ and thus confidence intervals can be derived  from the [[Estimation of the observed Fisher information matrix|observed Fisher information matrix (F.I.M.)]], which itself is calculated using the observed likelihood (i.e., the pdf of the observations $\by$):&lt;br /&gt;
&lt;br /&gt;
{{EquationWithRef&lt;br /&gt;
|equation=&amp;lt;div id=&amp;quot;ofim_intro3&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\ofim(\thmle ; \by) \ \ \eqdef \ \ - \displaystyle{ \frac{\partial^2}{\partial \theta^2} }\log({\like}(\thmle ; \by)) .&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|reference=(1)  }}&lt;br /&gt;
&lt;br /&gt;
Then, the variance-covariance matrix of the maximum likelihood estimator $\thmle$ can be estimated by the inverse of the observed F.I.M. Standard errors (s.e.) for each component of $\thmle$ are their standard deviations, i.e., the square-root of the diagonal elements of this covariance matrix. $\monolix$ also displays the (estimated) relative standard errors (r.s.e.), i.e., the (estimated) standard error divided by the value of the estimated parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{JustCode&lt;br /&gt;
|code=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt;Estimation of the population parameters&lt;br /&gt;
&lt;br /&gt;
              parameter     s.e. (s.a.)   r.s.e.(%)&lt;br /&gt;
ka          :    0.974         0.082           8&lt;br /&gt;
V           :     7.07          0.35           5&lt;br /&gt;
Cl          :        2          0.07           4&lt;br /&gt;
h0          :   0.0102        0.0014          14&lt;br /&gt;
gamma       :    0.485         0.015           3&lt;br /&gt;
&lt;br /&gt;
omega_ka    :    0.668         0.064          10&lt;br /&gt;
omega_V     :    0.365         0.037          10&lt;br /&gt;
omega_Cl    :    0.588         0.055           9&lt;br /&gt;
omega_h0    :    0.105         0.032          30&lt;br /&gt;
omega_gamma :   0.0901         0.044          49&lt;br /&gt;
&lt;br /&gt;
a_1         :    0.345         0.012           3&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The F.I.M. can be used for detecting overparametrization of the structural model. In effect, if the model is poorly identifiable,  certain estimators will be quite correlated and the F.I.M. will therefore be poorly conditioned and difficult to inverse. Suppose for example that we want to fit a two compartment PK model to the same data as before. The output is shown below. The large values for the relative standard errors for the inter-compartmental clearance $Q$ and the volume of the peripheral compartment $V_2$ mean that the data does not allow us to  estimate well these two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{JustCode&lt;br /&gt;
|code=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt;Estimation of the population parameters&lt;br /&gt;
&lt;br /&gt;
           parameter     s.e. (lin)   r.s.e.(%)&lt;br /&gt;
ka       :     0.246       0.0081             3&lt;br /&gt;
Cl       :       1.9        0.075             4&lt;br /&gt;
V1       :      1.71         0.14             8&lt;br /&gt;
Q        :  0.000171        0.024      1.43e+04&lt;br /&gt;
V2       :   0.00673          3.1      4.62e+04&lt;br /&gt;
&lt;br /&gt;
omega_ka :     0.171        0.026            15&lt;br /&gt;
omega_Cl :     0.293        0.026             9&lt;br /&gt;
omega_V1 :     0.621        0.062            10&lt;br /&gt;
omega_Q  :      5.72      1.4e+03      2.41e+04&lt;br /&gt;
omega_V2 :      4.61      1.8e+04      3.94e+05&lt;br /&gt;
&lt;br /&gt;
a        :     0.136       0.0073             5&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Fisher information criteria is also widely used in optimal experimental design. Indeed, minimizing the variance of the estimator corresponds to maximizing the information.  Then, estimators and designs can be evaluated by looking at certain summary statistics of the covariance matrix (like the determinant or trace for instance).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Estimation of the individual parameters ==&lt;br /&gt;
&lt;br /&gt;
Once $\theta$ has been estimated, the conditional distribution $\pmacro(\psi_i | y_i ; \hat{\theta})$ of the individual parameters $\psi_i$ can be estimated for each individual $i$ using the [[The Metropolis-Hastings algorithm for simulating the individual parameters| Metropolis-Hastings algorithm]]. For each $i$, this algorithm generates a sequence $(\psi_i^{k}, k \geq 1)$ which converges in distribution to the conditional distribution $\pmacro(\psi_i | y_i ; \hat{\theta})$  and that can be used for estimating any summary statistic of this distribution (mean, standard deviation, quantiles, etc.).&lt;br /&gt;
&lt;br /&gt;
The mode of this conditional distribution can be estimated using this sequence or by maximizing $\pmacro(\psi_i | y_i ; \hat{\theta})$ using numerical methods.&lt;br /&gt;
&lt;br /&gt;
The choice of using the conditional mean or the conditional mode is arbitrary. By default, $\monolix$ uses the conditional mode, taking the philosophy that the &amp;quot;most likely&amp;quot;  values of the individual parameters are the most suited for computing the &amp;quot;most likely&amp;quot; predictions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=mode1.png|caption=Predicted concentrations for 6 individuals using the estimated  conditional modes of the individual PK parameters}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Estimation of the observed log-likelihood ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once $\theta$ has been estimated, the observed log-likelihood of $\hat{\theta}$ is defined as&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \begin{eqnarray}&lt;br /&gt;
{\llike} (\hat{\theta};\by) &amp;amp;=&amp;amp; \log({\like}(\hat{\theta};\by)) \\&lt;br /&gt;
&amp;amp;\eqdef&amp;amp; \log(\py(\by;\hat{\theta})) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The observed log-likelihood cannot be computed in closed form for nonlinear mixed effects models, but can be estimated using the methods described in the [[Estimation of the log-likelihood]] Section. The estimated  log-likelihood can then be used for performing likelihood ratio tests and for computing information criteria such as AIC and BIC (see the [[Evaluation]] Section).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Bibliography ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{Monolix,&lt;br /&gt;
author = {Lixoft},&lt;br /&gt;
title = {Monolix 4.2},&lt;br /&gt;
year={2012}&lt;br /&gt;
journal = {http://www.lixoft.eu/products/monolix/product-monolix-overview},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{comets2011package,&lt;br /&gt;
  title={saemix: Stochastic Approximation Expectation Maximization {(SAEM)} algorithm. R package version 0.96.1},&lt;br /&gt;
  author={Comets, E. and Lavenu, A. and Lavielle, M.},&lt;br /&gt;
journal = {http://cran.r-project.org/web/packages/saemix/index.html},&lt;br /&gt;
  year={2013}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{nlmefitsa,&lt;br /&gt;
  title={nlmefitsa: fit nonlinear mixed-effects model with stochastic {EM} algorithm. Matlab R2013a function},&lt;br /&gt;
  author={The MathWorks},&lt;br /&gt;
journal = {http://www.mathworks.fr/fr/help/stats/nlmefitsa.html},&lt;br /&gt;
  year={2013}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{beal1992nonmem,&lt;br /&gt;
  title={NONMEM users guides},&lt;br /&gt;
  author={Beal, S.L. and Sheiner, L.B. and Boeckmann, A. and Bauer, R.J.},&lt;br /&gt;
  journal={San Francisco, NONMEM Project Group, University of California},&lt;br /&gt;
  year={1992}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{pinheiro2000mixed,&lt;br /&gt;
  title={Mixed effects models in S and S-PLUS},&lt;br /&gt;
  author={Pinheiro, J.C. and Bates, D.M.},&lt;br /&gt;
  year={2000},&lt;br /&gt;
  publisher={Springer Verlag}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{pinheiro2010r,&lt;br /&gt;
  title={the R Core team (2009) nlme: Linear and Nonlinear Mixed Effects Models. R package version 3.1-96},&lt;br /&gt;
  author={Pinheiro, J. and Bates, D. and DebRoy, S. and Sarkar, D.},&lt;br /&gt;
  journal={R Foundation for Statistical Computing, Vienna},&lt;br /&gt;
  year={2010}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{spiegelhalter2003winbugs,&lt;br /&gt;
  title={WinBUGS user manual},&lt;br /&gt;
  author={Spiegelhalter, D. and Thomas, A. and Best, N. and Lunn, D.},&lt;br /&gt;
  journal={Cambridge: MRC Biostatistics Unit},&lt;br /&gt;
  year={2003}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@Manual{docSPSS,&lt;br /&gt;
		title = {Linear mixed-effects modeling in {SPSS}. An introduction to the {MIXED} procedure},&lt;br /&gt;
    author = {SPSS},&lt;br /&gt;
    year = {2002},&lt;br /&gt;
    note={Technical Report}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@Manual{docSAS,&lt;br /&gt;
		title = {The {NLMMIXED} procedure, {SAS/STAT} 9.2 User's Guide},&lt;br /&gt;
		chapter = {61},&lt;br /&gt;
		pages = {4337--4435},&lt;br /&gt;
		author = {SAS},&lt;br /&gt;
		year = {2008}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Back&amp;amp;Next&lt;br /&gt;
|linkBack=Visualization&lt;br /&gt;
|linkNext=Evaluation }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Visualization&amp;diff=7168</id>
		<title>Visualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Visualization&amp;diff=7168"/>
		<updated>2013-06-04T18:17:48Z</updated>

		<summary type="html">&lt;p&gt;Marc: /* Bibliography */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before deciding to model data, it is very important to be able to visualize it. This is especially the case for longitudinal data when we want to see how an outcome varies with time or as a function of another outcome. We may also want to visualize how the individual covariates are distributed, visually detect if there are relationships between variables, visually compare data from different groups, etc. Development of such visual exploration tools poses no methodological problems. It is simple to write a Matlab or R code for one's own needs. To&lt;br /&gt;
illustrate the data visualization part of this chapter, we have created a little Matlab toolbox called $\popixplore$ ({{filepath:popixplore 1.1.zip}}) which can be freely downloaded and used.&lt;br /&gt;
&lt;br /&gt;
It may also be useful to be able to visualize the model itself by undertaking a sensitivity analysis to look at how the structural model changes when we vary one or several parameters. This is important for truly understanding the structural model, i.e., what is behind the given mathematical equations. In the modeling context, we may also want to visually calibrate parameters in order to obtain predictions as close as possible to the observations. Developing such a tool is a difficult task because the tool needs to be able to easily input a model using some coding language, perform complex calculations, and provide a decent graphical interface (e.g., one that lets you easily modify the model parameters).&lt;br /&gt;
&lt;br /&gt;
Various model visualization tools exist, such as [[http://www.berkeleymadonna.com/index.html Berkeley Madonna]], specialized in the analysis of dynamical systems and the resolution of ordinary differential equations. Here, we use [[http://www.lixoft.eu/products/mlxplore/mlxplore-overview/ $\mlxplore$]] for some different reasons:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* $\mlxplore$ uses the $\mlxtran$ language which is extremely flexible and well-adapted to implementing complex mixed-effects models. Indeed, with $\mlxtran$ we can implement pharmacokinetic models with complex administration schedules, include inter-individual variability in parameters, define a statistical model for the covariates, etc. Another extremely important aspect of $\mlxtran$ is that it rigorously adopts the model representation formalisms proposed in $\wikipopix$. In other words, model implementation is completely in sync with its mathematical representation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* $\mlxplore$ provides a clear graphical interface that of course allows us to visualize the structural model, but also the statistical model, which is of fundamental importance in the population approach. We can thus visualize the impact of covariates and inter-individual variability of model parameters on predictions.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data exploration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following example involves 80 individuals that receive a unique dose of an anticoagulant at time $t=0$. For each patient we then measure the plasmatic concentration of the drug at various times. This drug can cause undesirable side effects such as nose bleeds. If this happens, we also record the times at which this happens. The data is recorded in columns of a single text file {{Verbatim|pkrtte_data.csv}}. In this example, the columns are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''id''' the ID number of the patient&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''time''' dose administration and observation times&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''amt''' the amount of drug administered&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''y''' the observations (concentrations and events)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''ytype''' the type of observation: 1=concentration, 2=event&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''weight''' a continuous individual covariate&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''gender''' a categorical individual covariate (F or M)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''group''' four different groups receive different doses: A=40mg, B=60mg, C=80mg, D=100mg.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=exploredata0.png|caption=The datafile {{Verbatim|pkrtte_data.csv}} }} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can read this datafile with the function {{Verbatim|readdatapx}} and add  additional information about the data:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MATLABcode&lt;br /&gt;
|name=&lt;br /&gt;
|code=&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
datafile.name='pkrtte_data.csv';&lt;br /&gt;
datafile.format='csv';  % can be &amp;quot;csv&amp;quot;, &amp;quot;space&amp;quot;, &amp;quot;tab&amp;quot; or &amp;quot;;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
info.header = {'ID','TIME','AMT','Y','YTYPE','COV','CAT','CAT'};&lt;br /&gt;
info.observation.name={'concentration','hemorrhaging'};&lt;br /&gt;
info.observation.type={'continuous','event'};&lt;br /&gt;
info.observation.unit={'mg/l',''};&lt;br /&gt;
info.covariate.unit={'kg',''};&lt;br /&gt;
info.time.unit='h';&lt;br /&gt;
&lt;br /&gt;
data=readdatapx(datafile,info);&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How we graphically represent data depends on the type of data. Often for continuous data we use &amp;quot;spaghetti plots&amp;quot;, where all of the observations are given on the same plot, and those for each individual are joined up using line segments. Time-to-event data are usually represented using Kaplan-Meyer plots, i.e., an estimate of the survival function for the first event. In the case of repeated events, we can instead represent the average cumulative number of events per individual.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MATLABcode&lt;br /&gt;
|name=&lt;br /&gt;
|code=&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;exploredatapx(data)&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=exploredata1.png|caption=Graphical representation of the data. Left: concentrations, right: average cumulative number of events per individual}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When different groups receive different treatments, it can be useful to separately visualize  the data from each group. Here for instance we can separate the patients into groups depending on the initial dose given.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=exploredata2.png|caption=Concentration profiles per dose group}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|style = &amp;quot;width:50%&amp;quot;| [[File:exploredata3a.png]] &lt;br /&gt;
|style = &amp;quot;width:50%&amp;quot;| [[File:exploredata3b.png]]&lt;br /&gt;
|-&lt;br /&gt;
|cellspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;text-align:center&amp;quot;| ''Distribution of  weight and gender per dose group'' &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title=Remark&lt;br /&gt;
|text=The data file {{Verbatim|pkrtte_data.csv}} and the matlab script {{Verbatim|pkrtte_demo.m}} are available in the folder {{Verbatim|demos}} of $\popixplore$: {{filepath:popixplore 1.1.zip}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Model exploration==&lt;br /&gt;
&lt;br /&gt;
===Exploring the structural model===&lt;br /&gt;
&lt;br /&gt;
Suppose that we now want to visualize the following joint model which is one that can be used for simultaneously modeling  PK and time-to-event data:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
k&amp;amp;=&amp;amp;Cl/V \\&lt;br /&gt;
\deriv{A_d} &amp;amp;=&amp;amp; - k_a \, A_d(t) \\&lt;br /&gt;
\deriv{A_c} &amp;amp;=&amp;amp;  k_a \, A_d(t) - k \, A_c(t) \\&lt;br /&gt;
Cc(t) &amp;amp;=&amp;amp; {Ac(t)}/{V} \\&lt;br /&gt;
h(t) &amp;amp;=&amp;amp; h_0 \, \exp(\gamma\, Cc(t)) .&lt;br /&gt;
\end{eqnarray} &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Here, $A_d$ and $A_c$ are the amounts of drug in the depot and central compartments, $Cc$ the concentration in the central compartment and $h$ the hazard function for the event of interest (hemorrhaging for instance). The parameters of the model are the absorption rate constant $ka$, the volume of distribution $V$, the clearance $Cl$, the baseline hazard $h_0$ and the coefficient $\gamma$.&lt;br /&gt;
We assume that the drug can be administered both intravenously  and orally,  meaning that the drug can be administered to both the depot and the central compartment.&lt;br /&gt;
&lt;br /&gt;
We first need to implement this model using $\mlxtran$:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MLXTran&lt;br /&gt;
|name=joint1_model.txt&lt;br /&gt;
|text=&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
[PREDICTION]&lt;br /&gt;
input={ka, V, Cl, h0, gamma}&lt;br /&gt;
&lt;br /&gt;
PK:&lt;br /&gt;
depot(type=1,target=Ad)&lt;br /&gt;
depot(type=2,target=Ac)&lt;br /&gt;
&lt;br /&gt;
EQUATION:&lt;br /&gt;
k = Cl/V&lt;br /&gt;
ddt_Ad = -ka*Ad&lt;br /&gt;
ddt_Ac =  ka*Ad - k*Ac&lt;br /&gt;
Cc = Ac/V&lt;br /&gt;
h = h0*exp(gamma*Cc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, an administration of type 1 (resp. 2) is an oral (resp. iv) administration.&lt;br /&gt;
&lt;br /&gt;
The tasks, i.e., how the model is to be used, are then coded as an $\mlxplore$ project:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MLXPlore&lt;br /&gt;
|name=joint1_project.txt&lt;br /&gt;
|text=&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;MODEL&amp;gt;&lt;br /&gt;
file='joint1_model.txt'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DESIGN&amp;gt;&lt;br /&gt;
[ADMINISTRATION]&lt;br /&gt;
adm1={time=0, amount=50,type=1}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PARAMETER&amp;gt;&lt;br /&gt;
ka = 0.5&lt;br /&gt;
V = 10&lt;br /&gt;
Cl = 0.5&lt;br /&gt;
h0 = 0.01&lt;br /&gt;
gamma = 0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OUTPUT&amp;gt;&lt;br /&gt;
list={Cc, h}&lt;br /&gt;
grid=0:0.1:100&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example, a single dose of 50 mg is administered orally ({{Verbatim|target{{-}}Ad}} when {{Verbatim|type{{-}}1}}) at time 0. We have asked $\mlxplore$ to display the predicted concentration $Cc$ and the hazard function $h$ between $t=0$ and $t=100$ every $0.1\,h$ for a given set of parameters. We can then change the values of these parameters with the sliders to see what the impact on the two functions is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=exploremodel1.png|caption=Exploring the model using $\mlxplore$ }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can easily modify the dose regimen without changing anything in the  model itself. Suppose for instance that we want now to compare a treatment with repeated doses of 50mg every 24 hours and a treatment with repeated doses of 25mg every 12 hours. Only the section {{Verbatim|&amp;lt;DESIGN&amp;gt;}} needs to be modified:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithCode&amp;amp;Image&lt;br /&gt;
|title=&lt;br /&gt;
|text=&lt;br /&gt;
|code={{MLXPloreForTable&lt;br /&gt;
|name=joint2_project.txt&lt;br /&gt;
|text=&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DESIGN&amp;gt;&lt;br /&gt;
[ADMINISTRATION]&lt;br /&gt;
adm1={time=0:24:144, amount=50,type=1}&lt;br /&gt;
adm2={time=0:12:144, amount=25,type=1}&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
|image=[[File:exploremodel2.png]] }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can combine different administrations (oral and intravenous for instance) into one global treatment:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithCode&amp;amp;Image&lt;br /&gt;
|title=&lt;br /&gt;
|text=&lt;br /&gt;
|code={{MLXPloreForTable&lt;br /&gt;
|name=joint3_project.txt&lt;br /&gt;
|text=&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;DESIGN&amp;gt;&lt;br /&gt;
[ADMINISTRATION]&lt;br /&gt;
adm1={time=0:24:144, amount=50,type=1}&lt;br /&gt;
adm2={time=6:48:150, amount=25,type=2}&lt;br /&gt;
&lt;br /&gt;
[TREATMENT]&lt;br /&gt;
trt1={adm1, adm2}&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
|image= [[File:exploremodel3.png]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Exploring the statistical model===&lt;br /&gt;
&lt;br /&gt;
One of the main advantages of $\mlxplore$ is its ability to  graphically display the predicted distribution of the functions of interest $Cc$ and $h$ when certain  parameters of the model are assumed to be random variables. Assume for instance that $V$, $Cl$ and $h_0$ are log-normally distributed. To take this into account, we simply need to insert a section {{Verbatim|[INDIVIDUAL]}} into the project file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MLXTran&lt;br /&gt;
|name=joint2_model.txt&lt;br /&gt;
|text=&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
[INDIVIDUAL]&lt;br /&gt;
input={V_pop,Cl_pop,h0_pop,omega_V,omega_Cl,omega_h0}&lt;br /&gt;
&lt;br /&gt;
DEFINITION:&lt;br /&gt;
V =  {distribution=lognormal, reference=V_pop,  sd=omega_V}&lt;br /&gt;
Cl = {distribution=lognormal, reference=Cl_pop, sd=omega_Cl}&lt;br /&gt;
h0 = {distribution=lognormal, reference=h0_pop, sd=omega_h0}&lt;br /&gt;
&lt;br /&gt;
[PREDICTION]&lt;br /&gt;
input={ka, V, Cl, h0, gamma}&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The parameters of the model are now the population parameters $V_{\rm pop}$, $Cl_{\rm pop}$, $h0_{\rm pop}$,  $\omega_V$, $\omega_{Cl}$ and $\omega_{h_0}$ and the  parameters $k_a$ and $\gamma$ which have no inter-individual variability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MLXTran&lt;br /&gt;
|name=joint4_project.txt&lt;br /&gt;
|text=&amp;lt;pre style=&amp;quot;background-color: #EFEFEF; border:none&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;MODEL&amp;gt;&lt;br /&gt;
file='joint2_model.txt'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DESIGN&amp;gt;&lt;br /&gt;
[ADMINISTRATION]&lt;br /&gt;
adm1={time=0, amount=50,type=1}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PARAMETER&amp;gt;&lt;br /&gt;
V_pop = 10&lt;br /&gt;
Cl_pop = 0.5&lt;br /&gt;
h0_pop=0.01&lt;br /&gt;
omega_V = 0.2&lt;br /&gt;
omega_Cl = 0.3&lt;br /&gt;
omega_h0 = 0.2&lt;br /&gt;
ka = 0.5&lt;br /&gt;
gamma = 0.5&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OUTPUT&amp;gt;&lt;br /&gt;
list={Cc, h}&lt;br /&gt;
grid=0:0.1:100&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When some parameters of the model are random variables, $\mlxplore$ displays the median of the predicted distribution and several prediction intervals (the default is to use different shaded areas for the 10%, 20%, ..., 90% quantiles).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=exploremodel4b.png|caption=Exploring the statistical model using $\mlxplore$}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is possible to introduce covariates into the statistical model by considering for example that the volume depends on the weight, and considering that these covariates are themselves random variables. This may be important if we are for example looking to visualize the amount of variation in concentration due to variation in weight, and the variation in concentration which remains unaccounted for, caused by random effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=exploremodel5.png|caption=Exploring the statistical model using $\mlxplore$ }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The $\mlxtran$ model files and the $\mlxplore$ scripts can be downloaded here: {{filepath:pk mlxplore.zip}}.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Bibliography ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@ARTICLE{popixplore,&lt;br /&gt;
author = {POPIX Inria team},&lt;br /&gt;
title = {Popixplore 1.0},&lt;br /&gt;
url = {https://wiki.inria.fr/wikis/popix/images/7/71/Popixplore_1.1.zip},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@ARTICLE{MLXplore,&lt;br /&gt;
author = {Lixoft},&lt;br /&gt;
title = {MLXPlore 1.0},&lt;br /&gt;
url = {http://www.lixoft.eu/products/mlxplore/mlxplore-overview},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{macey2000berkeley,&lt;br /&gt;
  title={Berkeley Madonna user’s guide},&lt;br /&gt;
  author={Macey, R. and Oster, G. and Zahnley, T.},&lt;br /&gt;
  journal={Berkeley (CA): University of California},&lt;br /&gt;
  year={2000}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{chatterjee2009sensitivity,&lt;br /&gt;
  title={Sensitivity analysis in linear regression},&lt;br /&gt;
  author={Chatterjee, S. and Hadi, A. S.},&lt;br /&gt;
  volume={327},&lt;br /&gt;
  year={2009},&lt;br /&gt;
  publisher={Wiley}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{sensibilité2013,&lt;br /&gt;
  title={Analyse de sensibilité et exploration de modèles},&lt;br /&gt;
  author={Faivre R. and Looss B. and  Mah&amp;amp;eacute;vas, S. and Makowski, D. and Monod, H.},&lt;br /&gt;
  year={2013},&lt;br /&gt;
  publisher={Editions Quae}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{saltelli2000sensitivity,&lt;br /&gt;
  title={Sensitivity analysis},&lt;br /&gt;
  author={Saltelli, A. and Chan, K. and Scott, E. M. and others},&lt;br /&gt;
  volume={134},&lt;br /&gt;
  year={2000},&lt;br /&gt;
  publisher={Wiley New York}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{saltelli2008global,&lt;br /&gt;
  title={Global sensitivity analysis: the primer},&lt;br /&gt;
  author={Saltelli, A. and Ratto, M. and Andres, T. and Campolongo, F. and Cariboni, J. and Gatelli, D. and Saisana, M. and Tarantola, S.},&lt;br /&gt;
  year={2008},&lt;br /&gt;
  publisher={Wiley-Interscience}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@book{saltelli2004sensitivity,&lt;br /&gt;
  title={Sensitivity analysis in practice: a guide to assessing scientific models},&lt;br /&gt;
  author={Saltelli, A. and Tarantola, S. and Campolongo, F. and Ratto, M.},&lt;br /&gt;
  year={2004},&lt;br /&gt;
  publisher={Wiley}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Next&lt;br /&gt;
|link=Modeling}}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inria.fr/wikis/popix/index.php?title=Estimation&amp;diff=7167</id>
		<title>Estimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.inria.fr/wikis/popix/index.php?title=Estimation&amp;diff=7167"/>
		<updated>2013-06-04T17:30:20Z</updated>

		<summary type="html">&lt;p&gt;Marc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In the modeling context, we usually assume that we have data that includes  observations $\by$,  measurement times $\bt$ and possibly  additional regression variables $\bx$.  There may also be individual covariates $\bc$, and in pharmacological applications the dose regimen $\bu$. For clarity, in the following notation we will omit  the design variables $\bt$, $\bx$ and $\bu$, and the covariates  $\bc$.&lt;br /&gt;
&lt;br /&gt;
Here, we find ourselves in the classical framework of incomplete data models. Indeed, only $\by = (y_{ij})$ is observed in the joint model $\pypsi(\by,\bpsi;\theta)$.&lt;br /&gt;
&lt;br /&gt;
Estimation tasks are common ones seen in statistics:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Estimate the population parameter $\theta$ using the available observations and possibly  a priori information that is available.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Evaluate the precision of the proposed estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reconstruct missing data, here being the individual parameters $\bpsi=(\psi_i, 1\leq i \leq N)$. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the log-likelihood for a given model, i.e., for a given joint distribution $\qypsi$ and value of $\theta$.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Maximum likelihood estimation of the population parameters== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Maximum likelihood estimation''  consists of maximizing with respect to $\theta$ the ''observed likelihood''  defined by:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\like(\theta ; \by) &amp;amp;\eqdef&amp;amp; \py(\by ; \theta) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \int \pypsi(\by,\bpsi ;\theta) \, d \bpsi .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Maximum likelihood estimation of the population parameter $\theta$ requires:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
* A model, i.e., a joint distribution $\qypsi$.  Depending on the software used, the model can be implemented using a script or a graphical user interface. $\monolix$ is extremely flexible and allows us to combine both. It is possible for instance to code the structural model using $\mlxtran$ and use the GUI for implementing the statistical model. Whatever the options selected, the complete model can always be saved as a text file. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Inputs $\by$, $\bc$, $\bu$ and $\bt$.  All of these variables tend to be stored in a unique data file (see the [[Visualization#Data exploration | Data Exploration ]] Section). &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* An algorithm which allows us to maximize $\int \pypsi(\by,\bpsi ;\theta) \, d \bpsi$ with respect to $\theta$. Each software package has its own algorithms implemented. It is not our goal here to rate and compare the various algorithms and implementations. We will use exclusively the SAEM algorithm as described in [[The SAEM algorithm for estimating population parameters | The SAEM algorithm]] and implemented in $\monolix$ as we are entirely satisfied by both its theoretical and practical qualities: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
** The algorithms implemented in $\monolix$ including SAEM and its extensions (mixture models, hidden Markov models, SDE-based model, censored data, etc.) have been published in statistical journals. Furthermore, convergence of SAEM has been rigorously proved.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
** The SAEM implementation in $\monolix$ is extremely efficient for a wide variety of complex models.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
** The SAEM implementation in $\monolix$ was done by the same group that proposed the algorithm and studied in detail its theoretical and practical properties.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks&lt;br /&gt;
|title=Remark&lt;br /&gt;
|text= It is important to highlight the fact that for a parameter $\psi_i$ whose distribution is the tranformation of a normal one (log-normal, logit-normal, etc.) the MLE $\hat{\psi}_{\rm pop}$ of the reference parameter $\psi_{\rm pop}$ is neither the mean nor the mode of the distribution. It is in fact the median.&lt;br /&gt;
&lt;br /&gt;
To show why this is the case, let $h$ be a nonlinear, twice continuously derivable and strictly increasing function such that $h(\psi_i)$ is normally distributed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  First we show that it is not the mean. By definition, the MLE of $h(\psi_{\rm pop})$ is  $h(\hat{\psi}_{\rm pop})$. Thus, the estimated distribution of $h(\psi_i)$ is the normal distribution with mean $h(\hat{\psi}_{\rm pop})$, but $\esp{h(\psi_i)} = h(\hat{\psi}_{\rm pop})$ implies  that $\esp{\psi_i} \neq \hat{\psi}_{\rm pop}$ since $h$ is nonlinear. In other words, $\hat{\psi}_{\rm pop}$ is not the mean of the estimated distribution of $\psi_i$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Next we show that it is not the mode. Let $f$ be the pdf of $\psi_i$ and let $f_h$ be the pdf of $h(\psi_i)$. By definition, for any $h(t)\in \mathbb{R}$,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
f(t) = h^\prime(t)f_h(h(t)) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: Thus,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; &lt;br /&gt;
f^\prime(t) = h^{\prime \prime}(t)f_h(h(t)) + h^{\prime 2}(t)f_h^\prime(h(t)) .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
: By definition of the mode, $f_h^\prime(h(\hat{\psi}_{\rm pop}))=0$. Since $h$ is nonlinear, $h^{\prime \prime}(\hat{\psi}_{\rm pop})\neq 0$ a.s. and  $f^\prime(\hat{\psi}_{\rm pop})\neq 0$ a.s.. In other words, $\hat{\psi}_{\rm pop}$ is not the mode of the estimated distribution of $\psi_i$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Now we show that it is the median. Since $h$ is a strictly increasing function,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\probs{\hat{\psi}_{\rm pop} }{\psi_i \leq \hat{\psi}_{\rm pop} } &amp;amp;=&amp;amp; \probs{\hat{\psi}_{\rm pop} }{h(\psi_i) \leq h(\hat{\psi}_{\rm pop})} \\&lt;br /&gt;
&amp;amp;=&amp;amp; 0.5 .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }} &lt;br /&gt;
&lt;br /&gt;
: In other words, $\hat{\psi}_{\rm pop}$ is the median of the estimated distribution of $\psi_i$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Let us again look at the model used in the [[Visualization#Model exploration | Model Visualization]] Section. For the case of a unique dose $D$ given at time $t=0$, the structural model is written:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
ke&amp;amp;=&amp;amp;Cl/V \\&lt;br /&gt;
Cc(t) &amp;amp;=&amp;amp; \displaystyle{\frac{D \, ka}{V(ka-ke)} }\left(e^{-ke\,t} - e^{-ka\,t} \right) \\&lt;br /&gt;
h(t) &amp;amp;=&amp;amp; h_0 \, \exp(\gamma\, Cc(t)) ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where $Cc$ is the concentration in the central compartment and $h$ the hazard function for the event of interest (hemorrhaging). Supposing a constant error model for the concentration, the model for the observations can be easily implemented using $\mlxtran$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{MLXTran&lt;br /&gt;
|name=joint1est_model.txt&lt;br /&gt;
|text=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt; &lt;br /&gt;
INPUT:&lt;br /&gt;
parameter =  {ka, V, Cl, h0, gamma}&lt;br /&gt;
&lt;br /&gt;
EQUATION:&lt;br /&gt;
ke=Cl/V&lt;br /&gt;
Cc  = amtDose*ka/(V*(ka-ke))*(exp(-ke*t) - exp(-ka*t))&lt;br /&gt;
h = h0*exp(gamma*Cc)&lt;br /&gt;
&lt;br /&gt;
OBSERVATION:&lt;br /&gt;
Concentration = {type=continuous, prediction=Cc, errorModel=constant}&lt;br /&gt;
Hemorrhaging  = {type=event, hazard=h}&lt;br /&gt;
&lt;br /&gt;
OUTPUT:&lt;br /&gt;
output = {Concentration, Hemorrhaging}&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, {{Verbatim|amtDose}} is a reserved keyword for the last  administered dose.&lt;br /&gt;
&lt;br /&gt;
The model's parameters are the absorption rate constant $ka$, the volume of distribution $V$, the clearance $Cl$, the baseline hazard $h_0$ and the coefficient $\gamma$. The statistical model for the individual parameters can be defined in the $\monolix$ project file (left) and/or the $\monolix$ GUI (right):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleWithCode&amp;amp;Image&lt;br /&gt;
|title=&lt;br /&gt;
|text=&lt;br /&gt;
|code={{MLXTranForTable&lt;br /&gt;
|name=&lt;br /&gt;
|text=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt; &lt;br /&gt;
INDIVIDUAL:&lt;br /&gt;
     ka    = {distribution=logNormal, iiv=yes}&lt;br /&gt;
     V     = {distribution=logNormal, iiv=yes},&lt;br /&gt;
     Cl    = {distribution=normal, iiv=yes},&lt;br /&gt;
     h0    = {distribution=probitNormal, iiv=yes},&lt;br /&gt;
     gamma = {distribution=logitNormal, iiv=yes},&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
|image=&lt;br /&gt;
[[File:Vsaem1.png]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the model is implemented, tasks such as maximum likelihood estimation can be performed using the SAEM algorithm. Certain settings in SAEM must be provided by the user. Even though SAEM is quite insensitive to the initial parameter values,&lt;br /&gt;
it is possible to perform a preliminary sensitivity analysis in order to select &amp;quot;good&amp;quot; initial values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=Vsaem2.png|caption=Looking for good initial values for SAEM}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, when we run SAEM, it converges easily and quickly to the MLE:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{JustCode&lt;br /&gt;
|code=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt;Estimation of the population parameters&lt;br /&gt;
&lt;br /&gt;
              parameter&lt;br /&gt;
ka          :    0.974&lt;br /&gt;
V           :     7.07&lt;br /&gt;
Cl          :     2.00&lt;br /&gt;
h0          :   0.0102&lt;br /&gt;
gamma       :    0.485&lt;br /&gt;
&lt;br /&gt;
omega_ka    :    0.668&lt;br /&gt;
omega_V     :    0.365&lt;br /&gt;
omega_Cl    :    0.588&lt;br /&gt;
omega_h0    :    0.105&lt;br /&gt;
omega_gamma :   0.0901&lt;br /&gt;
&lt;br /&gt;
a_1         :    0.345&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parameter estimation can therefore be seen as estimating the reference values and variance of the random effects.&lt;br /&gt;
&lt;br /&gt;
In addition to these numbers, it is important to be able to graphically represent these distributions in order to see them and therefore understand them better. In effect, the interpretation of certain parameters is not always simple. Of course, we know what a normal distribution represents and in particular its mean, median and mode, which are equal (see the distribution of $Cl$ below for instance). These measures of central tendency can be different among themselves for other asymmetric distributions such as the log-normal (see the distribution of $ka$).&lt;br /&gt;
&lt;br /&gt;
Interpreting dispersion terms like  $\omega_{ka}$  and $\omega_{V}$ is not obvious either when the parameter distributions are not normal. In such cases, quartiles or quantiles of order 5% and 95% (for example) may be useful for quantitively describing the variability of these parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Remarks &lt;br /&gt;
|title=Remarks&lt;br /&gt;
|text=&lt;br /&gt;
For a parameter $\psi$ whose distribution is log-normal, we can approximate the coefficient of variation for $\psi$ by the standard deviation $\omega_{\psi}$ of the random effect $\eta$ if this is fairly small. In effect, when $\omega_{\psi}$ is small,&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\psi &amp;amp;=&amp;amp; \psi_{\rm pop} e^{\eta} \\&lt;br /&gt;
&amp;amp;\approx &amp;amp; \psi_{\rm pop}(1+ \eta) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Thus&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\esp{\psi} &amp;amp;\approx&amp;amp; \psi_{\rm pop} \\&lt;br /&gt;
\std{\psi} &amp;amp;\approx &amp;amp; \psi_{\rm pop}\omega_{\psi},&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
{\rm cv}(\psi) &amp;amp;=&amp;amp; \frac{\std{\psi} }{\esp{\psi} } \\&lt;br /&gt;
 &amp;amp;\approx &amp;amp; \omega_{\psi} .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
Do not forget that this approximation is only valid when $\omega$ is small and in the case of log-normal distributions. It does not carry over to any other distribution. Thus, when $\omega_{h0}=0.1$ for a probit-normal distribution or $\omega_{\gamma}=0.09$ for a logit-normal one, there is no immediate interpretation available. Only by looking at the graphical display of the pdf or by calculating some quantiles of interest can we begin to get an idea of dispersion in the parameters $h0$ and $\gamma$.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=saem3b.png|caption=Estimation of the population distributions of the individual parameters of the model }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bayesian estimation of the population parameters==&lt;br /&gt;
&lt;br /&gt;
The ''Bayesian approach'' considers $\theta$ as a random vector with a ''prior distribution'' $\qth$. We can then define the posterior  distribution of $\theta$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\pcthy(\theta {{!}} \by ) &amp;amp;=&amp;amp; \displaystyle{ \frac{\pth( \theta )\pcyth(\by {{!}} \theta )}{\py(\by)} }\\&lt;br /&gt;
&amp;amp;=&amp;amp; \displaystyle{ \frac{\pth( \theta ) \int \pypsith(\by,\bpsi {{!}}\theta) \, d \bpsi}{\py(\by)} }.&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
We can estimate this conditional distribution and derive any statistics (posterior mean, standard deviation, percentiles, etc.) or derive the so-called ''Maximum a Posteriori'' (MAP) estimate of $\theta$:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\hat{\theta}^{\rm MAP} &amp;amp;=&amp;amp; \argmax{\theta}  \pcthy(\theta {{!}} \by ) \\&lt;br /&gt;
&amp;amp;=&amp;amp; \argmax{\theta} \left\{  {\llike}(\theta ; \by) + \log( \pth( \theta ) ) \right\} .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The MAP estimate  therefore maximizes a penalized version of the observed likelihood.   In other words, maximum a posteriori estimation reduces to penalized maximum likelihood estimation. Suppose for instance that $\theta$ is a scalar parameter and the prior is a normal distribution with mean $\theta_0$ and variance $\gamma^2$. Then, the MAP estimate minimizes&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;&lt;br /&gt;
\hat{\theta}^{\rm MAP}  =\argmax{\theta} \left\{  {\llike} (\theta ; \by) - \displaystyle{ \frac{1}{2\gamma^2} }(\theta - \theta_0)^2 \right\} .&lt;br /&gt;
&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The MAP estimate is a trade-off between the MLE which maximizes ${\llike}(\theta ; \by)$ and $\theta_0$ which minimizes $(\theta - \theta_0)^2$. The weight given to the prior directly depends on the variance of the prior distribution: the smaller $\gamma^2$ is, the closer to $\theta_0$ the MAP is. The limiting distribution considers that $\gamma^2=0$: this prior means here that $\theta$ is fixed as $\theta_0$ and no longer needs to be estimated.&lt;br /&gt;
&lt;br /&gt;
Both the Bayesian and frequentist approaches have their supporters and detractors. But rather than being dogmatic and blindly following the same rule-book every time, we need to be pragmatic and ask the right methodological questions when confronted with a new problem.&lt;br /&gt;
&lt;br /&gt;
We have to remember that Bayesian methods have been extremely successful, in particular for numerical calculations. For instance, (Bayesian) MCMC methods allow us to estimate more or less any conditional distribution coming from any hierarchical model, whereas frequentist approaches such as maximum likelihood estimation can be much more difficult to implement.&lt;br /&gt;
&lt;br /&gt;
All things said, the problem comes down to knowing whether the data contains sufficient information to answer a given question, and whether some other information may be available to help answer it. This is the essence of the art of modeling: finding the right compromise between the confidence we have in the data and prior knowledge of the problem. Each problem is different and requires a specific approach. For instance, if all the patients in a pharmacokinetic trial have essentially the same weight, it is pointless to estimate a relationship between weight and the model's PK parameters using the trial data. In this case, the modeler would be better served trying to use prior information based on physiological criteria rather than just a statistical model.&lt;br /&gt;
&lt;br /&gt;
Therefore, we can use information available to us, of course! Why not? But this information needs to be pertinent. Systematically using a prior for the parameters is not always meaningful. Can we reasonable suppose that we have access to such information? For continuous data for example, what does putting a prior on the residual error model's parameters mean in reality? A reasoned statistical approach consists of only including prior information for certain parameters (those for which we have real prior information) and having confidence in the data for the others.&lt;br /&gt;
&lt;br /&gt;
$\monolix$ allows this hybrid approach which  reconciles the Bayesian and frequentist approaches. A given parameter can be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* a fixed constant if we have absolute confidence in its value or the data does not allow it to be estimated, essentially due to identifiability constraints.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* estimated by maximum likelihood, either because we have great confidence in the data or have no information on the parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* estimated by introducing a prior and calculating the MAP estimate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* estimated by introducing a prior and then estimating the posterior distribution.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We put aside dealing with the fixed components of $\theta$ in the following. Here are some possible situations:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; ''Combined maximum likelihood and maximum a posteriori estimation'':  decompose $\theta$ into $(\theta_E,\theta_{M})$ where $\theta_E$ are the components of $\theta$ to be estimated with MLE and $\theta_{M}$ those with a prior distribution whose posterior distribution is to be maximized. Then,  $(\hat{\theta}_E , \hat{\theta}_{M} )$ below  maximizes the penalized  likelihood of $(\theta_E,\theta_{M})$: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
(\hat{\theta}_E , \hat{\theta}_{M} )  &amp;amp;=&amp;amp; \argmax{\theta_E , \theta_{M} } \log(\py(\by , \theta_{M}; \theta_E)) \\&lt;br /&gt;
&amp;amp;=&amp;amp;  \argmax{\theta_E , \theta_{M} }  \left\{  {\llike}(\theta_E , \theta_{M}; \by) + \log( \pth( \theta_M ) ) \right\} ,&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
where ${\llike} (\theta_E , \theta_{M}; \by) \ \  \eqdef \ \ \log\left(\py(\by | \theta_{M}; \theta_E)\right).$&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; ''Combined maximum likelihood and posterior distribution estimation'': here, decompose  $\theta$ into $(\theta_E,\theta_{R})$ where $\theta_E$ are the components of $\theta$ to be estimated with MLE and $\theta_{R}$ those with a prior distribution whose posterior distribution is to be estimated. We  propose the following strategy for estimating $\theta_E$ and $\theta_{R}$: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:lower-roman&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Compute the maximum likelihood of $\theta_E$: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt;\begin{eqnarray}&lt;br /&gt;
\hat{\theta}_E  &amp;amp;=&amp;amp; \argmax{\theta_E}  \log(\py(\by ; \theta_E)) \\&lt;br /&gt;
&amp;amp;=&amp;amp;  \argmax{\theta_E}  \int \pmacro(\by , \theta_R ; \theta_E ) d \theta_R .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Estimate the conditional distribution $\pmacro(\theta_{R} | \by ;\hat{\theta}_E)$. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is then straightforward to extend this approach to more complex situations where  some components of $\theta$ are estimated with MLE, others using MAP estimation and others still by estimating their conditional distributions.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Example1&lt;br /&gt;
|title1=Example&lt;br /&gt;
|title2=A PK example&lt;br /&gt;
|text=&lt;br /&gt;
In this example we use only the pharmacokinetic data and aim to estimate the population parameter distributions of the PK parameters $ka$, $V$ and $Cl$. We assume log-normal distributions for these three parameters. All of the model's population parameters are estimated by maximum likelihood estimation except $ka_{\rm pop}$ for which a log-normal distribution is used as a prior:&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \log(ka_{\rm pop}) \sim {\cal N}(\log(1.5), \gamma^2) . &amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
$\monolix$ allows us to compute the MAP estimate and to estimate the posterior distribution of $ka_{\rm pop}$ for various values of $\gamma$.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:17%; margin-right:17%; align:center&amp;quot;&amp;gt;&lt;br /&gt;
{{{!}} class=&amp;quot;wikitable&amp;quot;  align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
{{!}} $\gamma$ {{!}}{{!}} 0 {{!}}{{!}} 0.01 {{!}}{{!}} 0.025 {{!}}{{!}} 0.05 {{!}}{{!}} 0.1 {{!}}{{!}} 0.2 {{!}}{{!}} $+ \infty$ &lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}$\hat{ka}_{\rm pop}^{\rm MAP}$ {{!}}{{!}} 1.5 {{!}}{{!}} 1.49 {{!}}{{!}} 1.47 {{!}}{{!}} 1.39 {{!}}{{!}} 1.22 {{!}}{{!}} 1.11 {{!}}{{!}} 1.05 &lt;br /&gt;
{{!}}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=bayes1.png|caption=Prior and posterior distributions of $ka_{\rm pop}$ for different values of $\gamma$}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As expected, the posterior distribution converges to the prior distribution when the  standard deviation $\gamma$ of the prior distribution decreases. Also, the mode of the posterior distribution converges to the maximum likelihood estimate of $ka_{\rm pop}$ when $\gamma$ increases.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Estimation of the Fisher information matrix ==&lt;br /&gt;
&lt;br /&gt;
The variance of the estimator $\thmle$ and thus confidence intervals can be derived  from the [[Estimation of the observed Fisher information matrix|observed Fisher information matrix (F.I.M.)]], which itself is calculated using the observed likelihood (i.e., the pdf of the observations $\by$):&lt;br /&gt;
&lt;br /&gt;
{{EquationWithRef&lt;br /&gt;
|equation=&amp;lt;div id=&amp;quot;ofim_intro3&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\ofim(\thmle ; \by) \ \ \eqdef \ \ - \displaystyle{ \frac{\partial^2}{\partial \theta^2} }\log({\like}(\thmle ; \by)) .&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|reference=(1)  }}&lt;br /&gt;
&lt;br /&gt;
Then, the variance-covariance matrix of the maximum likelihood estimator $\thmle$ can be estimated by the inverse of the observed F.I.M. Standard errors (s.e.) for each component of $\thmle$ are their standard deviations, i.e., the square-root of the diagonal elements of this covariance matrix. $\monolix$ also displays the (estimated) relative standard errors (r.s.e.), i.e., the (estimated) standard error divided by the value of the estimated parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{JustCode&lt;br /&gt;
|code=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt;Estimation of the population parameters&lt;br /&gt;
&lt;br /&gt;
              parameter     s.e. (s.a.)   r.s.e.(%)&lt;br /&gt;
ka          :    0.974         0.082           8&lt;br /&gt;
V           :     7.07          0.35           5&lt;br /&gt;
Cl          :        2          0.07           4&lt;br /&gt;
h0          :   0.0102        0.0014          14&lt;br /&gt;
gamma       :    0.485         0.015           3&lt;br /&gt;
&lt;br /&gt;
omega_ka    :    0.668         0.064          10&lt;br /&gt;
omega_V     :    0.365         0.037          10&lt;br /&gt;
omega_Cl    :    0.588         0.055           9&lt;br /&gt;
omega_h0    :    0.105         0.032          30&lt;br /&gt;
omega_gamma :   0.0901         0.044          49&lt;br /&gt;
&lt;br /&gt;
a_1         :    0.345         0.012           3&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The F.I.M. can be used for detecting overparametrization of the structural model. In effect, if the model is poorly identifiable,  certain estimators will be quite correlated and the F.I.M. will therefore be poorly conditioned and difficult to inverse. Suppose for example that we want to fit a two compartment PK model to the same data as before. The output is shown below. The large values for the relative standard errors for the inter-compartmental clearance $Q$ and the volume of the peripheral compartment $V_2$ mean that the data does not allow us to  estimate well these two parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{JustCode&lt;br /&gt;
|code=&amp;lt;pre style=&amp;quot;background-color:#EFEFEF; border:none;&amp;quot;&amp;gt;Estimation of the population parameters&lt;br /&gt;
&lt;br /&gt;
           parameter     s.e. (lin)   r.s.e.(%)&lt;br /&gt;
ka       :     0.246       0.0081             3&lt;br /&gt;
Cl       :       1.9        0.075             4&lt;br /&gt;
V1       :      1.71         0.14             8&lt;br /&gt;
Q        :  0.000171        0.024      1.43e+04&lt;br /&gt;
V2       :   0.00673          3.1      4.62e+04&lt;br /&gt;
&lt;br /&gt;
omega_ka :     0.171        0.026            15&lt;br /&gt;
omega_Cl :     0.293        0.026             9&lt;br /&gt;
omega_V1 :     0.621        0.062            10&lt;br /&gt;
omega_Q  :      5.72      1.4e+03      2.41e+04&lt;br /&gt;
omega_V2 :      4.61      1.8e+04      3.94e+05&lt;br /&gt;
&lt;br /&gt;
a        :     0.136       0.0073             5&lt;br /&gt;
&amp;lt;/pre&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Fisher information criteria is also widely used in optimal experimental design. Indeed, minimizing the variance of the estimator corresponds to maximizing the information.  Then, estimators and designs can be evaluated by looking at certain summary statistics of the covariance matrix (like the determinant or trace for instance).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Estimation of the individual parameters ==&lt;br /&gt;
&lt;br /&gt;
Once $\theta$ has been estimated, the conditional distribution $\pmacro(\psi_i | y_i ; \hat{\theta})$ of the individual parameters $\psi_i$ can be estimated for each individual $i$ using the [[The Metropolis-Hastings algorithm for simulating the individual parameters| Metropolis-Hastings algorithm]]. For each $i$, this algorithm generates a sequence $(\psi_i^{k}, k \geq 1)$ which converges in distribution to the conditional distribution $\pmacro(\psi_i | y_i ; \hat{\theta})$  and that can be used for estimating any summary statistic of this distribution (mean, standard deviation, quantiles, etc.).&lt;br /&gt;
&lt;br /&gt;
The mode of this conditional distribution can be estimated using this sequence or by maximizing $\pmacro(\psi_i | y_i ; \hat{\theta})$ using numerical methods.&lt;br /&gt;
&lt;br /&gt;
The choice of using the conditional mean or the conditional mode is arbitrary. By default, $\monolix$ uses the conditional mode, taking the philosophy that the &amp;quot;most likely&amp;quot;  values of the individual parameters are the most suited for computing the &amp;quot;most likely&amp;quot; predictions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ImageWithCaption|image=mode1.png|caption=Predicted concentrations for 6 individuals using the estimated  conditional modes of the individual PK parameters}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Estimation of the observed log-likelihood ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once $\theta$ has been estimated, the observed log-likelihood of $\hat{\theta}$ is defined as&lt;br /&gt;
&lt;br /&gt;
{{Equation1&lt;br /&gt;
|equation=&amp;lt;math&amp;gt; \begin{eqnarray}&lt;br /&gt;
{\llike} (\hat{\theta};\by) &amp;amp;=&amp;amp; \log({\like}(\hat{\theta};\by)) \\&lt;br /&gt;
&amp;amp;\eqdef&amp;amp; \log(\py(\by;\hat{\theta})) .&lt;br /&gt;
\end{eqnarray}&amp;lt;/math&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
The observed log-likelihood cannot be computed in closed form for nonlinear mixed effects models, but can be estimated using the methods described in the [[Estimation of the log-likelihood]] Section. The estimated  log-likelihood can then be used for performing likelihood ratio tests and for computing information criteria such as AIC and BIC (see the [[Evaluation]] Section).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Bibliography ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{beal1992nonmem,&lt;br /&gt;
  title={NONMEM users guides},&lt;br /&gt;
  author={Beal, S.L. and Sheiner, L.B. and Boeckmann, A. and Bauer, R.J.},&lt;br /&gt;
  journal={San Francisco, NONMEM Project Group, University of California},&lt;br /&gt;
  year={1992}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{comets2011package,&lt;br /&gt;
  title={saemix: Stochastic Approximation Expectation Maximization (SAEM) algorithm. R package version 0.96.1},&lt;br /&gt;
  author={Comets, E. and Lavenu, A. and Lavielle, M.},&lt;br /&gt;
  url = {http://cran.r-project.org/web/packages/saemix/index.html},&lt;br /&gt;
  year={2013}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@ARTICLE{Monolix,&lt;br /&gt;
author = {Lixoft},&lt;br /&gt;
title = {Monolix 4.2},&lt;br /&gt;
year={2012}&lt;br /&gt;
url = {http://www.lixoft.eu/products/monolix/product-monolix-overview},&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@misc{pinheiro1995lme,&lt;br /&gt;
  title={lme and nlme: Mixed-effects Methods and Classes for S and S-plus},&lt;br /&gt;
  author={Pinheiro, J. C. and Bates, D. M.},&lt;br /&gt;
  year={1995},&lt;br /&gt;
  publisher={Version}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{pinheiro2010r,&lt;br /&gt;
  title={the R Core team (2009) nlme: Linear and Nonlinear Mixed Effects Models. R package version 3.1-96},&lt;br /&gt;
  author={Pinheiro, J. and Bates, D. and DebRoy, S. and Sarkar, D.},&lt;br /&gt;
  journal={R Foundation for Statistical Computing, Vienna},&lt;br /&gt;
  year={2010}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@inbook{docSAS,&lt;br /&gt;
		title = {The NLMMIXED procedure, SAS/STAT 9.2 User's Guide},&lt;br /&gt;
		chapter = {61},&lt;br /&gt;
		pages = {4337--4435},&lt;br /&gt;
		author = {SAS},&lt;br /&gt;
		year = {2008}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{spiegelhalter2003winbugs,&lt;br /&gt;
  title={WinBUGS user manual},&lt;br /&gt;
  author={Spiegelhalter, D. and Thomas, A. and Best, N. and Lunn, D.},&lt;br /&gt;
  journal={Cambridge: MRC Biostatistics Unit},&lt;br /&gt;
  year={2003}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@Manual{docSPSS,&lt;br /&gt;
    title = {Linear mixed-effects modeling in SPSS. An introduction to the MIXED procedure},&lt;br /&gt;
    author = {SPSS},&lt;br /&gt;
    year = {2002},&lt;br /&gt;
    note={Technical Report}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&amp;lt;bibtex&amp;gt;&lt;br /&gt;
@article{nlmefitsa,&lt;br /&gt;
  title={nlmefitsa: fit nonlinear mixed-effects model with stochastic EM algorithm. Matlab R2013a function},&lt;br /&gt;
  author={The MathWorks},&lt;br /&gt;
  url = {http://www.mathworks.fr/fr/help/stats/nlmefitsa.html},&lt;br /&gt;
  year={2013}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/bibtex&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Back&amp;amp;Next&lt;br /&gt;
|linkBack=Visualization&lt;br /&gt;
|linkNext=Evaluation }}&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
		
	</entry>
</feed>