readMLX | R Documentation |
This function retrieves all necessary information from a Monolix project file to format the input for the REMixed package. It gathers all relevant data required for the REMix algorithm.
readMLX(project = NULL, ObsModel.transfo, alpha)
project |
directory of the Monolix project (in .mlxtran). If NULL, the current loaded project is used (default is NULL). |
ObsModel.transfo |
list containing two lists of transformations and two vectors linking each transformations to their observation model name in the Monolix project. The list should include identity transformations and be named Both
|
alpha |
named list of named vector " |
To simplify its use, functions remix
, cv.remix
, gh.LL
can be used with arguments data
rather than all necessary informations "theta
", "alpha1
", "covariates
", "ParModel.transfo
", "ParModel.transfo.inv
", "Sobs
", "Robs
", "Serr
", "Rerr
", "ObsModel.transfo
" that could be extract from a monolix project. If the SAEM task of the project hasn't been launched, it's the initial condition and not the estimated parameters that are returned. If the conditional distribution estimation task has been launched, parameters "mu
" and "Omega
" are returned too.
A list containing parameters, transformations, and observations from the Monolix project in the format needed for the REMixed algorithm :
mu
list of individuals random effects estimation (vector of r.e. need to be named by the parameter names), use to locate the density mass (if conditional distribution estimation through Monolix has been launched);
Omega
list of individuals estimated standard deviation diagonal matrix (matrix need to have rows and columns named by the parameter names), use to locate the density mass (if conditional distribution estimation through Monolix has been launched);
theta
list of model parameters containing i
phi_pop
: named vector with the population parameters with no r.e. (\phi_{l\ pop})_{l\leq L}
(NULL if none) ;
psi_pop
: named vector with the population parameters with r.e. (\psi_{l\ pop})_{l\leq m}
;
gamma
: named list (for each parameters) of named vector (for each covariates) of covariate effects from parameters with no r.e. ;
beta
: named list (for each parameters) of named vector (for each covariates) of covariate effects from parameters with r.e..
alpha0
: named vector of (\alpha_{0k})_{k\leq K}
parameters (names are identifier of the observation model, such as in a Monolix project);
omega
: named vector of estimated r.e. standard deviation;
alpha1
named vector of regulatization parameters (\alpha_{1k})_{k\leq K}
, with identifier of observation model as names;
covariates
matrix of individual covariates (size N x n). Individuals must be sorted in the same order than in mu
and Omega
;
ParModel.transfo
named list of transformation functions (h_l)_{l\leq m}
and (s_k)_{k\leq K}
for the individual parameter model (names must be consistent with phi_pop
and psi_pop
, missing entries are set by default to the identity function ;
ParModel.transfo.inv
named list of inverse transformation functions for the individual parameter model (names must be consistent with phi_pop
and psi_pop
;
Sobs
ist of individuals trajectories for the direct observation models (Y_{pi})_{p \leq P,i\leq N}
. Each element i\leq N
of the list, is a list of p\leq P
data.frame with time (t_{pij})_{j\leq n_{ip}}
and observations (Y_{pij})_{j\leq n_{ip}}
. Each data.frame is named with the observation model identifiers ;
Robs
list of individuals trajectories for the latent observation models (Z_{ki})_{k \leq K,i\leq N}
. Each element i\leq N
of the list, is a list of k\leq K
data.frame with time (t_{kij})_{j\leq n_{ik}}
and observations (Z_{kij})_{j\leq n_{ik}}
. Each data.frame is named with the observation model identifiers ;
Serr
named vector of the estimated error mocel constants (\varsigma_p)_{p\leq P}
with observation model identifiers as names ;
Rerr
named vector of the estimated error mocel constants (\sigma_k)_{k\leq K}
with observation model identifiers as names ;
ObsModel.transfo
same as inputObsModel.transfo
list.
remix
, cv.remix
.
## Not run:
project <- getMLXdir()
ObsModel.transfo = list(S=list(AB=log10),
linkS="yAB",
R=rep(list(S=function(x){x}),5),
linkR = paste0("yG",1:5))
alpha=list(alpha0=NULL,
alpha1=setNames(paste0("alpha_1",1:5),paste0("yG",1:5)))
res <- readMLX(project,ObsModel.transfo,alpha)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.