How to implement one's own problems ?

-----> Only files in the "users" folder must be modified in routine.

Main steps to change the model

Parameters dimension specification

$\longrightarrow $ SEE the module VectorLength in moduleModelSpe.f90.

The user must specify the model size :

Data reading

$\longrightarrow $ SEE the module Datareading in moduleModelSpe.f90 and subroutine readData in IOUser.f90.

First, you must define names for data you want to collect in moduleModelSpe.f90, in the module Datareading. Use variables in the VectorLength module to specify the lengths. Then in file inAndOutUser.f90 define the different reading subroutine. Each new defined reading subroutine must be called in the readData subroutine

Specification for dlsode

$\longrightarrow $ SEE the module systemODE in moduleModelSpe.f90 and subroutines solution, FEX*, JEX* and initialPoints in ode.f90.

First parameters must be defined in moduleModelSpe.f90/module systemODE in order to have name stored for ODE parameters, constant ODE parameters and derivative ODE parameters. Second JEX (first derivative) and FEX (second derivative / hessian) subroutines must be specified in ode.f90. Third, define specific JEX*'s and FEX*'s subroutines for parameters * derivatives in ode.f90. To finish, modify subroutine initialPoints so as to specify equilibrium points for the whole system and for parameters sub-systems. A mapple program (Compute_ODE.mw) is available. Specific information on FEX and JEX can be found in dlsode.f90 subroutine manual.

Observation model

$\longrightarrow $ SEE the subroutine SystemResolution in observationModel.f90

On the one hand, all compartments are not necessarly observed - only agrregate indicators are availables (eg sum of compartments). On the other hand, compartment values can be bounded (eg must be greater or equal to 0). You must modify subroutine SystemResolution in observationModel.f90 to take into account these informations.

Parameters transformation

$\longrightarrow $ SEE subroutines transfoFixedInTime and transfo in parameterTransformation.f90

Sometimes parameters transformation are preferred to parameters themselves (ex : log-transformation if the parameter must be positive). This can be implemented in the subroutines transfo and transfoFixedInTime in parameterTransformation.f90 Fixed in time parameters parameters must be defined in transfoFixedInTime since this subroutine is only called once at the beginning of the program. Other parameters can be defined in transfo. User must properly implement transfo because it can be called more than 1 million of times in a single run. Thus, a time consuming implementation of this subroutine is highly costly.

Then, each ODE system parameter must be defined in function of "b" (the estimation vector), parameters0 (constants for parameters) and or covariates (with or without estimated coefficient). It is also the place to define dparameter, the derivative of parameters. If the parameter is independant from estimated regression coefficient then, dparameter has to be set equal to parameter. Otherwise, dparameter will be computed then used in the regression coefficient estimation.

Order of parameters

$\longrightarrow $ SEE subroutines transfoFixedInTime and transfo in parameterTransformation.f90 and subroutine solution and initialPoints in ode.f90.

Order of parameters in vector "b" must be carefully choosen and kept. Traditionally, the global ordre is : biological parameters, covariates effects, random effects and error measurment. The order in subroutines transfoFixedInTime and transfo in parameterTransformation.f90 must match with the one used in subroutines solution and initialPoint in ode.f90 to call dlsode. Moreover, if you decided to consider n random effects, they will be put on the n first elements of vector b.

Prior Specification

$\longrightarrow $ SEE Input.txt

Classical maximum likelihood without penalisation is possible by specifying it in the Input.txt file. Otherwise, for MAP estimation, priors must be specified. Two penalization type are available: either a penalisation for all biological parameters or a penalisation for all parameters. So far the penalization different type of penalization is implemented in function of the parameter type We implemented Normal priors for fixed parameters : mean and standard deviation carefully choosen in accordance with the literrature. Priors for random effects standard deviations are half cauchy, parameter to be given is the over estimated median of the standard deviation of the random effect. Standard deviation for error measurment have jeffreys classical priors.

Input File

$\longrightarrow $ SEE Input.txt

Many information must be provided in the Input file.

Going further ...

$\longrightarrow $ SEE Advanced users Options for algorithm customization

$\longrightarrow $ Parallel computing

Two modules are available mpimod.mpi.f90 for running mpi program (but mpif90 has to be installed) and mpimod.seq.f90 for sequentiel compilation. Cmake automatically choose the rigth one according to computer settings but manual compilation (if Cmake is not installed) can be done by deleting the unused mpimod.f90.

Famous troubleshot (compilation and execution errors)

Famous troubleshot (compilation and execution errors)