System Requirements

  • Windows 8, 10
  • Windows Server 2018, 2019
  • Linux CentOS7/RHEL7

Installation Prerequisites

Before installing the packages in R, you must have successfully installed the following on your system.

For Windows please download R from CRAN, run the executable and follow the instructions. For Linux please use the instructions provided here.

Installation of NLME Engine

Certara’s NLME Engine is required to execute models built with RsNLME. Click here to request a 30-day trial of the NLME Engine.

Note: Installation files and license will be emailed by Certara support after contact form has been submitted.

Windows

Installation and configuration of the NLME Engine is done in a few simple steps via the NLME Engine Installer.

1.) Open NLME-Engine-21.11.2.exe - Run as administrator.

2.) Select appropriate installation (e.g., typical).

The installer will install Certara’s NLME Engine, MPICH (used for parallel execution), and GCC (compiler) inside C:/Program Files/Certara, and configure the appropriate environment variables required to execute Certara.RsNLME models from R.

Note: Existing Phoenix users already have MPICH2 and GCC on their system and only need to install the NLME_Engine.

Linux

Note: GCC version 4.8.5 required for the NMLE Engine distributed with CentOS/RHEL7.

1.) Unzip NLME-Engine-21.11.2.zip and note the location of this folder on your system.

2.) Install OpenMPI to execute models using parallelization (optional):

  # paste the code into Linux console, not R
  # list available openmpi RPMs
  yum list \*openmpi\*
  # install default version
  sudo yum install openmpi-devel.x86_64 

3.) Initialize licensing system using the executable initpml in already unpacked InstallDirNLME:

  # paste the code into Linux console, not R
  sudo ./initpml

4.) Setup environment variables.

Licensing

1.) After receiving your license key from Certara via email, open up your text editor (e.g., Notepad) and paste the license key to the first line of the empty .txt file.

2.) Save this file inside installed C:/Program Files/Certara/NLME_Engine with the name lservrc. Linux users should add license file inside the folder where NLME-Engine-21.11.2.zip was extracted to.

3.) It is possible to have different storage for the license file, but in such case R session should have an access to PhoenixLicenseFile environment variable, see here for details.

4.) If Phoenix NLME is installed and licensed, full RsNLME functionality is available for the user on the current host, no additional license files required.

5.) If the floating license is used, then License server should be installed within NLME Engine (Full installation). The manual explaining the server start and access to that server could be found here. NLME Engine recognizes the license server if the network address is found in PhoenixLicenseServer env.variable.

Installation of R Packages

Please note that R >= 4.0.0 is required (see above).

Define Certara_Packages object in R as a character vector of the required package names:

Certara_Packages <- c("Certara.RsNLME",
                      "Certara.NLME8",
                      "Certara.RsNLME.ModelBuilder",
                      "Certara.RsNLME.ModelExecutor", 
                      "Certara.Xpose.NLME",
                      "Certara.ModelResults",
                      "Certara.VPCResults") 

Windows

install.packages(Certara_Packages, 
  repos = c("https://certara.jfrog.io/artifactory/certara-cran-release-public/", 
  "https://cloud.r-project.org"), method = "libcurl")

Linux

Certara.RsNLME is officially supported on CentOS7/RHEL7. The package requires the xml2 and ssh dependencies. If the xml2 package is not already installed on your Linux distribution, users may first have to execute the following command from the terminal in order to install the additional Linux system library libxml2-devel.

sudo yum install libxml2-devel

If the ssh package is not already installed on your Linux distribution, users may first have to execute the following command from the terminal in order to install the additional Linux system library libssh-devel.

sudo yum install epel-release
sudo yum install libssh-devel

Then proceed to install Certara_Packages from R.

install.packages(Certara_Packages, 
  repos = c("https://certara.jfrog.io/artifactory/certara-cran-release-public/", 
            "https://cloud.r-project.org"))

Important for Linux runs: please don’t forget to initialize the license system, see Installation of NLME Engine.

Run Test Example

To verify the successful installation of R packages and NLME-Engine, you may execute the following test code to build and execute an RsNLME model.

1.) Build Model

library(Certara.RsNLME)

model <- pkmodel(parameterization = "Clearance",
                  absorption = "Intravenous",
                  numCompartments = 2,
                  data = pkData,
                  ID = "Subject",
                  Time = "Act_Time",
                  A1 = "Amount",
                  CObs = "Conc")

