# Description of the R functions associated to the scenario

 abort Stop the current task run. getLastRunStatus Return an execution report about the last run with a summary of the error which could have occurred. getScenario Get the list of tasks that will be run at the next call to runScenario, the associated method (linearization true or false), and the associated list of plots. isRunning Check if a scenario is currently running. runConditionalDistributionSampling Estimate the individual parameters using conditional distribution sampling algorithm. runConditionalModeEstimation Estimate the individual parameters using the conditional mode estimation algorithm (EBEs). runLogLikelihoodEstimation Run the log-Likelihood estimation algorithm. runPopulationParameterEstimation Estimate the population parameters with the SAEM method. runScenario Run the current scenario. runStandardErrorEstimation Estimate the Fisher Information Matrix and the standard errors of the population parameters. setScenario Clear the current scenario and build a new one from a given list of tasks, the linearization option and the list of plots. computeChartsData Compute and export the charts data.

## Stop the current task run

### Usage

abort()


 runScenario

## Not run:

abort()

## End(Not run)

)
Top of the page, Monolix-R functions.

## Get last run status

### Description

Return an execution report about the last run with a summary of the error which could have occurred.

### Usage

getLastRunStatus()


### Value

A structure containing

1. a boolean which equals TRUE if the last run has successfully completed,
2. a summary of the errors which could have occurred.

 runScenario  abort  isRunning

## Not run:

lastRunInfo = getLastRunStatus()

lastRunInfo$status -> TRUE lastRunInfo$report

-> “”

## End(Not run)

)
Top of the page, Monolix-R functions.

## Get current scenario

### Description

Get the list of tasks that will be run at the next call to  runScenario, the associated method (linearization true or false), and the associated list of plots.
The list of tasks consist of the following tasks: populationParameterEstimation, conditionalDistributionSampling, conditionalModeEstimation, standardErrorEstimation, logLikelihoodEstimation, and plots.

### Usage

getScenario()


### Value

The list of tasks that corresponds to the current scenario, indexed by algorithm names.

 setScenario

## Not run:

scenario = getScenario()

scenario

-> $tasks populationParameterEstimation conditionalDistributionSampling conditionalModeEstimation standardErrorEstimation logLikelihoodEstimation plots TRUE TRUE TRUE FALSE FALSE FALSE$linearization = T

