RsSimulx

RsSimulx is a R package which offers two main functionalities:

  • provide a wrapper around the lixoftConnectors for Simulx, with a more intuitive syntax than the lixoftConnectors
  • ensure the retrocompatibility of existing mlxR scripts with the MonolixSuite version 2020 and 2021

 

Installation

RsSimulx is available on CRAN but it requires the lixoftConnectors package which is provided within the MonolixSuite installation. In addition RJSONIO (available on CRAN) is required.

Installation of RJSONIO (from CRAN)

install.packages("RJSONIO")

Installation of the lixoftConnectors

The lixoftConnectors are not available on CRAN. The installation package is located in the MonolixSuite installation directory. The default path to the installation directory differs between operating systems. You may have to adapt the path if you have chosen another installation directory.

# for Windows
install.packages("C:/ProgramData/Lixoft/MonolixSuite2021R1/connectors/lixoftConnectors.tar.gz", 
                 repos = NULL, type="source",INSTALL_opts ="--no-multiarch") 
# for MAC OS 
install.packages("/Applications/MonolixSuite2021R1.app/Contents/Resources/monolixSuite/connectors/lixoftConnectors.tar.gz", 
                 repos = NULL, type="source", INSTALL_opts ="--no-multiarch") 
# for Linux 
install.packages("/home/<your username>/Lixoft/MonolixSuite2021R1/connectors/lixoftConnectors.tar.gz", 
                 repos = NULL, type="source", INSTALL_opts ="--no-multiarch") 

Installation of RsSimulx

install.packages("RsSimulx", INSTALL_opts ="--no-multiarch")

Change log

Version 2.0.0 (released on CRAN on February 18th 2022)

This version is compatible with MonolixSuite version 2021. The lixoftConnectors 2021 should be installed first.

In this version, new functionalities already available in the GUI were added and the syntax has been slightly changed to be consistent with the display in the GUI.

The main changes in the simulx() function are summarized below:

  • parameter:
    • accept only pop param and indiv param (and ‘remaining parameters’). No covariates anymore, use the “covariate” argument instead.
    • accept strings corresponding to the elements automatically generated after an import:”mlx_Pop”, “mlx_PopUncertainSA”, “mlx_PopUncertainLin”, “mlx_PopIndiv”, “mlx_PopIndivCov”,”mlx_CondMean”,”mlx_EBEs”,”mlx_CondDistSample”
    • deprecated: “mode” and “mean” (use the keyword above instead)
  • covariate:
    • accepts covariates elements as lists (same value for all individuals), data frames or path to text file
    • accept strings corresponding to the elements automatically generated after an import: “mlx_Cov” and “mlx_CovDist”
  • treatment:
    • accept string corresponding to the elements automatically generated after an import: “mlx_admXXX”
    • new options “repeats” and “probaMissDose”
  • varlevel:
    • deprecated and now called “occasion”
  • nrep:
    • now samples with or without uncertainty depending which element is given as “parameter”
  • stat.f, data, result_folder et les settings load.design, data.in, disp.iter:
    • have been removed
  • npop and fim:
    • deprecated: use nrep and “mlx_PopUncertainSA” or “mlx_PopUncertainLin” instead
  • settings:
    • “kw.max”: deprecated
    • “replacement”: has been replaced by “samplingMethod” with values “keepOrder”, “withReplacement”, “withoutReplacement”
    • new option “sameIndividualsAmongGroups”: true/false
    • new option “sharedIds”: vector of strings among covariate, output, treatment, regressor, population, individual.
    • new option “exportData”: true/false
  • saveSmlxProject:
    • save the .smlx project to the specified path.

Known limitations:

  • when just resimulating a Monolix project, the individuals having no observations for some obs ids (in case of several observation identifiers) or no dose will be missing from the simulation.
  • it is not possible to retrieve the original IDs when using data frames with id column as input

Version 1.0.1 (released on CRAN on April 8th 2021)

This version corrects several bugs and is compatible with MonolixSuite version 2020.

  • The initialization of the lixoftConnectors (i.e linking to the MonolixSuite installation folder) is now done on the first call to simulx() instead of the loading of the RsSimulx package.
  • The new function initRsSimulx(path=…) allows to indicate a path to the MonolixSuite installation folder when the <home>/lixoft/lixoft.ini file is missing or needs to be bypassed.
  • Messages, warnings and errors raised by the lixoftConnectors are now propagated to RsSimulx such that the user can see them.
  • Columns “type” or “adm” for treatments defined as data.frames are now properly recognized (they where previously ignored).
  • When both population parameters and covariates are given in the “parameter=” argument of simulx(), the covariates are now properly taken into account (they were previously ignored).
  • The seed given to simulx() now propagates to simpopmlx, which is sampling the population parameters when using the argument “npop” (previously the reproducibility was not ensured when using npop).
  • The use of a named vector with only characters (typically in the case of categorical-only covariates defined as strings) does not generate an error any more.
  • When population parameters are defined as a data.frame with a column “pop”, the dataframe is now used with the correct number of rows (it was previously cut or replicated to match the npop argument).
  • When npop is used but no treatment is present, no error is raised anymore.
  • When the “parameter” argument is defined as a named vector with both characters (for categorical covariates for instance) and numerical values, no error is raised anymore.

Known issues remaining in version 1.0.1:

  • regressor values are not outputted from simulx()
  • when just resimulating a Monolix project, in case of both continuous and non-continuous outputs, only the continuous outputs are outputted.

Version 1.0.0 (released on CRAN on January 21st 2021)

RsSimulx is compatible with the MonolixSuite version 2020. It provides retro-compatibility of old mlxR scripts and functions to complement the use of Simulx-GUI (writeData(), prctilemlx() and simpopmlx()).

 

 

 

modal close image