N.I.M.R.O.D.  

module.f90

Go to the documentation of this file.
00001 !------------------------------------------------------------------------------
00002 ! N.I.M.R.O.D. - Normal approximation Inference in Models with Random
00003 !                effects based on Ordinary Differential equations
00004 !------------------------------------------------------------------------------
00005 !
00006 ! VERSION : 1.0
00007 !
00008 ! MODULE: module.f90
00009 !
00010 !------------------------------------------------------------------------------
00011 !------------------------------------------------------------------------------
00027 module WorkingSharedValues
00028     use VectorLength
00029     use systemODE
00030     use Datareading
00031     use ToleranceThreshold
00032     implicit none
00033 
00034     ! For data Reading
00035 
00037     integer,dimension(nbpatienta)::tailletime
00038 
00039     double precision,dimension(nbpatienta,tdef2)::listtime
00040 
00041     ! Estimation
00043     double precision, dimension(npm) ::binit
00044 
00045     integer :: maxiteration
00046 
00047     double precision,dimension(npm),save::b0,b1
00048 
00049     character(len=30) :: nomfileOut
00050 
00051 
00052     ! CUSTOMIZATION ALGORITHMES
00054     logical :: marqONLY
00055 
00056     logical :: SwitchMarquartd
00057 
00058     integer::penalisationBiologique !0 si vrais classique et 1 map
00059 
00060     integer::penalisationAll !1 si penalise aussi les traitements et les ea + err
00061 
00062     logical :: estimationWanted
00063 
00064     ! SEUIL DE CONVERGENCE DE LALGO
00066     double precision :: controleCA
00067 
00068     double precision :: controleCB
00069 
00070     double precision :: controleRDM
00071 
00072     ! POUR AVOIR UNE SORTIE PROPRE
00074     character(len=15),dimension(npm)::nomparams
00075 
00076     ! variables funcpa
00078     double precision,dimension(4)::loglike
00079 
00080     double precision,dimension(ndim,nbpatienta),save::extrema
00081 
00082     double precision,dimension(ndim,ndim,nbpatienta),save ::scalesauv,scaleinvsauv
00083 
00084     logical :: writefuncpaFichier
00085 
00086     integer,dimension(nbpatienta),save::patOK
00087 
00088     integer :: nbpatOK
00089 
00090     integer,dimension(nbpatienta),save::listIdPatExcluded
00091 
00092     logical ::firstFuncpa
00093 
00094     logical :: withexclusion
00095 
00096     integer,save :: numeroalea
00097 
00098     double precision::seuil2
00099 
00100     ! variables funsub
00102     double precision,dimension(ndim,ndim,nbpatienta) :: scaleinv2sauv
00103 
00104     double precision,dimension(nbpatienta),save::detersauv
00105 
00106     double precision,dimension(ndim,nbpatienta),save::startsauv,startsauvind
00107 
00108     logical,save::adaptive,adaptive2
00109 
00110     integer, dimension(3,nbpatienta)::likelihoodERROR
00111 
00112     double precision, dimension(3,nbpatienta)::likelihoodPRECISION
00113 
00114     integer, dimension(2,npm,nbpatienta)::scoreERROR
00115 
00116     double precision, dimension(2,npm,nbpatienta)::scorePRECISION
00117 
00118     ! variables likelihood
00120     double precision, dimension(nbpatienta),save::vrais_obs
00121 
00122     double precision,dimension(nbpatienta),save::recap
00123 
00124     integer,dimension(nbpatienta,tdef2,nbcomp),save::censor
00125 
00126 
00127 
00128     ! variable de calcul globale
00130     integer,save::numpat1,numcoeff1,numparam
00131     integer,dimension(2)::systeme
00132 
00133     ! variable de calcul d'erreurs
00135     double precision,dimension(npm),save::abserr
00136     double precision,save::abserr1,abserrfuncpa
00137 
00138 
00139     ! variable de funcpa
00140     double precision,dimension(nbpatienta,npm),save::fth,fthn,score
00141     logical :: test_funcpa
00142     double precision::funcpa_compare
00143 
00144     ! MAP
00146     double precision,dimension(npm),save::esp_prior, std_prior
00147 
00148      ! output Folder
00149     character(LEN=30)::OutputFolder
00150 
00151     ! Parametric empirical bayes
00152     double precision,dimension(npm,nbpatienta)::emp_bayes
00153     double precision,dimension(nbpatienta,tdef2,nbcomp)::bayes_data
00154     double precision,dimension(nbpatienta,tdef2,nbcomp)::ICmoins
00155     double precision,dimension(nbpatienta,tdef2,nbcomp)::ICplus
00156 
00157     ! FOR LCVA
00158     double precision,dimension(npm*(npm+3)/2) :: hessianNonPenalisee
00159     double precision,dimension(npm*(npm+3)/2) :: hessianPenalisee
00160     double precision:: LLnonPenalisee
00161     double precision:: LLPenalisee
00162 
00163 contains
00164     subroutine WorkingSharedValuesInit()
00165         implicit none
00166         call ODEinit()
00167         ! For data
00168         tailletime=0
00169         listtime=0.0D0
00170         !Estimation
00171         binit=0.0D0
00172         maxiteration=0
00173         ! Files
00174         biomarkersFile=""
00175         ! Constantes
00176         schedule=0
00177         donnees=0.D0
00178         nbpatient=0
00179         idpat=0
00180         nbobs=0
00181         ! variables funcpa
00182         extrema=0.D0
00183         scalesauv=0.D0
00184         scaleinvsauv=0.D0
00185         patOK=0
00186         nbpatOK=0
00187         firstFuncpa=.false.
00188         ! variables funsub
00189         scaleinv2sauv=0.D0
00190         detersauv=0.D0
00191         startsauv=0.D0
00192         startsauvind=0.D0
00193         ! Parametres variables Systeme ODE
00194         b0=0.D0
00195         b1=0.D0
00196         ! variables likelihood
00197         vrais_obs=0.D0
00198         recap=0.D0
00199         censor=0
00200         ! Adaptation ?
00201         adaptive=.false.
00202         adaptive2=.false.
00203         ! variable de calcul globale
00204         numpat1=0
00205         numcoeff1=0
00206         systeme=0
00207         ! variable de calcul d'erreurs
00208         abserr=0.D0
00209         abserr1=0.D0
00210         abserrfuncpa=0.D0
00211         ! varaible de seuil de convergence
00212         seuil2=0.D0
00213         ! variable de calculs ea
00214         numeroalea=0
00215         ! variable de funcpa
00216         fth=0.D0
00217         fthn=0.D0
00218         score=0.D0
00219         test_funcpa=.false.
00220         funcpa_compare=0.D0
00221         likelihoodERROR(3,:)=0
00222         likelihoodPRECISION(3,:)=0
00223         ! MAP
00224         esp_prior=0.D0
00225         std_prior=0.D0
00226         ! Parametric empirical bayes
00227         emp_bayes=0.D0
00228         bayes_data=0.D0
00229         !Lcva
00230         hessianNonPenalisee=0.0D0
00231         hessianPenalisee=0.0D0
00232         LLnonPenalisee=0.0D0
00233         withexclusion=withexclusionUser
00234 
00235     end subroutine WorkingSharedValuesInit
00236 end module WorkingSharedValues
00237 
00238 
00239 
00240 !------------------------------------------------------------------------------
00243 module Constante
00244     double precision, parameter:: pigrec=314159265358979.d-14
00245 end module Constante
00246 
00247 
00248 
00249 
00250