$plotList = “outputplot”, “vpc” ## End(Not run) ) Top of the page, Monolix-R functions. ## Get current scenario state ### Description Check if a scenario is currently running. If yes, information about the current running task are displayed. ### Usage isRunning(verbose = FALSE)  ### Arguments verbose (bool) Should information about the current running task be displayed in the console or not. Equals FALSE by default. ### Value A boolean which equals TRUE if a scenario is currently running. ### See Also  runScenario  abort ### Click here to see examples ## Not run: isRunning() ## End(Not run) ) Top of the page, Monolix-R functions. ## Sampling from the conditional distribution ### Description Estimate the individual parameters using conditional distribution sampling algorithm. The associated method keyword is “conditionalMean”. By default, this task is not processed in the background of the R session. Notice that it does not impact the current scenario. Call 1.  isRunning to check if the scenario is still running and get information about the current task, 2.  abort to stop the execution. To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE. ### Usage runConditionalDistributionSampling(wait = TRUE)  ### Arguments wait (bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default. ### See Also  isRunning  abort ### Click here to see examples ## Not run: runConditionalDistributionSampling() ## End(Not run) ) Top of the page, Monolix-R functions. ## Estimation of the conditional modes (EBEs) ### Description Estimate the individual parameters using the conditional mode estimation algorithm (EBEs). The associated method keyword is “conditionalMode”. By default, this task is not processed in the background of the R session. Notice that it does not impact the current scenario. Call 1.  isRunning to check if the scenario is still running and get information about the current task, 2.  abort to stop the execution. To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE. ### Usage runConditionalModeEstimation(wait = TRUE)  ### Arguments wait (bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default. ### See Also  isRunning  abort ### Click here to see examples ## Not run: runConditionalModeEstimation() ## End(Not run) ) Top of the page, Monolix-R functions. ## Log-Likelihood estimation ### Description Run the log-Likelihood estimation algorithm. By default, this task is not processed in the background of the R session. Notice that it does not impact the current scenario. Call 1.  isRunning to check if the scenario is still running and get information about the current task, 2.  abort to stop the execution. To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE. Existing methods:  Method Identifier Log-Likelihood estimation by linearization linearization = T Log-Likelihood estimation by Importance Sampling (default) linearization = F The Log-likelihood outputs(-2LL, AIC, BIC) are available using getEstimatedLogLikelihood function ### Usage runLogLikelihoodEstimation(linearization = FALSE, wait = TRUE)  ### Arguments linearization option (boolean)[optional] method to be used. When no method is given, the importance sampling is used by default. wait (bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default. ### See Also  isRunning  abort ### Click here to see examples ## Not run: runLogLikelihoodEstimation(linearization = T) ## End(Not run) ) Top of the page, Monolix-R functions. ## Population parameter estimation ### Description Estimate the population parameters with the SAEM method. The associated method keyword is “saem”. By default, this task is not processed in the background of the R session. Notice that it does not impact the current scenario. Call 1.  isRunning to check if the scenario is still running and get information about the current task, 2.  abort to stop the execution. To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE. The initial values of the population parameters can be accessed by calling getPopulationParameterInformation and customized with setPopulationParameterInformation. The estimated population parameters are available using getEstimatedPopulationParameters function. ### Usage runPopulationParameterEstimation(wait = TRUE)  ### Arguments wait (bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default. ### See Also  isRunning  abort ### Click here to see examples ## Not run: runPopulationParameterEstimation() ## End(Not run) ) Top of the page, Monolix-R functions. ## Run current scenario ### Description Run the current scenario. By default, this task is processed sequentially. Call 1.  isRunning to check if the scenario is still running and get information about the current task, 2.  abort to stop the execution. To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE. Note: if the plots task is selected in the scenario, and if “Export charts data” is selected in Monolix’s preferences, the charts data are saved in the result folder. Generating the interactive plots requires to open the project in the GUI. ### Usage runScenario(wait = TRUE)  ### Arguments wait (bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default. ### See Also  setScenario  getScenario  abort  isRunning ### Click here to see examples ## Not run: runScenario() # sequential run runScenario(wait = TRUE) # background run ## End(Not run) ) Top of the page, Monolix-R functions. ## Standard error estimation ### Description Estimate the Fisher Information Matrix and the standard errors of the population parameters. By default, this task is not processed in the background of the R session. Notice that it does not impact the current scenario. Call 1.  isRunning to check if the scenario is still running and get information about the current task, 2.  abort to stop the execution. To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE. ### Usage runStandardErrorEstimation(linearization = FALSE, wait = TRUE)  ### Arguments linearization option (boolean)[optional] method to be used. When no method is given, the stochastic approximation is used by default. wait (bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default. ### Details Existing methods:  Method Identifier Estimate the FIM by Stochastic Approximation linearization = F (default) Estimate the FIM by Linearization linearization = T The Fisher Information Matrix is available using getCorrelationOfEstimates function, while the standard errors are avalaible using getEstimatedStandardErrors function. ### See Also  isRunning  abort ### Click here to see examples ## Not run: runStandardErrorEstimation(linearization = T) ## End(Not run) ) Top of the page, Monolix-R functions. ## Set scenario ### Description Clear the current scenario and build a new one from a given list of tasks, the linearization option and the list of plots. The scenario is a list of 3 objects: • tasks: named vector of boolean, defining for each task if it should run or not • linearization: boolean, defining if linearization method should be used or not for standard errors and log-likelihood estimation • plotList: vector of strings, defining the list of graphics to generate #### NOTE by default the boolean is false. ### Usage setScenario(...)  ### Details #### NOTE Within a MONOLIX scenario, the order in which the different algorithms are run is fixed. Options for the “task” object of the list:  Algorithm in GUI Keyword in connector Population Parameter Estimation “populationParameterEstimation” Conditional Mode Estimation (EBEs) “conditionalModeEstimation” Sampling from the Conditional Distribution “conditionalDistributionSampling” Standard Error and Fisher Information Matrix Estimation “standardErrorEstimation” LogLikelihood Estimation “logLikelihoodEstimation” Plots “plots” Options for the “linearization” object of the list: TRUE or FALSE Options for the “plotList” object of the list:  Name in GUI Keyword for connector Observed data “outputplot” Individual fits “indfits” Observations vs predictions “obspred” Scatter plot of the residuals “residualsscatter” Distribution of the residuals “residualsdistribution” Distribution of the individual parameters “parameterdistribution” Distribution of the random effects “randomeffects” Correlation between random effects “covariancemodeldiagnosis” Individual parameters vs covariates “covariatemodeldiagnosis” Visual predictive check “vpc” Visual predictive check (discrete data) “categorizedoutput” Numerical predictive check “npc” BLQ predictive check “blq” Prediction distribution “predictiondistribution” Likelihood contribution “likelihoodcontribution” Standard errors of the estimates “fisher” SAEM “saemresults” MCMC “condmeanresults” Importance sampling “likelihoodresults” ### See Also  getScenario ### Click here to see examples ## Not run: scenario = getScenario() scenario$tasks = c(populationParameterEstimation = T, conditionalModeEstimation = T, conditionalDistributionSampling = T)

scenario$linearization = TRUE scenario$plotList = c(“outputplot”,”fisher”)

setScenario(scenario)

## End(Not run)

Top of the page, Monolix-R functions.

## Compute the charts data

### Description

Compute and export the charts data o scenario. Notice that it does not impact the current scenario. Call isRunning to check if the scenario is still running and get information about the current task, abort to stop the execution.

To launch the function in the background, so that functions which do not modify the project (“get” functions for example) remains available, set the input argument “wait” to FALSE.

### Usage

computeChartsData(wait = TRUE)

### Arguments

wait
(bool) Should R wait for run completion before giving back the hand to the user. Equals TRUE by default.

isRunning abort