N.I.M.R.O.D.  
Functions/Subroutines

funcpa.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

double precision funcpa (b, npm2, id, thi, jd, thj)
 Compute the individual and global log-likelihood.
double precision funcpaRandomEffect (b, m, id, thi, jd, thj)
 Compute the individual log-likelihood conditionnally to random effects.

Function Documentation

double precision funcpa ( double precision,dimension(npm2),intent(inout)  b,
integer,intent(in)  npm2,
integer,intent(in)  id,
double precision,intent(in)  thi,
integer,intent(in)  jd,
double precision,intent(in)  thj 
)

Compute the individual and global log-likelihood.

AUTHOR : Melanie Prague Daniel Commenges Julia Drylewicz Jeremy guedj Rodolphe Thiebaut

DESCRIPTION :

This subroutine defines the function to optimize. The likelihood formula for the model and observations can be found in Guedl et al 2007 (Maximum likelihood estimation in dynamical models of HIV. Biometrics). The individual likelihood given the random effects ( $\mathcal{L}^{\theta}_{\mathcal{F}_i|u_i}$) is computed as a function of $g_m(X^i(t_{ij}))$ (solver trajectories) since the $Y^i_{m}(t_{ij})$ are independent Gaussian variables. Then, the likelihood ( $\mathcal{L}^{\theta}_i$) is computed by integrating over the random effects via the adaptive Gaussian quadrature. Bayes therorem gives:

\[ \log [P(\theta|Y)]=L(\theta)+\log[\pi(\theta)]+ C \]

where $C$ is the normalization constant, $P(\theta|Y)$ the posterior distribution, $L(\theta)$ the log-likelihood and $\pi(\theta)$ the prior distribution.

MODIFICATION :

01/09/2012 - Prague - Refactoring

INFORMATIONS:

Parameters:
[in,out]bparameter vector
[in]mparameter vector lenth
[in]idfor derivation, indication of displacement in the first dimension
[in]jdfor derivation, indication of displacement in the second dimension
[in]thifor derivation, magnitude of displacement in the first dimension
[in]thjfor derivation, magnitude of displacement in the second dimension

Definition at line 43 of file funcpa.f90.

References WorkingSharedValues::adaptive, WorkingSharedValues::adaptive2, WorkingSharedValues::b1, dchole(), derivVRAISTOT(), WorkingSharedValues::detersauv, dsinv(), WorkingSharedValues::estimationWanted, WorkingSharedValues::extrema, FINDInv(), WorkingSharedValues::firstFuncpa, inflateDiag(), WorkingSharedValues::likelihoodERROR, WorkingSharedValues::likelihoodPRECISION, WorkingSharedValues::listIdPatExcluded, WorkingSharedValues::LLnonPenalisee, WorkingSharedValues::LLPenalisee, WorkingSharedValues::loglike, logLikelihood_penalization(), marquardt(), mpimod::MPIutilisation, WorkingSharedValues::nbpatOK, WorkingSharedValues::numeroalea, WorkingSharedValues::numparam, WorkingSharedValues::numpat1, mpimod::numproc, WorkingSharedValues::patOK, WorkingSharedValues::recap, mpimod::repartirSurCoeurs(), WorkingSharedValues::scaleinv2sauv, WorkingSharedValues::scaleinvsauv, WorkingSharedValues::scalesauv, WorkingSharedValues::seuil2, WorkingSharedValues::startsauv, WorkingSharedValues::startsauvind, mpimod::synchroFUNCPA(), WorkingSharedValues::systeme, WorkingSharedValues::vrais_obs, vraisobs(), WorkingSharedValues::withexclusion, and WorkingSharedValues::writefuncpaFichier.

Here is the call graph for this function:

double precision funcpaRandomEffect ( double precision,dimension(m),intent(inout)  b,
integer,intent(in)  m,
integer,intent(in)  id,
double precision,intent(in)  thi,
integer,intent(in)  jd,
double precision,intent(in)  thj 
)

Compute the individual log-likelihood conditionnally to random effects.

AUTHOR : Melanie Prague Daniel Commenges Julia Drylewicz Jeremy guedj Rodolphe Thiebaut

DESCRIPTION :

This subroutine defines the function to optimize for random effects. For each patient, the individual likelihood given the random effects ( $\mathcal{L}^{\theta}_{\mathcal{F}_i|u_i}$) is to be maximized in $u_i$ to find the patient random effect.

MODIFICATION :

01/09/2012 - Prague - Refactoring

INFORMATIONS:

Parameters:
[in,out]bparameter vector
[in]mparameter vector lenth
[in]idfor derivation, indication of displacement in the first dimension
[in]jdfor derivation, indication of displacement in the second dimension
[in]thifor derivation, magnitude of displacement in the first dimension
[in]thjfor derivation, magnitude of displacement in the second dimension

Definition at line 541 of file funcpa.f90.

References WorkingSharedValues::numeroalea, WorkingSharedValues::numpat1, WorkingSharedValues::seuil2, and vraistotEXP().

Here is the call graph for this function: