MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Test",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "412": {
                "pageid": 412,
                "ns": 0,
                "title": "Simulation",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "== Simulation of a hierarchical model ==\n\nIn the [[What is a model? A joint probability distribution!]] section  we proposed to consider a model as a joint probability distribution of random variables. Furthermore, the hierarchical structure of a model allows us to decompose this joint distribution into a product\nof conditional and marginal distributions. \n\nThus, if a model includes observations $\\by$, individual parameters $\\bpsi$, a design made up of observation times $\\bt$ and source terms (e.g., doses) $\\bu$, individual covariates $\\bc$ and population parameters $\\theta$, the joint distribution of these random variables can be written:\n\n{{Equation1\n|equation=<math>\n\\pypsithcut(\\by , \\bpsi, \\theta, \\bu, \\bc,\\bt)=\\pcypsiut(\\by {{!}} \\bpsi,\\bu,\\bt) \\, \\pcpsithc(\\bpsi {{!}} \\theta,\\bc) \\, \\pth(\\theta) \\, \\pc(\\bc) \\, \\pu(\\bu) \\, \\pt(\\bt) .\n</math> }}\n\nSimulating this model means successively drawing the variables of the model using their associated submodels:\n\n\n<ol>\n<li> The population parameters $\\theta$  from the distribution $\\qth$. </li>\n\n\n<li> The individual covariates $\\bc$   from the distribution $\\qc$. </li>\n\n\n<li> The individual parameters $\\bpsi$   from the distribution $\\qcpsithc$ using the values of $\\theta$ and $\\bc$ obtained in steps 1 and 2. </li>\n\n\n<li> The dose regimen $\\bu$  from the distribution $\\qu$. </li>\n\n\n<li> The measurement times $\\bt$  from the distribution $\\qt$.</li>\n\n\n<li> Lastly, observations $\\by$   from the distribution $\\qcypsiut$ using the values of $\\bpsi$, $\\bu$ and $\\bt$ obtained at steps 3, 4 and 5. </li>\n</ol>\n\n\nEvidently, if certain variables are not considered random and are given, the associated simulation step is not performed.\n\nWe have already seen that for other tasks (model exploration, estimation) $\\mlxtran$ is well-adapted to implementing this type of hierarchical model because it can deal with this structure by defining the various submodels in easy-to-read blocks.\nIt is also possible to use $\\mlxtran$ like a function from within R and Matlab. This capability means that we can write our own R or Matlab script in which the design is defined, the simulation function is called and the results are used for plotting figures, performing tests, etc. This solution combines the flexibility of the R and Matlab environments with the ability of $\\mlxtran$ to easily encode complex models.\n\n\n<br>\n== Examples ==\n\nThe joint model ${\\cal M}_2$ detailed in the [[Model evaluation#Model selection| Model selection]] section can be implemented with $\\mlxtran$. We suppose that there can be either simple or multiple drug administrations either orally  ({{Verbatim|adm{{-}}1}}) or by\niv ({{Verbatim|adm{{-}}2}}). The model is \"ready\" to accept these different dose regimens, which are defined either within the data (for estimation) or the simulation script.\n\n\n{{MLXTran\n|name=joint1_model.txt\n|text=<pre style=\"background-color: #EFEFEF; border:none\">\n[INDIVIDUAL]\ninput = {ka_pop,V_pop, Cl_pop,h0_pop,omega_ka, omega_V, omega_Cl, \n         omega_h0,beta_V,beta_Cl, weight}\n\nEQUATION:\nlw70=log(weight/70)\n\nDEFINITION:\nka = {distribution=lognormal, reference=ka_pop, sd=omega_ka}\nV  = {distribution=lognormal, reference=V_pop, sd=omega_V, \n      covariate=lw70, coefficient=beta_V}\nCl = {distribution=lognormal, reference=Cl_pop, sd=omega_Cl, \n      covariate=lw70, coefficient=beta_Cl}\nh0 = {distribution=lognormal, reference=h0_pop, sd=omega_h0}\n\n\n[OBSERVATION]\ninput = {ka, V, Cl, h0, gamma, a, b}\n\nPK:\ndepot(adm=1, target=Ad)\ndepot(adm=2, target=Ac)\n\nEQUATION:\nke=Cl/V\nddt_Ad = -ka*Ad\nddt_Ac = ka*Ad - ke*Ac\nCc  = Ac/V\nh = h0*exp(gamma*Cc)\n\nDEFINITION:\nConcentration = {type=continuous, prediction=Cc, errorModel=combined1(a,b)}\nHemorrhaging  = {type=event, hazard=h}\n</pre>}}\n\n\nHere is an example of a Matlab script that uses the {{Verbatim|joint1_model.txt}} model to simulate data for 10 patients.\nIn this example, a dose of 50mg is administered every 24 hours over a 7 day period. The simulated data is stored in a cell array. We can then use {{Verbatim|exploredatapx}} for visualizing it.\n\n\n{{MATLABcode\n|name=\n|code=<pre style=\"background-color: #EFEFEF; border:none\">\n%% dose regimen \nadmin1 = struct('adm',1,'amount',50,'time',0:24:144); \n\n%% group\ngroup1 = struct('size',10);\n\n%% parameter\nparameterName =  {'ka_pop','V_pop','Cl_pop','h0_pop','omega_ka','omega_V',...\n                   'omega_Cl','omega_h0','beta_V','beta_Cl','gamma','a','b'};\nparameterValue = [1, 8, 2, 0.01, 0.4, 0.2, 0.2, 0.1, 1, 0.75, 0.5, 0.1, 0.15];\nparam1 = struct('name',parameterName,'value',parameterValue);\n\n%% output\noutputName = {'Cc','h','Concentration','Hemorrhaging'};\noutputTime = {0:1:200 , 0:1:200 , [1 2 4 6 12 18 28 52 76 100 124 148 172]};\noutput1 = struct('name',outputName,'time',outputTime);\n\n%% tasks\ndata=simulix('model','joint1_model.txt','administration',admin1,'group',group1,...\n             'parameter',param1,'output',output1);\n\nexploredatapx(data)\n</pre>}}\n\n\nIf we preferred, we could instead use R to run exactly the same simulations using exactly the same $\\mlxtran$ model:\n\n\n{{Rcode\n|name=\n|code=<pre style=\"background-color: #EFEFEF; border:none\">\n## dose regimen\nadmin1 <-list(adm = 1, amount = 50, time = seq(0, 144, by=24))\n\n##group\ngroup1 <- list(size=10)\n\n## parameter\nparameterName <-  c(\"ka_pop\",\"V_pop\",\"Cl_pop\",\"h0_pop\",\"omega_ka\",\"omega_V\",\n                   \"omega_Cl\",\"omega_h0\",\"beta_V\",\"beta_Cl\",\"gamma\",\"a\",\"b\")\nparameterValue <- c(1, 8, 2, 0.01, 0.4, 0.2, 0.2, 0.1, 1, 0.75, 0.5, 0.1, 0.15)\nparam1 <- list(name=parameterName, value=parameterValue)\n\n## output\noutputName <- c(\"Cc\",\"h\",\"Concentration\",\"Hemorrhaging\");\noutputTime <- c(seq(0,200), seq(0,200), c(1 2 4 6 12 18 28 52 76 100 124 148 172))\noutput1 <- list(name=outputName, time=outputTime)\n\n## tasks\ndata <- simulix(model=\"joint1_model.txt\",administration=admin1, group=group1,\n                parameter=param1,output=output1);\n</pre> }}\n\n\nIt is also possible to include in the model a statistical model for the population parameters or the covariates (here, the weight) by adding  sections [POPULATION] and/or [COVARIATE] to the $\\mlxtran$ model. For example, we could add the following code to the previous $\\mlxtran$ code:\n\n\n{{MLXTran\n|name=joint2_model.txt\n|text=<pre style=\"background-color: #EFEFEF; border:none\">\n[POPULATION]\ninput = {V_0, Cl_0, gamma_V, gamma_Cl}\n\nDEFINITION:\nV_pop  = {distribution=lognormal,  reference=V_0, sd=gamma_V}\nCl_pop = {distribution=lognormal,  reference=Cl_0, sd=gamma_Cl}\n\n\n[COVARIATE]\ninput = {omega_w}\n\nDEFINITION:\nweight  = {distribution=normal,  mean=70, sd=omega_w}\n</pre>}}\n\n\n{{Remarks\n|title=Remark\n|text=The {{Verbatim|simulix}} function and necessary R and Matlab connectors are still under development and will be available soon.\n}}\n\n\n{{Back\n|link=Model evaluation }}"
                    }
                ]
            },
            "176": {
                "pageid": 176,
                "ns": 0,
                "title": "Stochastic differential equations based models",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "<!-- Menu for the Extensions chapter -->\n<sidebarmenu>\n+[[Extensions]]\n*[[Extensions| Introduction ]] | [[ Mixture models ]] | [[Hidden Markov models]]  | [[Stochastic differential equations based models]]  \n</sidebarmenu>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n==Introduction==\n\n\nDiffusion models are known to be a relevant tool for modeling [http://en.wikipedia.org/wiki/Stochastic stochastic] dynamic phenomena, and are widely used in various fields including finance, physics, biology, physiology and control. In a population approach, a mixed-effects diffusion model  describes each individual series of observations using a system of [http://en.wikipedia.org/wiki/Stochastic_differential_equations stochastic differential equations] (SDE) while also taking into account  variability between individuals.\n\nFor the sake of simplicity we will consider first a diffusion model for a single individual, and illustrate it with a very general [http://en.wikipedia.org/wiki/Dynamical_system dynamical system] with linear transfers and PK examples. We will then show that the extension to mixed diffusion models is fairly straightforward.\n\nNote that the conditional distribution $\\qcypsi$  of the observations usually does not have  a closed-form expression. When the underlying system is a Gaussian linear dynamical one, the conditional pdf of the observations, $\\pcypsi(y_i|\\psi_i)$ can be computed using the [http://en.wikipedia.org/wiki/Kalman_filter ''Kalman filter'' (KF)]. When the system is not linear, the [http://en.wikipedia.org/wiki/Extended_Kalman_Filter ''extended Kalman filter'' (EKF)] provides an approximation of the conditional pdf.\n\n\n<br>\n\n==Diffusion model==\n\n\nWe assume that one diffusion trajectory is  observed  with noise at discrete time points  $t_1<\\ldots<t_j<\\ldots<t_n$. Let us note $(X(t),t>0) \\in \\Rset^d$  the underlying dynamical process and $y_j \\in \\Rset$ a noisy function of $X(t_j)$, $j=1,\\ldots,n$.  The general form of the diffusion model is given by:\n\n{{EquationWithRef\n|equation=<div id=\"eq:SDEmodel\"><math>\n\\left\\{\n\\begin{array}{lll}\ndX(t) &=& b(X(t),\\psi)dt + \\gamma(X(t),\\psi)dW(t)\\\\[0.2cm]\ny_{j} &=& c(X(t_{j}),\\psi) + \\varepsilon_{j} \\\\[0.2cm]\n\\varepsilon_{j} &\\underset{i.i.d.}{\\sim}& \\mathcal{N}(0,a^2(\\psi)), \\quad  j=1,\\ldots,n ,\n\\end{array}\n\\right. </math></div>\n|reference=(1) }}\n\nwith the initial condition $X(t_1) = x \\in \\Rset^d$. Here, $(W(t),t>0)$ is a standard [http://en.wikipedia.org/wiki/Wiener_process Wiener process] in $\\Rset^d$ and $\\varepsilon_j \\in \\Rset$ represents the measurement error occurring at the $j^{\\mathrm{th}}$ observation, independent of $W(t)$. The measurement function $c: \\ \\Rset^d \\times \\Rset^p \\rightarrow \\Rset$, the drift function $b: \\ \\Rset^d \\times \\Rset^p \\rightarrow \\Rset^d$ and the diffusion function $\\gamma: \\ \\Rset^d \\times \\Rset^p \\rightarrow \\mathcal{M}_d(\\Rset)$, where $\\mathcal{M}_d(\\Rset)$ is the set of $d \\times d$ matrices with real elements, are known functions that depend on an unknown parameter $\\psi \\in \\Rset^p$.\n\nWe can in fact consider an SDE-based model as a [http://en.wikipedia.org/wiki/Ordinary_differential_equation ODE]-based one with a stochastic component.\n\n\n{{Example1\n|title1=Example:  \n|title2= &#32; IV bolus with linear elimination\n\n|text= The ordinary differential equation \n\n{{EquationWithRef\n|equation=<div id=\"eq:ode1\"><math> \ndA_c(t) = -k A_c(t) dt\n</math></div>\n|reference=(2) }}\n\nis usually used to describe the kinetics of a drug administered by rapid injection (IV bolus) into plasma. In bolus-specific compartmental models, plasma is treated as the single compartment  of the human body. $A_c(t)$ represents the amount of a drug ingredient in plasma at time $t$ after injection, and $k$ is the elimination  rate constant. The figure below displays the typical evolution of the amount found in the central compartment when $k=4$.\n\n{{ImageWithCaption|image=sde0.png|caption=Drug concentration evolution for  ODE diffusion example }}\n\n\nImagine now that we aim to describe the evolution of the drug amount over time by means of stochastic differential equations rather than ordinary differential equations, in order to better describe the ''intra-individual variability'' of the observed process. We can assume for example  that the system [[#eq:ode1|(2)]] is randomly perturbed by an additive Wiener process:\n\n{{EquationWithRef\n|equation=<div id=\"eq:sde1\"><math>\ndA_c(t) = -k A_c(t) dt + \\gamma dW(t). \n</math></div>\n|reference=(3) }}\n\nThe figure below displays four  kinetics for the amount in the central compartment, simulated from this model with $k=4$ and $\\gamma=2$.\n\n\n{{ImageWithCaption|image=sde1.png|caption=Drug concentration evolution for SDE diffusion example }}\n\n}}\n\n\nThese kinetics are  clearly stochastic. Nevertheless, they  are not realistic because:\n\n\n* they give an overly erratic description of the evolution of the drug concentration within the compartments of the human body.\n\n* they do not comply with certain constraints on  biological dynamics (sign, monotony).\n\n\nA more relevant model might consider that some parameters of the model randomly fluctuate over time, rather than the observed variable itself, modeling for example the elimination rate \"constant\" $k$ as a stochastic process $k(t)$ that randomly varies around a typical value $k^\\star$.\n\nMore generally, we can describe the fluctuations within a linear dynamical systems by considering the transfer rates, described below, as diffusion processes rather than the observed processes themselves.\n\n\n\n<br>\n==Diffusion models for dynamical systems with linear transfers==\n\n\nDynamical systems have  applications in many fields. They can be used to model viral dynamics, population flows, interactions between cells, and drug pharmacokinetics. Dynamical systems involving linear transfers between different entities are usually modeled by means of a system of ODEs with the following general form:\n\n{{EquationWithRef\n|equation=<div id=\"eq:linearTransferODEModel\"><math>\ndA(t) = K\\, A(t)dt,\n</math></div>\n|reference=(4) }}\n\n\nwhere $A(t)$ is a vector whose $l^{\\textrm{th}}$  component represents the condition of the $l^{\\textrm{th}}$ entity at time $t$ and $K=(K_{l,l^\\prime} \\, 1\\leq l , l^\\prime \\leq d)$ a deterministic matrix defined as:\n\n{{EquationWithRef\n|equation=<div id=\"eq:K\"><math>\n\\left\\{\n\\begin{array}{ll}\nK_{l,l^\\prime} = k_{l,l^\\prime} & \\textrm{if} \\quad l \\neq l^\\prime\\\\\nK_{l,l} = - k_{l,0} - \\sum_{l^\\prime} k_{l,l^\\prime} ,\n\\end{array}\n\\right.\n</math></div>\n|reference=(5) }}\n\nwhere $k_{l,l^\\prime}$ represents the transfer rate from entity $l$ to entity $l^\\prime$, and $k_{l,0}$ the elimination rate from entity $l$. An example of such a dynamical system with $3$ components is schematized below.\n\n\n{{ImageWithCaption|image=linear.png|caption=A dynamical system with $3$ components (circles) and linear transfers between components (arrows) }}\n\n\nIn this particular example, matrix $K$ would be defined as\n\n{{Equation1\n|equation= <math>\nK = \\begin{pmatrix}\n-k_{10} -k_{12} -k_{13} & k_{21} & k_{31}\\\\\nk_{12} & -k_{20} -k_{21} -k_{23} & k_{32}\\\\\nk_{13} & k_{23} & -k_{30} -k_{31} -k_{32}\n\\end{pmatrix}.\n</math> }}\n\nThe model defined by equations [[#eq:linearTransferODEModel|(4)]] and [[#eq:K|(5)]] is a deterministic model which assumes that transfers take place at the same rate at all times. This is  often a restrictive assumption since in reality, dynamical systems usually exhibit some random behavior. It is therefore reasonable to consider that  transfers are not constant but randomly fluctuate over  time. This new assumption leads to the following dynamical system:\n\n{{EquationWithRef\n|equation=<div id=\"eq:linearTransferSDEModel\"><math>\ndA(t) = K(t)A(t)dt,\n</math></div>\n|reference=(6) }}\n\nwhere $K$ has the same structure as in [[#eq:K|(5)]] but now some components $k_{l,l^\\prime}$ are stochastic processes which take non-negative values and randomly fluctuate around a typical value $k_{l,l^\\prime}^\\star$.\n\nLet us now illustrate the construction of such diffusion models using some specific examples in pharmacokinetics.\n\n\n{{Example1\n|title1=Example 1: \n|title2=  &#32; IV bolus administration with stochastic linear elimination\n\n|text= We will first extend the ODE based model defined in [[#eq:ode1|(2)]]  by assuming that $k$ is a diffusion process which takes non-negative values and  fluctuates around a typical value $k^\\star$.\nIn this example, non-negativity of $k(t)$ is ensured by  defining the logarithm of the transfer rate as an [http://en.wikipedia.org/wiki/Ornstein%E2%80%93Uhlenbeck_process Ornstein-Uhlenbeck diffusion process]:\n\n{{Equation1\n|equation=<math> d\\log k(t)  = - \\alpha \\left( \\log k(t) - \\log k^\\star  \\right) dt + \\gamma d W(t), </math> }}\n\nwhere $W$ is a standard one-dimensional Wiener process. This results in the following diffusion system:\n\n{{Equation1\n|equation=<math> dX(t) = b(X(t))dt + \\gamma(X(t))dW(t), </math> }}\n\nwhere\n\n{{Equation1\n|equation=<math> \nX(t) = \\begin{pmatrix}  A_c(t) \\\\ \\log k(t)  \\end{pmatrix}, \\ \\ \\ \\\nb(x)  = \\begin{pmatrix}  -x_1 \\exp(x_2) \\\\ -\\alpha (x_2-\\log k^{\\star})  \\end{pmatrix}, \\ \\ \\ \\\n\\gamma(x)  = \\begin{pmatrix}  0 & 0 \\\\ 0 &  \\gamma  \\end{pmatrix}.\n</math> }}\n\nNote that in this specific example, the Jacobian matrix of the drift function $b$ has a simple form: \n\n{{Equation1\n|equation=<math>  B(x)=\\begin{pmatrix} - \\exp(x_2) & -x_1 \\exp(x_2)\\\\ 0 & -\\alpha \\end{pmatrix}. </math> }}\n\nThe two figures below display four simulated processes $k(t)$ and the associated amount processes $A_c(t)$.\n\n\n::[[File:sde2.png|link=]]\n\n:::[[File:sde3.png|link=]]\n\n\nWe measure the concentration at times $(t_{j}, 1\\leq j \\leq n)$:\n\n{{Equation1\n|equation= <math>y_j = \\displaystyle{\\frac{A_c(t_{j})}{V} } + a \\, \\teps_j . </math> }}\n\nThe parameter vector of the model is therefore $\\psi = (V, k^\\star, \\alpha, \\gamma, a)$. We see in this example that the simulated kinetics are much more realistic than those obtained with the previous model, because:\n\n\n* the elimination rate process $k(t)$ is a stochastic process that takes non-negative values,\n\n* even though the amount process is  stochastic, it is smooth and decreases monotonically with time.\n}}\n\n\n\n{{Example1\n|title1=Example 2: \n|title2= &#32; Oral administration with first-order absorption and stochastic linear elimination\n\n|text=Oral PK models with first-order absorption and linear elimination are widely used to describe the time-course of a drug orally administered to a unique compartment of the human body. The drug is administrated in a depot compartment, absorbed by the central compartment with absorption rate $k_a$ and eliminated with elimination rate $k_e$. Such a model is described by the following  system of ODEs:\n\n{{EquationWithRef\n|equation=<div id=\"eq:oral1\"><math>\n\\displaystyle{ \\frac{d}{dt} } \\begin{pmatrix} A_d(t) \\\\ A_c(t) \\end{pmatrix} \\ \\ = \\ \\ \\begin{pmatrix} -k_a & 0\\\\ k_a & -k_e\\end{pmatrix} \\begin{pmatrix} A_d(t) \\\\ A_c(t) \\end{pmatrix},\n</math></div>\n|reference=(7) }}\n\nwhere $A_d(t)$ and $A_c(t)$ respectively represent the amounts of drug at time $t$ in the depot  and  central compartments. Assume now that the elimination constant is driven by a stochastic process, solution to the stochastic differential equation\n\n{{Equation1\n|equation=<math> d k_e(t) = - \\alpha (k_e - k_e^\\star ) dt + \\gamma \\sqrt{k_e(t)} dW(t),\n</math> }}\n\nwhere $W$ is a standard one-dimensional Wiener process. Then [[#eq:oral1|(7)]] becomes:\n\n{{Equation1\n|equation=<math> dX(t) = b(X(t))dt + \\gamma(X(t))dW(t). </math> }}\n\nHere,\n\n{{Equation1\n|equation=<math>\nX(t)= \\begin{pmatrix} A_d(t) \\\\ A_c(t) \\\\ k_e(t) \\end{pmatrix}, \\ \\ \\ \\\nb(x) = \\begin{pmatrix} -k_a x_1 \\\\ k_a x_1 -x_3 x_2 \\\\ -\\alpha(x_3-k_e^\\star ) \\end{pmatrix}, \\ \\ \\ \\\n\\gamma(x) = \\begin{pmatrix}  0 & 0 & 0 \\\\ 0 & 0 & 0\\\\ 0 & 0 & \\gamma \\sqrt{x_3}\\end{pmatrix} ,\n</math> }}\n\nand the parameter  vector  of the model is $\\psi = (V, k_a, k^\\star, \\alpha, \\gamma, a) .$\n}}\n\nIn both examples, the diffusion model can be easily extended to a population approach by defining the system's parameters $\\psi$ as an individual random vector.\n\n\n\n<br>\n\n==Mixed-effects diffusion models==\n\nLet us now consider model [[#eq:SDEmodel|(1)]] with observations coming from several subjects. An adequate adaptation of model [[#eq:SDEmodel|(1)]] in such a context consists of considering as many dynamical systems as individuals, and defining the parameters of the individual dynamical systems as independent random variables, in such a way to correctly reflect  variability between the different trajectories. To standardize notation, we consider $N$ different subjects randomly chosen from a population and  note $n_i$  the number of observations for individual $i$, so that $t_{i1}<\\ldots<t_{i,n_i}$ are subject $i$'s observation time points. $(X_i(t),t>0) \\in \\Rset^d$ and $y_{ij} \\in \\Rset$ will respectively denote individual $i$'s diffusion  and the observation  $X_i(t_{ij})$. The $y_{ij}$, $i=1,\\ldots,N$, $j=1,\\ldots,n_i$ are governed by a mixed-effects model based on a $d$-dimensional real-valued system of stochastic differential equations with the general form:\n\n{{EquationWithRef\n|equation=<div id=\"eq:SDEmixedModel\"><math>\n\\left\\{\n\\begin{array}{l}\ndX_i(t) = b(X_i(t),\\psi_i)dt + \\gamma(X_i(t),\\psi_i)dW_i(t),\\\\[0.2cm]\ny_{ij} = c(X_i(t_{ij}),\\psi_i) + \\teps_{ij},\\\\[0.2cm]\n\\teps_{ij} \\underset{i.i.d.}{\\sim} \\mathcal{N}(0,a^2(\\psi_i)) \\; , \\; j=1,\\ldots, n_i \\; , \\; i=1,\\ldots,N,\\\\\n\\end{array}\n\\right.\n</math></div>\n|reference=(8) }}\n\nwith initial condition $X_i(t_1) = x_{i1} \\in \\Rset^d$ for $i=1,\\ldots,N$. The $\\psi_i$'s are unobserved independent $d$-dimensional random subject-specific parameters, drawn from a distribution $\\qpsi$ which depends on a set of population parameters $\\theta$, $(W_1(t),t>0), \\ldots, (W_N(t),t>0)$ are standard independent Wiener processes, and the $\\teps_{ij}$  are independent Gaussian random variables representing residual errors such that the $\\psi_i$,  $W_i$ and  $\\teps_{ij}$ are mutually independent.\nThe measurement function $c$, the drift function $b$ and the diffusion function $\\gamma$ are known functions that are common to the $N$ subjects and depend on the unknown parameters $\\psi_i$.\n\nAssuming that the $N$ individuals are independent, the joint  pdf  is given by:\n\n{{EquationWithRef\n|equation=<div id=\"eq:sdepdf\"><math>\n\\pcypsi(y_1,\\ldots,y_N {{!}} \\psi_1,\\ldots,\\psi_N) = \\prod_{i=1}^{N}\\pcyipsii(y_i {{!}} \\psi_i).\n</math></div>\n|reference=(9) }}\n\nComputing the conditional distribution $\\pcyipsii$ of the observations for any individual $i$ requires here to compute the conditional distribution of each observation given the past:\n\n{{Equation1\n|equation=<math>\\begin{eqnarray}\n\\pcyipsii(y_i {{!}} \\psi_i) &=& \\pyipsiONE(y_{i1} {{!}} \\psi_i)\\prod_{j=2}^{n_i} p(y_{i,j} {{!}} y_{i,1},\\ldots,y_{i,j-1} {{!}} \\psi_i) .\n\\end{eqnarray}</math> }}\n\nExcept in some very specific classes of mixed-effects diffusion models, the transition density $\\pmacro(y_{i,j}|y_{i,1},\\ldots,y_{i,j-1} | \\psi_i)$ does not have a closed-form expression since it involves the transition densities of the underlying  diffusion processes $X_i$.\nWhen the underlying system is a Gaussian linear dynamical system, this density is a Gaussian density whose mean and variance can be computed using the Kalman filter. When the system is not linear, a first solution consists in approximating this density by a Gaussian density and using the extended Kalman filter for quickly computing the mean and the variance of this density. On the other hand, particle filters do not make any approximations of the transition density, but are very demanding in terms of simulation volume and computation time.\n\n\n\n<br>\n\n==Bibliography==\n\n\n<bibtex>\n@article{delattre2013sii,\n  title={Coupling the SAEM algorithm and the extended Kalman filter for maximum likelihood estimation in mixed-effects diffusion models},\n  author={Delattre, M. and Lavielle, M.},\n  journal={Statistics and Its Interface},\n  year={2013}\n}\n</bibtex>\n<bibtex>\n@Article{Ditlevsen2005,\ntitle = {Mixed Effects in Stochastic Differential Equation Models},\nauthor = {Ditlevsen, S. and De Gaetano, A.},\njournal = {REVSTAT Statistical Journal},\nvolume = {3},\nyear = {2005},\npages = {137-153}\n}\n</bibtex>\n<bibtex>\n@Article{Donnet2008,\ntitle = {Parametric Inference for Mixed Models Defined by Stochastic Differential Equations},\nauthor = {Donnet, S. and Samson, A.},\njournal = {ESAIM: Probability and Statistics},\nvolume = {12},\nyear = {2008},\npages = {196-218}\n}\n</bibtex>\n<bibtex>\n@inproceedings{doucet2011tutorial,\n  title={A tutorial on particle filtering and smoothing: Fifteen years later},\n  author={Doucet, A. and Johansen, A. M.},\n  booktitle={Oxford Handbook of Nonlinear Filtering},\n  year={2011},\n  organization={Citeseer}\n}\n</bibtex>\n<bibtex>\n@article{Klim2009,\nauthor = {Klim, S. and Mortensen, S. B. and Kristensen, N. R. and Overgaard, R. V. and Madsen, H.},\ntitle = {Population stochastic modelling (PSM)-an R package for mixed-effects models based on stochastic differential equations},\njournal = {Computer methods and programs in biomedicine},\nvolume = {94},\npages = {279-289},\nyear = {2009}\n}\n</bibtex>\n<bibtex>\n@Article{Kristensen2005,\ntitle = {Using Stochastic Differential Equations for PK/PD Model Development},\nauthor = {Kristensen, N. R. and Madsen, H. and Ingwersen, S. H.},\njournal = {Journal of Pharmacokinetics and Pharmacodynamics},\nvolume = {32},\nyear = {2005},\npages = {109-141}\n}\n</bibtex>\n<bibtex>\n@article{Mazzoni2008,\ntitle = {Computational aspects of continuous-discrete extended Kalman-filtering},\nauthor = {Mazzoni, T.},\njournal = {Computational Statistics},\nvolume = {23},\nyear = {2008},\npages = {519-39}\n}\n</bibtex>\n<bibtex>\n@Article{PSM,\ntitle = {Population Stochastic Modelling (PSM): Model definition, description and examples},\nauthor = {Mortensen, S. and Klim, S.}, \nyear = {2008},\nurl = {http://www2.imm.dtu.dk/projects/psm/},\n}\n</bibtex>\n<bibtex>\n@Article{Mortensen2007,\ntitle = {A Matlab framework for estimation of NLME models using stochastic differential equations - Applications for estimation of insulin secretion rates},\nauthor = {Mortensen, S. B. and Klim, S. and Dammann, B. and Kristensen, N. R.  and Madsen, H. and Overgaard, R. V.},\njournal = {Journal of Pharmacokinetics and Pharmacodynamics},\nvolume = {34},\nyear = {2007},\npages = {623-642}\n}\n</bibtex>\n<bibtex>\n@Article{Overgaard2005,\ntitle = {Non-Linear Mixed-Effects Models with Stochastic Differential Equations: Implementation of an Estimation Algorithm},\nauthor = {Overgaard, R. V. and Jonsson, N. and Torn&oslash;e, C. W. and  Madsen, H.},\njournal = {Journal of Pharmacokinetics and Pharmacodynamics},\nvolume = {32},\nyear = {2005},\npages = {85-107}\n}\n</bibtex>\n<bibtex>\n@Article{Picchini2010,\ntitle = {Stochastic Differential Mixed-Effects Models},\nauthor = {Picchini, U. and De Gaetano, A. and Ditlevsen, S.},\njournal = {Scandinavian Journal of Statistics},\nvolume = {37},\nyear = {2010},\npages = {67-90}\n}\n</bibtex>\n<bibtex>\n@Article{Picchini2011,\ntitle = {Practical Estimation of High Dimensional Stochastic Differential Mixed-Effects Models},\nauthor = {Picchini, U. and Ditlevsen, S.},\njournal = {Computational Statistics and Data Analysis},\nvolume = {55},\nnumber = {3},\nyear = {2011},\npages = {1426-1444}\n}\n</bibtex>\n<bibtex>\n@Article{Tornoe2005,\ntitle = {Stochastic Differential Equations in NONMEM: Implementation, Application, and Comparison with Ordinary Differential Equations},\nauthor = {Torn&oslash;e, C. W. and Overgaard, R. V. and Agers&oslash;, H. and Nielsen, H. A. and Madsen, H. and Jonsson, E. N.},\njournal = {Pharmaceutical Research},\nvolume = {22},\nyear = {2005},\npages = {1247-1258}\n}\n</bibtex>\n\n\n{{Back\n|link=Hidden Markov models }}"
                    }
                ]
            }
        }
    }
}