print(model)
## 
##  Model Overview 
##  ------------------------------------------- 
## Is population     :  TRUE
## Model Type        :  PK
## 
##  PK 
##  ------------------------------------------- 
## Parameterization  :  Clearance
## Absorption        :  Intravenous
## Num Compartments  :  2
## Dose Tlag?        :  FALSE
## Elimination Comp ?:  FALSE
## Infusion Allowed ?:  FALSE
## Sequential        :  FALSE
## Freeze PK         :  FALSE
## 
##  PML 
##  ------------------------------------------- 
## test(){
##     cfMicro(A1,Cl/V, Cl2/V, Cl2/V2)
##     dosepoint(A1)
##     C = A1 / V
##     error(CEps=0.1)
##     observe(CObs=C * ( 1 + CEps))
##     stparm(V = tvV * exp(nV))
##     stparm(Cl = tvCl * exp(nCl))
##     stparm(V2 = tvV2 * exp(nV2))
##     stparm(Cl2 = tvCl2 * exp(nCl2))
##     fixef( tvV = c(,1,))
##     fixef( tvCl = c(,1,))
##     fixef( tvV2 = c(,1,))
##     fixef( tvCl2 = c(,1,))
##     ranef(diag(nV,nCl,nV2,nCl2) =  c(1,1,1,1))
## }
## 
##  Structural Parameters 
##  ------------------------------------------- 
##  V Cl V2 Cl2
##  ------------------------------------------- 
## Observations:
## Observation Name :  CObs
## Effect Name      :  C
## Epsilon Name     :  CEps
## Epsilon Type     :  Multiplicative
## Epsilon frozen   :  FALSE
## is BQL           :  FALSE
##  ------------------------------------------- 
##  Column Mappings 
##  ------------------------------------------- 
## Model Variable Name : Data Column name
## id                  : Subject
## time                : Act_Time
## A1                  : Amount
## CObs                : Conc

2.) Fit Model

fitmodelResults <- fitmodel(model)
print(fitmodelResults)
## $Overall
##    Scenario RetCode    LogLik     -2LL      AIC      BIC nParm nObs nSub
## 1: WorkFlow       1 -632.7953 1265.591 1283.591 1308.057     9  112   16
##    EpsShrinkage Condition
## 1:      0.17297   3.34287
## 
## $theta
##    #Scenario Parameter   Estimate Units    Stderr       CV%     2.5%CI
## 1:  WorkFlow       tvV 15.4073105    NA 1.1100322  7.204581 13.2058234
## 2:  WorkFlow      tvCl  6.6015335    NA 0.8196260 12.415691  4.9759987
## 3:  WorkFlow      tvV2 41.1964591    NA 1.0869697  2.638503 39.0407112
## 4:  WorkFlow     tvCl2 14.0376052    NA 1.0477128  7.463615 11.9597141
## 5:  WorkFlow      CEps  0.1611031    NA 0.0199441 12.379710  0.1215487
##       97.5%CI Var.Inf.factor
## 1: 17.6087976             NA
## 2:  8.2270683             NA
## 3: 43.3522071             NA
## 4: 16.1154964             NA
## 5:  0.2006575             NA
## 
## $omega
##    Label         nV       nCl          nV2       nCl2
## 1:    nV 0.06927885 0.0000000 0.000000e+00 0.00000000
## 2:   nCl 0.00000000 0.1809428 0.000000e+00 0.00000000
## 3:   nV2 0.00000000 0.0000000 4.357874e-08 0.00000000
## 4:  nCl2 0.00000000 0.0000000 0.000000e+00 0.04265183
## 
## $omega_Correlation
##    Label nV nCl nV2 nCl2
## 1:    nV  1   0   0    0
## 2:   nCl  0   1   0    0
## 3:   nV2  0   0   1    0
## 4:  nCl2  0   0   0    1
## 
## $Eta_Shrinkage
##        Label        nV        nCl       nV2      nCl2
## 1: Shrinkage 0.1198519 0.01591489 0.9988085 0.2864404
## 
## $omega_stderr
##    Label        nV        nCl        nV2       nCl2
## 1:    nV 0.0394158 0.00000000 0.0000e+00 0.00000000
## 2:   nCl 0.0000000 0.05395801 0.0000e+00 0.00000000
## 3:   nV2 0.0000000 0.00000000 1.7392e-05 0.00000000
## 4:  nCl2 0.0000000 0.00000000 0.0000e+00 0.05324145