$$\newcommand{\esp}{\mathbb{E}\left(#1\right)} \newcommand{\var}{\mbox{Var}\left(#1\right)} \newcommand{\deriv}{\dot{#1}(t)} \newcommand{\prob}{ \mathbb{P}\!(#1)} \newcommand{\eqdef}{\mathop{=}\limits^{\mathrm{def}}} \newcommand{\by}{\boldsymbol{y}} \newcommand{\bc}{\boldsymbol{c}} \newcommand{\bpsi}{\boldsymbol{\psi}} \def\pmacro{\texttt{p}} \def\like{{\cal L}} \def\llike{{\cal LL}} \def\logit{{\rm logit}} \def\probit{{\rm probit}} \def\one{{\rm 1\!I}} \def\iid{\mathop{\sim}_{\rm i.i.d.}} \def\simh0{\mathop{\sim}_{H_0}} \def\df{\texttt{df}} \def\res{e} \def\xomega{x} \newcommand{\argmin}{{\rm arg}\min_{#1}} \newcommand{\argmax}{{\rm arg}\max_{#1}} \newcommand{\Rset}{\mbox{\mathbb{R}}} \def\param{\theta} \def\setparam{\Theta} \def\xnew{x_{\rm new}} \def\fnew{f_{\rm new}} \def\ynew{y_{\rm new}} \def\nnew{n_{\rm new}} \def\enew{e_{\rm new}} \def\Xnew{X_{\rm new}} \def\hfnew{\widehat{\fnew}} \def\degree{m} \def\nbeta{d} \newcommand{\limite}{\mathop{\longrightarrow}\limits_{#1}} \def\ka{k{a}} \def\ska{k{\scriptscriptstyle a}} \def\kel{k{e}} \def\skel{k{\scriptscriptstyle e}} \def\cl{C{\small l}} \def\Tlag{T\hspace{-0.1em}{lag}} \def\sTlag{T\hspace{-0.07em}{\scriptscriptstyle lag}} \def\Tk{T\hspace{-0.1em}{k0}} \def\sTk{T\hspace{-0.07em}{\scriptscriptstyle k0}} \def\thalf{t{1/2}} \newcommand{\Dphi}{\partial_\pphi #1} \def\asigma{a} \def\pphi{\psi} \newcommand{\stheta}{{\theta^\star}} \newcommand{\htheta}{{\widehat{\theta}}}$$

Monolix has evolved a lot in the 2020 version, and the Lixoft connectors also. As a consequence, mlxR is not compatible with Monolix 2020R1, but a new R package is available on the CRAN which is compatible with Monolix 2020R1: RsSimulx

You need Monolix <= 2019R2 if you want to use mlxR. It’s not a problem since you can have both the 2019 and the 2020 versions installed on the same machine.

Assume that you have installed Monolix 2020R1 and Monolix2019R2 on your machine. Assume that you have installed lixoftConnectors (2020) package in the default library. Then, the solution is to keep mlxR linking to the 2019 version of Monolix and use the 2019 connectors:

• install lixoftConnectors 2019R2 package in a specific directory, the Monolix 2019R2 directory for instance :
monolix2019R2.path <-  "C:/ProgramData/Lixoft/MonolixSuite2019R2"
LC2019 <- file.path( monolix2019R2.path, "connectors/lixoftConnectors.tar.gz")
install.packages(LC2019, lib= monolix2019R2.path , repos = NULL, type = "source")
• when you want to use mlxR, load lixoftConnectors 2019, load mlxR and link it to Monolix2019R2:
library(lixoftConnectors, lib.loc = monolix2019R2.path )
library(mlxR)
initMlxR(path = monolix2019R2.path)   #(adapt the path if necessary).

### mlxR 4.1.7 - (on GitHub, December 7th, 2020).

• Bug fix (regressors with missing data can now be used).

### mlxR 4.1.6 - (on GitHub, November 1st, 2020).

• simulx
• When a Monolix project is used with user defined population parameters, the warning message "Parameter …_pop is not used in the project" is displayed only when necessary.
• exposure
• Bug fix (a regressor can now be used).

### mlxR 4.1.5 - (on GitHub, August 20th, 2020).

• simulx
• an unnecessary warning message has been suppressed: “In (jdi + 1):length(li) : numerical expression has 2 elements…”

### mlxR 4.1.4 - (on GitHub, August 18th, 2020).

• simulx
• a bug related to the use of the EBE’s in a particular case (transformed covariates) has been fixed

### mlxR 4.1.3 - (on GitHub, August 2nd, 2020).

• mlxR 4.1.3 is compatible with R 4.0.0

### mlxR 4.1.2 - (on CRAN and GitHub, May 22nd, 2020).

• prctilemlx:
• compatibility issue between R 3.x and R.4.x fixed
• simpopmlx, monolix2simulx:
• IOV with overlapping occasions no longer generate an error message

### mlxR 4.1.1 - (on CRAN and GitHub, May 15th, 2020).

• It’s now permitted to have ID’s without observations

### mlxR 4.1 - (on CRAN and GitHub, October 14th, 2019).

• mlxR 4.1 is compatible with MonolixSuite2019 R2

### mlxR 4.0.8 - (on GitHub, August 30th, 2019).

• when a monolix project is used with several types of observations in the data file, the selection of the observations to be fitted by the model (defined in Section of the mlxtran project) is now correctly handled
• Missing items in the header of the data file no longer generate an error message
• simulx:
• When npop was combined with group=list(size=N), only the first set of simulated population parameters was used. This bug has been fixed.
• syntax for parameters defined as outputs has been simplified: instead of output = list(name = c(“ka”, “V”, “Cl”)), it is now possible to use output = c(“ka”, “V”, “Cl”). This syntax can be combined with the usual one for longitudinal outputs:
    out1 <- list(name = "Cc" , time=0:24)
out2 <- c("ka", "V", "Cl")
r <- simulx( ...
output = list(out1, out2))

### mlxR 4.0.7 - (on GitHub, July 11th, 2019).

• simulx:
• regressors with missing values are correctly handled
• new times can be defined when regressors are defined as outputs

### mlxR 4.0.5 - (on GitHub, June 24th, 2019).

• simulx:
• it is now possible to have time varying categorical covariates with IOV
• initMlxR:

returns/defines the path to Monolix

initMlxR()
## $software ##  "simulx" ## ##$path
##  "C:/ProgramData/Lixoft/MonolixSuite2020R1"
##
## $version ##  "2020R1" ## ##$status
##  TRUE
initMlxR("C:/ProgramData/Lixoft/MonolixSuite2018R2")

### mlxR 4.0.4 - (on GitHub, June 19th, 2019).

• simulx:
• it is now possible to have correlations between random effects at the IOV level

### mlxR 4.0.3 - (on GitHub, June 5th, 2019).

• shinymlx:
• bug fix: sliders were not always correctly created
• simulx:
• bug fix: when a Monolix project is used, temporary model files were not always correctly removed

• categorical covariates in a Monolix project are better managed

• simulx:

### mlxR 4.0.1 - (on GitHub, May 20th, 2019).

• simulx:
• bug fix: error message “Error: Some id’s are missing in ‘regressor’” was sometimes not appropriate
• simpopmlx:
• extension of a logit-normal distribution to any interval (a,b) is now possible

### mlxR 4.0.0 - (on CRAN and GitHub, April 18th, 2019).

This new version of mlxR runs with the Monolix Suites 2019R1 (recommended), 2018R2 and 2018R1

See the install procedure.

### mlxR 3.3.6 - (on GitHub, February 1st, 2019).

• several bug fixes…

### mlxR 3.3.5 - (on GitHub, November 18th, 2018).

• simulx:
• iov: it is now possible with a Monolix project with IOV to use the conditional modes (EBEs) or conditional means, using for instance
simulx(project= ... , parameter="mode")  
• simulx:
• it is possible to provide a subset of individual parameters as input. Only those that are not given as input are simulated using the model

### mlxR 3.3.4 - (on GitHub, October 10th, 2018).

• all:
• several error messages have been improved
• simulx:
• iov: it is now possible to put IOV with no IIV on some individual parameters
• no amount is required for emptyandreset actions

### mlxR 3.3.3 - (on GitHub, August 30th, 2018).

• simulx:
• regressors with a single time point are now accepted
• If only one group is simulated “id.out = TRUE” results in id and group not being factors: fixed
• iov: several bug fixes
• kmplotmlx:
• censored data is now correctly displayed

### mlxR 3.3.2 - (on GitHub, July 12th, 2018).

• EVID=2 is now correctly handled (the row is ignored)
• Old (<=2016) and new (>= 2018) header types are supported
• monolix2simulx:

• commas (“,”) are used as separators in files that are created

### mlxR 3.3.1 - (on GitHub, March 26th, 2018).

• Multiple MDV columns are now allowed
• kmplotmlx:

• bug fix: it is now possible to redefine the time points where the survival is computed.

### mlxR 3.3.0 - (on CRAN and GitHub, February 20th, 2018).

mlxR 3.3 is compatible with MonolixSuite2018R1!

### mlxR 3.2.4 - (on GitHub, November 11th, 2017).

• inlineModel: Options have been added to inlineModel : filename=“random” creates a tempory model file with a random name (useful when several people play with the same Shiny app for instance). See the online documentation for more detail

• shinymlx: Bug fix: an inline model is now properly handled.

### mlxR 3.2.3 - (on GitHub, October 8th, 2017).

• inlineModel: A model created using inlineModel is not saved anymore in the same temporary text file. It is converted into a list with 2 fields: filename (the name of the model) and str (a vector of strings).

• kmplotmlx: The estimation of the mean number of events per subject is now calculated correctly.

• simulx: Bug fix: in a Monolix project, id’s with different outputs were not always correctly handled.

### mlxR 3.2.2 - (on GitHub, August 31st, 2017).

• simulx: Inter occasion variability (IOV) is now handled. See

### mlxR 3.2.1 - (on GitHub, July 22nd, 2017).

• prctilemlx:

• It is now possible to use the same id’s in different groups
• simulx:

• it is now possible to define new regressor values when a Monolix project is used for simulation.

• column TINF can now be used (instead of RATE for instance)
• bug fixes:

• Use of simulx with a Monolix project with several populations(npop>1) and a group with a new size

• the names of the regressors are not modified anymore when tab separators are included in the model file

### mlxR 3.1.6 - (on GitHub, April 4th, 2017).

• prctilemlx, kmplotmlx, catplotmlx: significant improvement of how groups are managed. See

see also the much more simple version of Comparing several dosage regimens - part II

• simulx, catplotmlx: for categorical data,

• original categories (as defined in the model) are now used, instead of {0, 1, 2, …}.
• simulx used with a Monolix project:

• id’s with no observations are now allowed

### mlxR 3.1.5 - (on GitHub, March 3rd, 2017).

• prctilemlx: bug fix (the column definition has been corrected).

• simulx:

• When a Monolix project is used, the covariates returned by simulx are the covariates of the new id’s when the id’s are resampled.

• When a Monolix project is used, it is now possible to use a data frame, with a selection of id’s.

### mlxR 3.1.4 - (on GitHub, December 27th, 2016).

• kmplotmlx: several new feature have been added

• define the time points where the survival is computed
• compute and plot the empirical survival for several replicates
• plot the mean number of events per indivivual
• return a data frame instead of a plot
• define individual right censoring times

see demo_kmplotmlx_V314.R for some examples.

• writeDatamlx:

• When a Monolix project is used, it’s now possible to save the simulated data in a data file using the format (and the header) of the original data
sim.res  <- simulx(project = project.file)
writeDatamlx(sim.res, project=project.file)  # information about the project is used

see demo_writeDatamlx_V314.R for some examples

• simulx: When the seed is not provided by the user, generation of random numbers has been improved in order to avoid possible cycles.

• simpopmlx: bug fix (Cholesky decomposition).

• pkmodel: bug fix (parameterization (V2, Q2, V3, Q3) instead of (k12, k21, k13, k31) with several individuals).

### mlxR 3.1.3 - (on GitHub, November 21st, 2016).

• kmplotmlx: a bug which appeared in version 3.1.2 has been fixed

• catplotmlx: the color can be defined by the user:

catplotmlx(res$y, color="black") • prctilemlx: • the color can be defined by the user • number of bands and level defined as arguments (instead of a list) prctilemlx(res$C, number=75, level=90, color="#194280")

### mlxR 3.1.2 - (on GitHub, November 9th, 2016).

• simulx used with a Monolix project:

• use of ADM column (type of administration) in the data file is now possible
• resampling is now OK with non numerical id’s
• some individuals may not have all types of observations (only PK or only PD for instance)
• kmplotmlx accepts any type of id’s (numerical or non numerical)

### mlxR 3.1.1 - (on GitHub, October 13th, 2016).

• simulx :

• possibility to define new variables in the model (not defined in the original Mlxtran model file). Example: define the AUC as an output when the concentration only is defined in the model.
ee http://simulx.webpopix.org/userguide/new-output/

### mlxR 3.0.3 - (on GitHub, June 13th, 2016).

• shinymlx : remove dependence to package reshape (conflict with reshape2)

• simulx :

• bug fix : correlations between random effects are now correctly taken into account with a Monolix project.
• add covariates in the outputs from a Monolix project
• writeDatamlx : write covariates from a Monolix project

### mlxR 3.0.2 - (on GitHub, May 23rd, 2016).

• exposure : irregular grid of time points is now allowed

• simulx :

• bug fix : simulation using a Monolix project with estimated individual parameters (mean or mode) and some given parameters values (e.g. parameter = list(“mode”, c(b=0)) ) was incorrect. The individual parameters were sampled instead of using the mode or the mean. See http://simulx.webpopix.org/userguide/monolix1
• simpopmlx : names of structural parameters with "_" are now allowed

### mlxR 3.0.1 - (on GitHub, May 12th, 2016).

• readDatamlx : mdv != 1 is used insted of mdv==0 in order to allow simulations when mdv=2 for instance

• simulx :

• bug fix : simulation using several vectors of population parameters was incorrect (only the first set of population parameters was used). See http://simulx.webpopix.org/userguide/monolix3
• npop=1 is now allowed (only one set of population parameters may be randomly drawn)

### mlxR 3.0.0 (on CRAN, April 1st, 2016)

mlxR 3.0.0 is a R package available on CRAN and github. See the installation procedure.

Some good news…

Several new functions have been added to mlxR 3.0.0:

• simpopmlx simulate uncertainty/variability on the population parameters
• statmlx compute statistical summaries (mean, quantile, variance, survival rate,.)
• writeDatamlx Write data in a single file or in several files as tables

Several new features of simulx are now available:

• Use of simulxfor clinical trial simulation has been significantly improved. It now becomes very easy and fast to simulate several replicates of the same trial and compute automatically relevant statistical summaries. See this case study as an example.

• You can automatically save the results of simulx in a single file (Monolix/NONMEM format) or in several tables. This is particulary useful (and recommended) when you simulate, for instance, many repliactes with many subjects, in order to avoid keeping in memory a large amount of data.

• Design of a workflow (modelling with Monolix and simulation with simulx) has been improved:

• Taking into account the uncertainty on the population parameters is possible by using the Fisher information matrix estimated by Monolix,
• Defining new groups with any number of subjects is possible by resampling (with or with replacement) the original individuals of the study,
• When it is used with a Monolixproject, simulxreturns the original id’s, the individual treatments and the estimated population parameters.
• A extensive library of probability distributions is available with the new Mlxlibrary. This library can be used with simulx.

• Even if simulx is primarily designed to be used with the model coding language Mlxtran, a model implemented in R can also be used. You should note that implementation is usually much more tricky and calculation times much higher with R than with Mlxtran.

• Bugs present in mlxR 2.2 have been fixed.

Simulation of inter occasion variability (IOV) is not possible with version 3.0.0 of simulx. This feature should be available again shortly!

Compatibility with mlxR 2.2 and previous versions of Mlxlibrary

• Formulas in a bloc DISTRIBUTION is not allowed anymore. For example,
DEFINITION:
a =  {distribution=normal, mean=a_pop, sd=.1*a_pop}


was permitted with mlxR 2.2 but is not allowed anymore with mlxR 3.0. Use instead

EQUATION:
sd_a = .1*a_pop
DEFINITION:
a =  {distribution=normal, mean=a_pop, sd=sd_a}

• Categories of a categorical covariates had to be replaced by {0, 1, 2, …} in order to be used in a formula with mlxR 2.2. Original categories can now be used,
if SEX==F
a=1
else
...


See this example.

Compatibility with Monolix 433

In order to guarantee a good export of a Monolix project, the project needs to be in the new format of Monolix 2016R1. Then, if you want to use a Monolix 433 project, just load it with Monolix 2016R1 and save it again.

The following Monolix projects cannot be exported:

• Projects with IOV,

• Projects with a Matlab structural model,

• Projects with several chained structural models.

• Projects with custom distributions for the individual parameters.

• Projects with bsmm function in the longitudinal section.

• Projects with non constant covariates (and for which only the first value for each individual is used Monolix). Define time varying covariates’’ as regressors instead of covariates!

### mlxR 2.2.0 (May 31, 2015)

• shinymlx (create Shiny applications)
• monolix2simulx (convert a Monolix Project into a R script for simulx)
• exposure (Compute the area under the curve, the maximum and minimum values of a funtion of time.)

### mlxR 2.1.0 (January 10, 2015)

• kmplotmlx (Kaplan Meier plot)
• catplotmlx (Plot longitudinal categorical data)

prctilemlx has been modified:

• polygons are created using geom_polygon (ggplot2)
• the output is a ggplot object

Minor bug fixes.

### mlxR 2.0.0 (December, 2014)

New features:

• Inter occasion variability
• Categorical covariates