On the use of a R-functions
PKanalix can be called via R-functions. It is possible to have access to the project exactly in the same way as you would do with the interface. All the functions are described below.
- Installation guidelines and initialization procedure
- List of the R functions
- Description of the functions concerning the dataset
- Description of the functions concerning the initialization and path to demo projects
- Description of the functions concerning the plots
- Description of the functions concerning the project management
- Description of the functions concerning the project settings and preferences
- Description of the functions concerning the reporting
- Description of the functions concerning the results
- Description of the functions concerning the scenario
- Description of the functions concerning the settings
List of the R functions
Description of the functions concerning the dataset
- addAdditionalCovariate : Create an additional covariate for stratification purpose.
- applyFilter : Apply a filter on the current data.
- createFilter : Create a new filtered data set by applying a filter on an existing one and/or complementing it.
- deleteAdditionalCovariate : Delete a created additinal covariate.
- deleteFilter : Delete a data set.
- editFilter : Edit the definition of an existing filtered data set.
- formatData : Adapt and export a data file as a MonolixSuite formatted data set.
- getAvailableData : Get information about the data sets and filters defined in the project.
- getCovariateInformation : Get the name, the type and the values of the covariates present in the project.
- getFormatting : Get data formatting from a loaded project.
- getObservationInformation : Get the name, the type and the values of the observations present in the project.
- getTreatmentsInformation : Get information about doses present in the loaded dataset.
- removeFilter : Remove the last filter applied on the current data set.
- renameAdditionalCovariate : Rename an existing additional covariate.
- renameFilter : Rename an existing filtered data set.
- selectData : Select the new current data set within the previously defined ones (original and filters).
- getCAData : Get the data as it is used for CA.
- getNCAData : Get the data as it is used for NCA.
Description of the functions concerning the initialization and path to demo projects
- initializeLixoftConnectors : Initialize lixoftConnectors API for a given software.
- getDemoPath : Get the path to the demo projects.
Description of the functions concerning the plots
- getChartsData : Compute Charts data with custom stratification options and custom computation settings.
- plotBivariateDataViewer : Plot the bivariate viewer.
- plotCovariates : Plot the covariates.
- plotObservedData : Plot the observed data.
- plotBEConfidenceIntervals : Plot the individual NCA parameters vs covariates.
- plotBESequenceByPeriod : Plot the Bioequivalence parameters as Sequence-by-period.
- plotBESubjectByFormulation : Plot the Bioequivalence parameters as Subject-by-formulation.
- plotCAIndividualFits : Plot the CA individual fits.
- plotCAObservationsVsPredictions : Plot the observations vs the CA predictions.
- plotCAParametersCorrelation : Plot the correlation bewteen CA individual parameters.
- plotCAParametersDistribution : Plot the distribution of the individual CA parameters.
- plotCAParametersVsCovariates : Plot the CA individual parameters vs covariates.
- plotNCAIndividualFits : Plot the NCA individual fits (LambdaZ regression).
- plotNCAParametersCorrelation : Plot the correlation between NCA individual parameters.
- plotNCAParametersDistribution : Plot the distribution of the individual NCA parameters.
- plotNCAParametersVsCovariates : Plot the NCA individual parameters vs covariates.
- getPlotPreferences : Define the preferences to customize plots.
Description of the functions concerning the project management
- exportProject : Export the current project to another application of the MonolixSuite, and load the exported project.
- getData : Get a description of the data used in the current project.
- getInterpretedData : Get data after interpretation done by the software, how it is displayed in the Data tab in the interface.
- getLibraryModelContent : Get the content of a library model.
- getLibraryModelName : Get the name of a library model given a list of library filters.
- getMapping : Get mapping between data and model.
- getStructuralModel : Get the model file for the structural model used in the current project.
- importProject : Import a Monolix or a PKanalix project into the currently running application initialized in the connectors.
- isProjectLoaded : Get a boolean saying if a project is currently loaded.
- loadProject : Load a project in the currently running application initialized in the connectors.
- newProject : Create a new project.
- saveProject : Save the current project as a file that can be reloaded in the connectors or in the GUI.
- setData : Set project data giving a data file and specifying headers and observations types.
- setMapping : Set mapping between data and model.
- setStructuralModel : Set the structural model.
Description of the functions concerning the project settings and preferences
- getConsoleMode : Get console mode, ie volume of output after running estimation tasks.
- getPreferences : Get a summary of the project preferences.
- getProjectSettings : Get a summary of the project settings.
- setConsoleMode : Set console mode, ie volume of output after running estimation tasks.
- setPreferences : Set the value of one or several of the project preferences.
- setProjectSettings : Set the value of one or several of the settings of the project.
Description of the functions concerning the reporting
- generateReport : Generate a project report with default options or from a custom Word template.
Description of the functions concerning the results
- getBioequivalenceResults : Get results for different steps in bioequivalence analysis.
- getCACost : Get the value of the cost function minimized in CA, and additional criteria to compare models.
- getCAIndividualParameters : Get the estimated values for each subject of some of the individual CA parameters of the current project.
- getCAParameterStatistics : Get statistics over the estimated values of some of the CA parameters of the current project.
- getCAResultsStratification : Get the stratification used to compute NCA parameters statistics table.
- getNCAIndividualParameters : Get the estimated values for each subject of some of the individual NCA parameters of the current project.
- getNCAParameterStatistics : Get statistics over the estimated values of some of the NCA parameters of the current project.
- getNCAResultsStratification : Get the stratification used to compute NCA parameters stratistics table.
- getPointsIncludedForLambdaZ : Get points used to compute lambda_Z in NCA estimation.
- setCAResultsStratification : Set the stratification used to compute CA parameters statistics table.
- setNCAResultsStratification : Set the stratification used to compute NCA parameters statistics table.
Description of the functions concerning the scenario
- computeChartsData : Compute (if needed) and export the charts data of a given plot or, if not specified, all the available project plots.
- 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
. - runScenario : Run the scenario that has been set with
setScenario
. - setScenario : Clear the current scenario and build a new one from a given list of tasks.
- getCAParametersByAutoInit : Automatically estimate initial parameters values for CA.
- runBioequivalenceEstimation : Estimate the bioequivalence for the selected parameters.
- runCAEstimation : Estimate the CA parameters for each individual of the project.
- runEstimation : Run the NCA analysis and the CA analysis if the structural model for the CA calculation is defined.
- runNCAEstimation : Estimate the NCA parameters for each individual of the project.
Description of the functions concerning the settings
- getBioequivalenceSettings : Get the settings associated to the bioequivalence estimation.
- getCAInitialValues : Get the list of initial values for all parameters of the model used for compartmental analysis.
- getCASettings : Get the settings associated to the compartmental analysis.
- getDataSettings : Get the data settings associated to the non compartmental analysis.
- getNCASettings : Get the settings associated to the non compartmental analysis.
- setBioequivalenceSettings : Set the value of one or several of the settings associated to the bioequivalence estimation.
- setCAInitialValues : Set the initial values of parameters for the compartmental analysis.
- setCASettings : Set the settings associated to the compartmental analysis.
- setDataSettings : Set the value of one or several of the data settings associated to the non compartmental analysis.
- setNCASettings : Set the value of one or several of the settings associated to the non compartmental analysis.
[Monolix – PKanalix] Add an additional covariate
Description
Create an additional covariate for stratification purpose. Notice that these covariates are available only if they are not
contant through the dataset.
Available column transformations are:
[continuous] | ‘firstDoseAmount’ | (first dose amount) |
[continuous] | ‘doseNumber’ | (dose number) |
[discrete] | ‘administrationType’ | (admninistration type) |
[discrete] | ‘administrationSequence’ | (administration sequence) |
[discrete] | ‘dosingDesign’ | (dose multiplicity) |
[continuous] | ‘observationNumber’ | (observation number per individual, for a given observation type) |
Usage
addAdditionalCovariate(transformation, base = "", name = "")
Arguments
transformation |
(string) applied transformation. |
base |
(string) [optional] base data on which the transformation is applied. |
name |
(string) [optional] name of the covariate. |
See Also
Click here to see examples
# ## Not run: addAdditionalCovariate("firstDoseAmount") addAdditionalCovariate(transformation = "observationNumberPerIndividual", headerName = "CONC") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Apply filter
Description
Apply a filter on the current data.
Usage
applyFilter(filter, name = "")
Arguments
filter |
(list< list< action = "headerName-comparator-value" > > or "complement") filter definition. Existing actions are "selectLines", "selectIds", "removeLines" and "removeIds". First vector level is for set unions, the second one for set intersection. It is possible to give only a list of actions if there is only no high-level union. |
name |
(string) [optional] created data set name. If not defined, the default name is "currentDataSet_filtered". |
Details
The possible actions are line selection (selectLines), line removal (removeLines), Ids selection (selectIds) or removal (removeIds).
The selection is a string containing the header name, a comparison operator and a value
selection = <string> "headerName*-comparator**-value" (ex: "id==’100’", "WEIGHT<70", "SEX!=’M’")
Notice that :
– The headerName corresponds to the data set header or one of the header aliases defined in MONOLIX software preferences
– The comparator possibilities are "==", "!=" for all types of value and "<=", "<", ">=", ">" only for numerical types
Syntax:
* apply a simple filter:
applyFilter( filter = list(act = sel)), e.g. applyFilter( filter = list(removeIds = "WEIGHT<50"))
=> apply a filter with the action act on the selection sel. In this example, we apply a filter that removes all subjects with a weight less than 50.
* apply a filter with several concurrent conditions, i.e AND condition:
applyFilter( list(act1 = sel1, act2 = sel2)), e.g. applyFilter( filter = list(removeIds = "WEIGHT<50", removeIds = " AGE<20"))
=> apply a filter with both the action act1 on sel1 AND the action act2 on sel2. In this example, we apply a filter that removes all subjects with a weight less than 50 and an age less than 20.
It corresponds to the intersecton of the subjects with a weight less than 50 and the subjects with an age less than 20.
* apply a filter with several non-concurrent conditions, i.e OR condition:
applyFilter(filter = list(list(act1 = sel1), list(act2 = sel2)) ), e.g. applyFilter( filter = list(list(removeIds = "WEIGHT<50"),list(removeIds = " AGE<20")))
=> apply a filter with the action act1 on sel1 OR the action act2 on sel2. In this example, we apply a filter that removes all subjects with a weight less than 50 and an age less than 20.
It corresponds to the union of the subjects with a weight less than 50 and the subjects with an age less than 20.
* It is possible to have any combination:
applyFilter(filter = list(list(act1 = sel1), list(act2 = sel2, act3 = sel3)) ) <=> act1,sel1 OR ( act2,sel2 AND act3,sel3 )
* It is possible to apply the complement of an existing filter:
applyFilter(filter = "complement")
See Also
getAvailableData createFilter removeFilter
Click here to see examples
# ## Not run: ---------------------------------------------------------------------------------------- LINE [ int ] applyFilter( filter = list(removeLines = "line>10") ) # keep only the 10th first rows ---------------------------------------------------------------------------------------- ID [ string | int ] If there are only integer identifiers within the data set, ids will be considered as integers. On the contrary, they will be treated as strings. applyFilter( filter = list(selectIds = "id==100") ) # select the subject called '100' applyFilter( filter = list(list(removeIds = "id!='id_2'")) ) # select all the subjects excepted the one called 'id_2' ---------------------------------------------------------------------------------------- ID INDEX [int] applyFilter( filter = list(list(removeIds = "idIndex!=2"), list(selectIds = "id<5")) ) # select the 4 first subjects excepted the second one ---------------------------------------------------------------------------------------- OCC [ int ] applyFilter( filter = list(selectIds = "occ1==1", removeIds = "occ2!=3") ) # select the subjects whose first occasion level is '1' and whose second one is different from '3' ---------------------------------------------------------------------------------------- TIME [ double ] applyFilter( filter = list(removeIds='TIME>120') ) # remove the subjects who have time over 120 applyFilter( filter = list(selectLines='TIME>120') ) # remove the all the lines where the time is over 120 ---------------------------------------------------------------------------------------- OBSERVATION [ double ] applyFilter( filter = list(selectLines = "CONC>=5.5", removeLines = "CONC>10")) # select the lines where CONC value superior or equal to 5.5 or strictly higher than 10 applyFilter( filter = list(removeIds = "CONC<0") ) # remove subjects who have negative CONC values applyFilter( filter = list(removeIds = "E==0") ) # remove subjects for who E equals 0 ---------------------------------------------------------------------------------------- OBSID [ string ] applyFilter( filter = list(removeIds = "y1==1") ) # remove subject who have at least one observation for y1 applyFilter( filter = list(selectLines = "y1!=2") ) # select all lines corresponding to observations exepected those for y2 ---------------------------------------------------------------------------------------- AMOUNT [ double ] applyFilter( filter = list(selectIds = "AMOUT==10") ) # select subjects who have a dose equals to 10 ---------------------------------------------------------------------------------------- INFUSION RATE AND INFUSION DURATION [ double ] applyFilter( filter = list(selectIds = "RATE<10") ) # select subjects who have dose with a rate less than 10 ---------------------------------------------------------------------------------------- COVARIATE [ string (categorical) | double (continuous) ] applyFilter( filter = list(selectIds = "SEX==M", selectIds = "WEIGHT<80") ) # select subjects who are men and whose weight is lower than 80kg ---------------------------------------------------------------------------------------- REGERSSOR [ double ] applyFilter( filter = list(selectLines = "REG>10") ) # select the lines where the regressor value is over 10 ---------------------------------------------------------------------------------------- COMPLEMENT applyFilter(origin = "data_filtered", filter = "complement" ) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Create filter
Description
Create a new filtered data set by applying a filter on an existing one and/or complementing it.
Usage
createFilter(filter, name = "", origin = "")
Arguments
filter |
(list< list< action = "headerName-comparator-value" > > or "complement") [optional] filter definition. Existing actions are "selectLines", "selectIds", "removeLines" and "removeIds". First vector level is for set unions, the second one for set intersection. It is possible to give only a list of actions if there is only no high-level union. |
name |
(string) [optional] created data set name. If not defined, the default name is "currentDataSet_filtered". |
origin |
(string) [optional] name of the data set to be filtered. The current one is used by default. |
Details
The possible actions are line selection (selectLines), line removal (removeLines), Ids selection (selectIds) or removal (removeIds).
The selection is a string containing the header name, a comparison operator and a value
selection = <string> "headerName*-comparator**-value" (ex: "id==’100’", "WEIGHT<70", "SEX!=’M’")
Notice that :
– The headerName corresponds to the data set header or one of the header aliases defined in MONOLIX software preferences
– The comparator possibilities are "==", "!=" for all types of value and "<=", "<", ">=", ">" only for numerical types
Syntax:
* create a simple filter:
createFilter( filter = list(act = sel)), e.g. createFilter( filter = list(removeIds = "WEIGHT<50"))
=> create a filter with the action act on the selection sel. In this example, we create a filter that removes all subjects with a weight less than 50.
* create a filter with several concurrent conditions, i.e AND condition:
createFilter( list(act1 = sel1, act2 = sel2)), e.g. createFilter( filter = list(removeIds = "WEIGHT<50", removeIds = " AGE<20"))
=> create a filter with both the action act1 on sel1 AND the action act2 on sel2. In this example, we create a filter that removes all subjects with a weight less than 50 and an age less than 20.
It corresponds to the intersecton of the subjects with a weight less than 50 and the subjects with an age less than 20.
* create a filter with several non-concurrent conditions, i.e OR condition:
createFilter(filter = list(list(act1 = sel1), list(act2 = sel2)) ), e.g. createFilter( filter = list(list(removeIds = "WEIGHT<50"),list(removeIds = " AGE<20")))
=> create a filter with the action act1 on sel1 OR the action act2 on sel2. In this example, we create a filter that removes all subjects with a weight less than 50 and an age less than 20.
It corresponds to the union of the subjects with a weight less than 50 and the subjects with an age less than 20.
* It is possible to have any combinaison:
createFilter(filter = list(list(act1 = sel1), list(act2 = sel2, act3 = sel3)) ) <=> act1,sel1 OR ( act2,sel2 AND act3,sel3 )
* It is possible to create the complement of an existing filter:
createFilter(filter = "complement")
See Also
Click here to see examples
# ## Not run: ---------------------------------------------------------------------------------------- LINE [ int ] createFilter( filter = list(removeLines = "line>10") ) # keep only the 10th first rows ---------------------------------------------------------------------------------------- ID [ string | int ] If there are only integer identifiers within the data set, ids will be considered as integers. On the contrary, they will be treated as strings. createFilter( filter = list(selectIds = "id==100") ) # select the subject called '100' createFilter( filter = list(list(removeIds = "id!='id_2'")) ) # select all the subjects excepted the one called 'id_2' ---------------------------------------------------------------------------------------- ID INDEX [int] createFilter( filter = list(list(removeIds = "idIndex!=2"), list(selectIds = "id<5")) ) # select the 4 first subjects excepted the second one ---------------------------------------------------------------------------------------- OCC [ int ] createFilter( filter = list(selectIds = "occ1==1", removeIds = "occ2!=3") ) # select the subjects whose first occasion level is '1' and whose second one is different from '3' ---------------------------------------------------------------------------------------- TIME [ double ] createFilter( filter = list(removeIds='TIME>120') ) # remove the subjects who have time over 120 createFilter( filter = list(selectLines='TIME>120') ) # remove the all the lines where the time is over 120 ---------------------------------------------------------------------------------------- OBSERVATION [ double ] createFilter( filter = list(selectLines = "CONC>=5.5", removeLines = "CONC>10")) # select the lines where CONC value superior or equal to 5.5 or strictly higher than 10 createFilter( filter = list(removeIds = "CONC<0") ) # remove subjects who have negative CONC values createFilter( filter = list(removeIds = "E==0") ) # remove subjects for who E equals 0 ---------------------------------------------------------------------------------------- OBSID [ string ] createFilter( filter = list(removeIds = "y1==1") ) # remove subject who have at least one observation for y1 createFilter( filter = list(selectLines = "y1!=2") ) # select all lines corresponding to observations exepected those for y2 ---------------------------------------------------------------------------------------- AMOUNT [ double ] createFilter( filter = list(selectIds = "AMOUT==10") ) # select subjects who have a dose equals to 10 ---------------------------------------------------------------------------------------- INFUSION RATE AND INFUSION DURATION [ double ] createFilter( filter = list(selectIds = "RATE<10") ) # select subjects who have dose with a rate less than 10 ---------------------------------------------------------------------------------------- COVARIATE [ string (categorical) | double (continuous) ] createFilter( filter = list(selectIds = "SEX==M", selectIds = "WEIGHT<80") ) # select subjects who are men and whose weight is lower than 80kg ---------------------------------------------------------------------------------------- REGERSSOR [ double ] createFilter( filter = list(selectLines = "REG>10") ) # select the lines where the regressor value is over 10 ---------------------------------------------------------------------------------------- COMPLEMENT createFilter(origin = "data_filtered", filter = "complement" ) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Delete additional covariate
Description
Delete a created additinal covariate.
Usage
deleteAdditionalCovariate(name)
Arguments
name |
(string) name of the covariate. |
See Also
Click here to see examples
# ## Not run: deleteAdditionalCovariate("firstDoseAmount")\cr deleteAdditionalCovariate("observationNumberPerIndividual_y1") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Delete filter
Description
Delete a data set. Only filtered data set which are not active and whose children are not active either can be deleted.
Usage
deleteFilter(name)
Arguments
name |
(string) data set name. |
See Also
Click here to see examples
# ## Not run: deleteFilter(name = "filter2") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Edit filter
Description
Edit the definition of an existing filtered data set. Refere to createFilter for more details about syntax, allowed parameters and examples.
Notice that all the filtered data set which depend on the edited one will be deleted.
Usage
editFilter(filter, name = "")
Arguments
filter |
(list< list< action = "headerName-comparator-value" > >) filter definition. |
name |
(string) [optional] data set name to edit (current one by default) |
See Also
[Monolix – PKanalix] Adapt and export a data file as a MonolixSuite formatted data set.
Description
Adapt and export a data file as a MonolixSuite formatted data set.
Usage
formatData( dataFile, formattedFile, headerLines = 1, headers, linesToExclude = NULL, observationSettings = NULL, observations = NULL, treatmentSettings = NULL, treatments = NULL, additionalColumns = NULL )
Arguments
dataFile |
(string) Path to the original data file. |
formattedFile |
(string) Path to the data file that will be exported (must end with the .csv extension). |
headerLines |
(optional) (int or vector<int>) Line numbers containing headers (if multiple numbers are given, formatted headers will contain values from all header lines concatenated with the "_" character) – default: 1. |
headers |
(list) List of headers containing information about ID, time, volume (in case of urine data) and sort columns.
|
linesToExclude |
(optional) (int or vector<int>) Numbers of lines that should be removed from the data set. |
observationSettings |
(optional) (list) List containing settings applied when different observation columns are merged into a single column.
|
observations |
(optional) (list) List of lists containing information about different observation types:
|
treatmentSettings |
(optional) (list) List containing settings applied to all treatments.
|
treatments |
(optional) (list) List that can contain lists with information about different treatments or strings with paths to files that contain treatment information. Lists with information about different treatments need to have the following elements:
|
additionalColumns |
(optional) (string or vector<string>) Path(s) to the file(s) containing additional columns (needs to have the ID column). |
Details
Data formatting can be performed as in the Data Formatting Tab of Monolix and PKanalix interface. Look at the examples to see how each data formatting demo project could be created with the connectors.
Click here to see examples
# # example: create a new project with a dataset to format: initializeLixoftConnectors(software = "pkanalix") FormattedDataPath = tempfile("formatted_data", fileext = ".csv") formatData(paste0(getDemoPath(),"/0.data_formatting/data/units_BLQ_tags_data.csv"), formattedFile = FormattedDataPath, headerLines = c(1,2), headers = c(id="ID", time="TIME_h"), observations = list(header="CONC_mg_L", censoring = list(type="interval", tags = c("BLQ"), limits=list(0,"LLOQ_mg_L"))), treatments = list(times=0, amount=100)) colnames(read.csv(FormattedDataPath)) # to check column names of the generated file and tag them as desired newProject(data = list(dataFile = FormattedDataPath, headerTypes = c("id","time","observation","contcov","contcov","catcov","ignore","amount","cens","limit"))) plotObservedData() # demo merge_occ_ParentMetabolite.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/parent_metabolite_data.csv"), formattedFile = FormattedDataPath, headers = c(id="ID", time="TIME"), observations = list(list(header="PARENT", censoring = list(type="interval", tags = c("BLQ"), limits=list(0,0.01))), list(header="METABOLITE")), observationSettings = list(distinguishWithObsId = FALSE), treatments = list(times=0, amount="DOSE")) # demo merge_obsID_ParentMetabolite.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/parent_metabolite_data.csv"), formattedFile = FormattedDataPath, headers = c(id="ID", time="TIME"), observations = list(list(header="PARENT", censoring = list(type="interval", tags = c("BLQ"), limits=list(0,0.01))), list(header="METABOLITE")), treatments = list(times=0, amount="DOSE")) # demo DoseAndLOQ_byCategory.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/units_BLQ_tags_data.csv"), formattedFile = FormattedDataPath, headerLines = c(1,2), headers = c(id="ID", time="TIME_h"), observations = list(header="CONC_mg_L", censoring = list(type="interval", tags = c("BLQ"), limits=list(0,list(category="STUDY", values=list("SD_400mg"=0.01, "SD_500mg"=0.1, "SD_600mg"=0.1))))), treatments = list(times=0, amount=list(category="STUDY", values=list("SD_400mg"=400, "SD_500mg"=500, "SD_600mg"=600)))) # demo DoseAndLOQ_fromData.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/units_BLQ_tags_data.csv"), formattedFile = FormattedDataPath, headerLines = c(1,2), headers = c(id="ID", time="TIME_h"), observations = list(header="CONC_mg_L", censoring = list(type="interval", tags = c("BLQ"), limits=list(0,"LLOQ_mg_L"))), treatments = list(times=0, amount="STUDY")) # demo DoseAndLOQ_manual.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/units_multiple_BLQ_tags_data.csv"), formattedFile = FormattedDataPath, headerLines = c(1,2), headers = c(id="ID", time="TIME_h"), observations = list(header="CONC_mg_L", censoring = list(list(type="interval", tags = c("BLQ1"), limits=list(0,0.06)), list(type="interval", tags = c("BLQ2"), limits=list(0,0.1)))), treatments = list(times=0, amount=600)) # demo Urine_LOQinObs.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/urine_LOQinObs_data.csv"), formattedFile = FormattedDataPath, headers = c(id="ID", start="START_TIME", end="END_TIME", volume="VOLUME"), observations = list(header="CONC", censoring=list(type="LLOQ", tags="<LOQ=1>", limits="CONC")), treatments = list(paste0(getDemoPath(),"/0.data_formatting/data/urine_data_doses.csv"))) # demo CreateOcc_AdmIdbyCategory.pkx formatData(paste0(getDemoPath(),"/0.data_formatting/data/two_formulations_data.csv"), formattedFile = FormattedDataPath, linesToExclude = 1, headerLines = c(2,3), headers = c(id="ID", time="TIME_h", sort="FORM"), observations = list(header="CONC_mg_L", censoring=list(type="LLOQ", tags="BLQ", limits=0.06)), treatments = list(times=0, amount=600, admId=list(category="FORM", values=list("ref"=1,"test"=2)))) # MONOLIX EXAMPLES initializeLixoftConnectors(software = "monolix") FormattedDataPath = tempfile("formatted_data") # demo doseIntervals_as_Occ.mlxtran formatData(paste0(getDemoPath(),"/0.data_formatting/data/data_multidose.csv"), formattedFile = FormattedDataPath, headers = c(id="ID", time="TIME"), observations = list(header="CONC"), treatments = list(times=seq(0,by=12,length=7), amount=40), treatmentSettings = list(doseIntervalsAsOccasions = TRUE)) # demo warfarin_PKPDseq_project.mlxtran formatData(paste0(getDemoPath(),"/0.data_formatting/data/warfarin_data.csv"), formattedFile = FormattedDataPath, headers = c(id="id", time="time"), additionalColumns = paste0(getDemoPath(),"/0.data_formatting/data/warfarinPK_regressors.txt"))
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get data sets descriptions
Description
Get information about the data sets and filters defined in the project.
Usage
getAvailableData()
Value
A list containing a list containing elements that describe the data set:
-
name
: a string, the name of the data set -
file
: a string, the path of the data set file -
current
: a boolean indicating if the data set is applied (currently in use) -
children
: a list containing lists with information about data sets created from this one using filters -
filter
(only if the dataset was created using filters): a list containing name of theparent
and details about filterdefinition
Click here to see examples
# ## Not run: getAvailableData() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get covariates information
Description
Get the name, the type and the values of the covariates present in the project.
Usage
getCovariateInformation()
Value
A list containing the following fields :
- name (vector<string>): covariate names
- type (vector<string>): covariate types. Existing types are "continuous", "continuoustransformed", "categorical", "categoricaltransformed"./
In Monolix mode, "latent" covariates are also allowed. - [Monolix] modalityNumber (vector<int>): number of modalities (for latent covariates only)
- covariate: a data frame giving the values of continuous and categorical covariates for each subject.
Latent covariate values exist only if they have been estimated, ie if the covariate is used and if the population parameters have been estimated.
Call getEstimatedIndividualParameters to retrieve them.
Click here to see examples
# ## Not run: info = getCovariateInformation() # Monolix mode with latent covariates info -> $name c("sex","wt","lcat") -> $type c(sex = "categorical", wt = "continuous", lcat = "latent") -> $modalityNumber c(lcat = 2) -> $covariate id sex wt 1 M 66.7 . . . N F 59.0 ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get data formatting from a loaded project
Description
Get data formatting from a loaded project.
Usage
getFormatting()
[Monolix – PKanalix] Get observations information
Description
Get the name, the type and the values of the observations present in the project.
Usage
getObservationInformation()
Value
A list containing the following fields :
- name (vector<string>): observation names.
- type (vector<string>): observation generic types. Existing types are "continuous", "discrete", "event".
- [Monolix] detailedType (vector<string>): observation specialized types set in the structural model. Existing types are "continuous", "bsmm", "wsmm", "categorical", "count", "exactEvent", "intervalCensoredEvent".
- [Monolix] mapping (vector<string>): mapping between the observation names (defined in the mlxtran project) and the name of the corresponding entry in the data set.
- ["obsName"] (data.frame): observation values for each observation id.
In PKanalix mode, the observation type is not provided as only continuous observations are allowed. Neither do the mapping as dataset names are always used.
Click here to see examples
# ## Not run: info = getObservationInformation() info -> $name c("concentration") -> $type # [Monolix] c(concentration = "continuous") -> $detailedType # [Monolix] c(concentration = "continuous") -> $mapping # [Monolix] c(concentration = "CONC") -> $concentration id time concentration 1 0.5 0.0 . . . N 9.0 10.8 ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get treatments information
Description
Get information about doses present in the loaded dataset.
Usage
getTreatmentsInformation()
Value
A dataframe whose columns are:
- id and occasion level names (string)
- time (double)
- amount (double)
- [optional] administrationType (int)
- [optional] infusionTime (double)
- [optional] isArtificial (bool): is created from SS or ADDL column
- [optional] isReset (bool): IOV case only
Click here to see examples
# { ## Not run: initializeLixoftConnectors("monolix") project_name <- file.path(getDemoPath(), "6.PK_models", "6.3.multiple_doses", "ss1_project.mlxtran") loadProject(project_name) getTreatmentsInformation() ## End(Not run) }
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Remove filter
Description
Remove the last filter applied on the current data set.
Usage
removeFilter()
See Also
Click here to see examples
# ## Not run: removeFilter() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Rename additional covariate
Description
Rename an existing additional covariate.
Usage
renameAdditionalCovariate(oldName, newName)
Arguments
oldName |
(string) current name of the covariate to rename |
newName |
(string) new name. |
See Also
Click here to see examples
# ## Not run: renameAdditionalCovariate(oldName = "observationNumberPerIndividual_y1", newName = "nbObsForY1") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Rename filter
Description
Rename an existing filtered data set.
Usage
renameFilter(newName, oldName = "")
Arguments
newName |
(string) new name. |
oldName |
(string) [optional] current name of the filtered data set to rename (current one by default) |
See Also
Click here to see examples
# ## Not run: renameFilter("newFilter")\cr renameFilter(oldName = "filter", newName = "newFilter") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Select data set
Description
Select the new current data set within the previously defined ones (original and filters).
Usage
selectData(name)
Arguments
name |
(string) data set name. |
See Also
Click here to see examples
# ## Not run: selectData(name = "filter1") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get data used for CA computation.
Description
Get the data as it is used for CA.
Usage
getCAData()
Click here to see examples
# ## Not run: data = getCAData() ID time concentration censored 1 1 0.0 0.00 FALSE 2 1 0.5 3.05 FALSE 3 1 2.0 5.92 TRUE ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get data used for NCA estimation
Description
Get the data as it is used for NCA.
Usage
getNCAData()
Click here to see examples
# ## Not run: data = getNCAData() ID time concentration censored 1 1 0.0 0.00 FALSE 2 1 0.5 3.05 FALSE 3 1 2.0 5.92 TRUE ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Initialize lixoftConnectors API
Description
Initialize lixoftConnectors API for a given software.
Usage
initializeLixoftConnectors(software = "monolix", path = "", force = FALSE)
Arguments
software |
(character) [optional] Name of the software to be loaded. By default, "monolix" software is used. |
path |
(character) [optional] Path to installation directory of the Lixoft suite. If lixoftConnectors library is not already loaded and no path is given, the directory written in the lixoft.ini file is used for initialization. |
force |
(bool) [optional] Should software switch security be overpassed or not. Equals FALSE by default. |
Value
A boolean equaling TRUE if the initialization has been successful and FALSE if not.
Click here to see examples
# ## Not run: initializeLixoftConnectors(software = "monolix", path = "/path/to/lixoftRuntime/") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get Lixoft demos path
Description
Get the path to the demo projects. The path depends on the software used to initialize the connectors with initializeLixoftConnectors.
Usage
getDemoPath()
Value
A string corresponding to Lixoft demos path corresponding to the currently active software.
Click here to see examples
# ## Not run: getDemoPath() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Compute Charts data with custom stratification options and
custom computation settings
Description
Compute Charts data with custom stratification options and custom computation settings.
Usage
getChartsData( plotName, computeSettings = NULL, ids = NULL, splitGroup = NULL, colorGroup = NULL, filter = NULL )
Arguments
plotName |
(string) Name of the plot function. |
computeSettings |
(list) list with computational settings (it can include arguments from the settings argument of the plot, as well as obsName) |
ids |
list of ids to display (by default all ids are displayed). |
splitGroup |
data group criteria. a list, or a list of list with fields:
(by default no split is applied). |
colorGroup |
data group criteria. a list, or a list of list with fields:
(by default no color group is defined). |
filter |
data filtering criteria. a list, or a list of list with fields:
(by default no filtering is applied). |
Value
A dataframe object or a list of dataframe object to pass to "data" argument
of plot functions
Click here to see examples
# ## Not run: initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) data <- getChartsData(plotName = "plotObservedData", ids = c(1, 2, 3, 4)) data <- getChartsData(plotName = "plotNCAParametersCorrelation") initializeLixoftConnectors(software = "monolix") project <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "theophylline_project.mlxtran") loadProject(project) xBinsSettings <- list(is.fixedNbBins = TRUE, nbBins = 10) data <- getChartsData(plotName = "plotVpc", computeSettings = list(xBinsSettings = xBinsSettings)) data <- getChartsData(plotName = "plotVpc", computeSettings = list(level = 75)) splitGroup <- list(name = "WEIGHT", breaks = c(75)) filter <- list(name = "WEIGHT", interval = c(75, 100)) data <- getChartsData(plotName = "plotVpc", splitGroup = splitGroup) data <- getChartsData(plotName = "plotVpc", filter = filter) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Generate Bivariate observations plots
Description
Plot the bivariate viewer.
Usage
plotBivariateDataViewer( obs1 = NULL, obs2 = NULL, data = NULL, settings = list(), stratify = list(), preferences = list() )
Arguments
obs1 |
(string) Name of the observation to display in x axis (in dataset header). By default the first observation is considered. |
obs2 |
(string) Name of the observation to display in y axis (in dataset header). By default the second observation is considered. |
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotBivariateDataViewer", …)) If data not specified, charts data will be computed inside the function. |
settings |
List with the following settings
|
stratify |
List with the stratification arguments
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotBivariateDataViewer") to check available displays. |
Value
A ggplot object
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "monolix") project <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPKPD_project.mlxtran") loadProject(project) plotBivariateDataViewer(obs1 = "y1", obs2 = "y2") plotBivariateDataViewer(settings = list(lines = FALSE)) # stratification plotBivariateDataViewer(obs1 = "y1", obs2 = "y2", stratify = list(ids = "10")) plotBivariateDataViewer(stratify = list(splitGroup = list(name = "age", breaks = 25), filter = list(name = "sex", cat = 1))) plotBivariateDataViewer(stratify = list(colorGroup = list(name = "wt", breaks = 75))) plotBivariateDataViewer(stratify = list(splitGroup = list(list(name = "age", breaks = 25), list(name = "sex")))) # update plot settings or preferences plotBivariateDataViewer(preferences = list(obs = list(color = "#32CD32")))
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Generate Covariate plots
Description
Plot the covariates.
Usage
plotCovariates( covariatesRows = NULL, covariatesColumns = NULL, data = NULL, settings = list(), preferences = list(), stratify = list() )
Arguments
covariatesRows |
vector with the name of covariates to display on rows (by default the first 4 covariates are displayed). |
covariatesColumns |
vector with the name of covariates to display on columns (by default the first 4 covariates are displayed). |
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotCovariates", …)) If data not specified, charts data will be computed inside the function. |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotCovariates") to check available displays. |
stratify |
List with the stratification arguments
|
Details
Generate scatterplots between two continuous covariates or bar plot between categorical covariates.
Value
- A ggplot object if one element in covariatesRows and covariatesColumns,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) # covariate distribution when only one covariate is specified plotCovariates(covariatesRows = "HT", settings = list(bins = 10)) # scatter plot when both covariates are continuous plotCovariates(covariatesRows = "HT", covariatesColumns = "AGE", settings = list(spline = TRUE)) plotCovariates(covariatesRows = "HT", covariatesColumns = c("AGE", "FORM")) # box plot when one covariate is categorical and the othe one is continuous preferences <- list(boxplot = list(fill = "#2075AE"), boxplotOutlier = list(shape = 3)) plotCovariates(covariatesRows = "FORM", covariatesColumns = "AGE", preferences = preferences) # histogram when covariate on column is categorical plotCovariates(covariatesRows = "FORM", covariatesColumns = "SEQ", settings = list(histogramColors = c("#5DC088", "#DBA92B"))) plotCovariates(covariatesRows = "AGE", covariatesColumns = "SEQ", settings = list(histogramColors = c("#5DC088", "#DBA92B"))) # stratification plotCovariates(covariatesRows = "HT", covariatesColumns = "WT", stratify = list( splitGroup = list(name = "AGE", breaks = 25), filter = list(name = "Period", cat = 1))) preferences <- list(regressionLine = list(color = "#E5551B")) plotCovariates(covariatesRows = "AGE", covariatesColumns = "WT", stratify = list( colorGroup = list(name = "HT", breaks = 181), colors = c("#2BB9DB", "#DD6BD2")), preferences = preferences) plotCovariates(covariatesRows = "HT", covariatesColumns = "WT", stratify = list(splitGroup = list(list(name = "AGE", breaks = 25), list(name = "SEQ")))) # Mulitple covariates plotCovariates() plotCovariates(covariatesRows = c("AGE", "SEQ", "HT"), covariatesColumns = c("AGE", "SEQ", "HT")) plotCovariates(stratify = list(filter = list(name = "AGE", interval = c(20, 30)))) plotCovariates(stratify = list(splitGroup = list(name = "AGE", breaks = c(25)))) plotCovariates(stratify = list(colorGroup = list(name = "AGE", breaks = c(25))))
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Generate Observation plots
Description
Plot the observed data.
Usage
plotObservedData( obsName = NULL, data = NULL, settings = list(), stratify = list(), preferences = list() )
Arguments
obsName |
(string) Name of the observation (in dataset header). By default the first observation is considered. |
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotObservedData", …)) If data not specified, charts data will be computed inside the function. |
settings |
List with the following settings [CONTINUOUS – DISCRETE] Settings specific to continuous and discrete data
[DISCRETE] Settings specific to discrete data
[EVENT] Settings specific to event data
Other settings
|
stratify |
List with the stratification arguments
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotObservedData") to check available displays. |
Value
A ggplot object
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) plotObservedData() plotObservedData(settings = list(binLimits = TRUE)) plotObservedData(settings = list(dosingTimes = TRUE)) plotObservedData(settings = list(meanMethod = "geometric", mean = TRUE)) plotObservedData(settings = list(mean = TRUE, error = TRUE, dots = FALSE, lines = TRUE)) # stratification plotObservedData(stratify = list(splitGroup = list(name = "AGE", breaks = 25), filter = list(name = "Period", cat = 1))) plotObservedData(stratify = list(colorGroup = list(name = "HT", breaks = 181))) plotObservedData(stratify = list(splitGroup = list(list(name = "AGE", breaks = 25), list(name = "Period")))) # update plot theme or preferences plotObservedData(settings = list(xlab = "Time", ylab = "Plasma Concentration")) plotObservedData(preferences = list(obs = list(color = "#32CD32"), observationStatistics = list(lineType = "dashed")))
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Individual NCA parameter vs covariate plot
Description
Plot the individual NCA parameters vs covariates.
Usage
plotBEConfidenceIntervals( parameters = NULL, formulations = NULL, settings = list(), preferences = NULL, data = NULL )
Arguments
parameters |
vector of bioequivalence parameters to display. (by default the first 4 computed parameters are displayed). |
formulations |
vector of test formulations to display. (by default the first 4 test formulations are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotBEConfidenceIntervals") to check available displays. |
data |
Charts data as dataframe – Output of getChartsData (getChartsData("plotBESubjectByFormulation", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one parameter,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runNCAEstimation() runBioequivalenceEstimation() plotBEConfidenceIntervals() plotBEConfidenceIntervals(parameters = "Cmax", settings = list(legend = T)) # pre compute dataset data <- getChartsData(plotName = "plotBEConfidenceIntervals") plotBEConfidenceIntervals(data = data) parameters <- c("AUClast", "Cmax") plotBEConfidenceIntervals(parameters = parameters)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Plot the Bioequivalence Sequence-by-period
Description
Plot the Bioequivalence parameters as Sequence-by-period.
The https://pkanalix.lixoft.com/bioequivalence/sequence-by-period-plot/sequence-by-period plot allows to visualize, for each parameter, the mean and standard deviation for each period, sequence and formulation.
Usage
plotBESequenceByPeriod( parameters = NULL, settings = list(), preferences = NULL, stratify = list(), data = NULL )
Arguments
parameters |
vector of bioequivalence parameters to display. (by default the first 4 computed parameters are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotBESequenceByPeriod") to check available displays. |
stratify |
List with the stratification arguments
|
data |
Charts data as dataframe – Output of getChartsData (getChartsData("plotBESequenceByPeriod", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one parameter,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "3.bioequivalence/project_crossover_bioequivalence.pkx") loadProject(project) runNCAEstimation() runBioequivalenceEstimation() plotBESequenceByPeriod(parameters = "Cmax", settings = list(legend = T)) # stratification plotBESequenceByPeriod( parameters = "AUClast", stratify = list(filter = list(name = "AGE", interval = c(25, 30))) ) plotBESequenceByPeriod( parameters = "AUClast", stratify = list(splitGroup = list(name = "AGE", breaks = c(25))) ) plotBESequenceByPeriod( parameters = "AUClast", settings=list(legend=T), stratify = list(splitGroup=list(list(name = "AGE", breaks = 25), list(name = "WT", breaks = 75))) ) # update settings and preferences plotBESequenceByPeriod( parameters = "Cmax", settings = list(legend = T, error = F) ) preferences <- list(sequence = list(lineType = "dashed")) plotBESequenceByPeriod(parameter = "Cmax", preferences = preferences) # pre compute dataset data <- getChartsData(plotName = "plotBESequenceByPeriod") plotBESequenceByPeriod(data = data) parameters <- c("AUClast", "Cmax") plotBESequenceByPeriod() plotBESequenceByPeriod(parameters = parameters)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Plot Bioequivalence Formulation parameters
Description
Plot the Bioequivalence parameters as Subject-by-formulation.
Usage
plotBESubjectByFormulation( parameters = NULL, formulations = NULL, settings = list(), preferences = NULL, stratify = list(), data = NULL )
Arguments
parameters |
vector of bioequivalence parameters to display. (by default the first 4 computed parameters are displayed). |
formulations |
list of test formulations to display. (by default the first 4 test formulations are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotBESubjectByFormulation") to check available displays. |
stratify |
List with the stratification arguments
|
data |
Charts data as dataframe – Output of getChartsData (getChartsData("plotBESubjectByFormulation", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one parameter,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runNCAEstimation() runBioequivalenceEstimation() plotBESubjectByFormulation(parameters = "Cmax", settings = list(legend = T)) # stratification plotBESubjectByFormulation( parameters = "AUClast", stratify = list(filter = list(name = "AGE", interval = c(25, 30))) ) plotBESubjectByFormulation( parameters = "AUClast", stratify = list(splitGroup = list(name = "AGE", breaks = c(25))) ) plotBESubjectByFormulation( parameters = "AUClast", stratify = list(colorGroup = list(name = "AGE", breaks = c(25))), settings = list(legend = T) ) plotBESubjectByFormulation( parameters = "AUClast", stratify = list(colorGroup = list(name = "ID")), settings = list(legend = T) ) plotBESubjectByFormulation( parameters = "AUClast", settings=list(legend=T), stratify = list(splitGroup=list(list(name = "AGE", breaks = 25), list(name = "WT", breaks = 75))) ) # update settings and preferences plotBESubjectByFormulation( parameters = "Cmax", settings = list(legend = T, lines = F) ) preferences <- list(formulationLine = list(lineType = "dashed")) plotBESubjectByFormulation(parameter = "Cmax", preferences = preferences) # pre compute dataset data <- getChartsData(plotName = "plotBESubjectByFormulation") plotBESubjectByFormulation(data = data) parameters <- c("AUClast", "Cmax") plotBESubjectByFormulation() plotBESubjectByFormulation(parameters = parameters)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Generate CA Fit plots
Description
Plot the CA individual fits.
Usage
plotCAIndividualFits( obsName = NULL, settings = list(), preferences = list(), stratify = list(), data = NULL )
Arguments
obsName |
(string) Name of the observation (in dataset header). By default the first observation is considered. |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotCAIndividualFits") to check available displays. |
stratify |
List with the stratification arguments
|
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotCAIndividualFits", …)) If data not specified, charts data will be computed inside the function. |
Value
A ggplot object
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runCAEstimation() plotCAIndividualFits() # display plotCAIndividualFits(stratify = list(ids = c(1, 2, 3)), settings = list(obsDots = T, indivFits = T)) plotCAIndividualFits(stratify = list(ids = c(1, 2, 3)), settings = list(obsDots = F, obsLines = T, cens = T, indivFits = T)) # stratification plotCAIndividualFits(stratify = list(ids = c(1, 2, 3, 4), filter = list(name = "Period", cat = 1))) plotCAIndividualFits(stratify = list(ids = c(1, 2, 3, 4, 5), colorGroup = list(name = "SEQ"), colors = c("#5DC088", "#DBA92B"))) plotCAIndividualFits(settings=list(legend=T), stratify = list(ids = c(1, 2, 3, 4, 5), colorGroup=list(list(name = "AGE", breaks = 25), list(name = "Period")))) # update settings and preferences plotCAIndividualFits(stratify = list(ids = c(1, 4)), settings = list(ylog = F, scales = "fixed")) plotCAIndividualFits(settings = list(ncol = 5)) preferences <- list(censObsIntervals = list(opacity = 1, lineWidth = 0.5)) plotCAIndividualFits(stratify = list(ids = c(4, 5, 6)), preferences = preferences) # pre compute dataset data <- getChartsData(plot = "plotCAIndividualFits", ids = c(1, 2)) plotCAIndividualFits(data = data)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Plot observations vs the CA predictions.
Description
Plot the observations vs the CA predictions.
Usage
plotCAObservationsVsPredictions( obsName = NULL, settings = list(), preferences = list(), stratify = list(), data = NULL )
Arguments
obsName |
(string) Name of the observation (in dataset header). By default the first observation is considered. |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotObservationsVsPredictions") to check available displays. |
stratify |
List with the stratification arguments
|
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotObservationsVsPredictions", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one prediction type,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "1.basic_examples", "project_censoring.pkx") loadProject(project) runCAEstimation() plotCAObservationsVsPredictions() plotCAObservationsVsPredictions(settings = list(spline = TRUE)) plotCAObservationsVsPredictions(settings = list(ylog = TRUE, xlog = TRUE)) # stratification plotCAObservationsVsPredictions(stratify = list(filter = list(name = "STUDY", cat = "102"))) plotCAObservationsVsPredictions(stratify = list(splitGroup = list(name = "STUDY"))) plotCAObservationsVsPredictions(stratify = list(colorGroup = list(name = "STUDY"))) data <- getChartsData(plotName = "plotCAObservationsVsPredictions", colorGroup = list(name = "STUDY")) plotCAObservationsVsPredictions(data = data)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Correlation between CA individual parameters.
Description
Plot the correlation bewteen CA individual parameters.
Usage
plotCAParametersCorrelation( parametersRows = NULL, parametersColumns = NULL, settings = list(), preferences = list(), stratify = list(), data = NULL )
Arguments
parametersRows |
vector with the name of CA parameters to display on rows (by default the first 4 computed parameters are displayed). |
parametersColumns |
vector with the name of CA parameters to display on columns (by default parametersColumns = parametersRows). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotCAParametersCorrelation") to check available displays. |
stratify |
List with the stratification arguments
|
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotCAParametersCorrelation", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one element in parametersRows and parametersColumns,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runCAEstimation() plotCAParametersCorrelation() plotCAParametersCorrelation(parametersRows = c("ka", "Cl")) plotCAParametersCorrelation(parametersRows = "ka", parametersColumns = "Cl") plotCAParametersCorrelation(parametersRows = "Cl", parametersColumns = "ka") plotCAParametersCorrelation(parametersRows = "ka", parametersColumns = "Cl", settings = list(spline = TRUE)) # stratification plotCAParametersCorrelation(parametersRows = "ka", parametersColumns = "Cl", stratify = list(filter = list(name = "AGE", interval = c(25, 30)))) plotCAParametersCorrelation(parametersRows = "ka", parametersColumns = "Cl", stratify = list(splitGroup = list(name = "AGE", breaks = c(25)))) plotCAParametersCorrelation(parametersRows = "ka", parametersColumns = "Cl", stratify = list(colorGroup = list(name = "HT", breaks = 181))) plotCAParametersCorrelation( parametersRows = "ka", parametersColumns = "Cl", settings=list(legend=T), stratify = list(splitGroup=list(list(name = "AGE", breaks = 25), list(name = "Period"))) ) # update preferences and settings preferences <- list(obs = list(color = "#51B613")) plotCAParametersCorrelation(parametersRows = "ka", parametersColumns = "Cl", preferences = preferences) # pre compute dataset data <- getChartsData(plotName = "plotCAParametersCorrelation") plotCAParametersCorrelation(data = data) plotCAParametersCorrelation(parametersRows = c("Tlag", "ka", "V"))
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Distribution of the individual CA parameters
Description
Plot the distribution of the individual CA parameters.
Usage
plotCAParametersDistribution( parameters = NULL, settings = list(), preferences = list(), stratify = list(), data = NULL )
Arguments
parameters |
vector of ca parameters to display. (by default the first 4 computed ca parameters are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotCAParametersDistribution") to check available displays. |
stratify |
List with the stratification arguments
|
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotCAParametersDistribution", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one parameter,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runCAEstimation() plotCAParametersDistribution(parameters = "Tlag", settings = list(plot = "pdf")) plotCAParametersDistribution(parameters = "Cl", settings = list(plot = "cdf")) # stratification plotCAParametersDistribution(parameters = "Tlag", stratify = list(filter = list(name = "AGE", interval = c(25, 30)))) plotCAParametersDistribution(parameters = "Cl", stratify = list(splitGroup = list(name = "AGE", breaks = c(25)))) plotCAParametersDistribution(parameters = "Cl", settings = list(plot = "pdf"), stratify = list(colorGroup = list(name = "HT", breaks = 181))) plotCAParametersDistribution(parameters = "Cl", settings = list(plot = "cdf"), stratify = list(colorGroup = list(name = "HT", breaks = 181), colors = c("#46B4AF", "#B4468A"))) plotCAParametersDistribution( parameters = "Cl", settings=list(legend=T), stratify = list(splitGroup=list(list(name = "AGE", breaks = 25), list(name = "Period"))) ) # pre compute dataset data <- getChartsData(plotName = "plotCAParametersDistribution") plotCAParametersDistribution(data = data) parameters <- c("Tlag", "ka", "V") plotCAParametersDistribution(data = data, parameters = parameters) plotCAParametersDistribution(parameters = parameters) plotCAParametersDistribution(parameters = parameters, settings = list(plot = "cdf")) plotCAParametersDistribution(parameters = parameters, settings = list(plot = "pdf"))
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Individual CA parameter vs covariate plot
Description
Plot the CA individual parameters vs covariates.
Usage
plotCAParametersVsCovariates( parameters = NULL, covariates = NULL, settings = list(), preferences = list(), stratify = list(), data = NULL )
Arguments
parameters |
vector of ca parameters to display. (by default the first 4 computed ca parameters are displayed). |
covariates |
vector of covariates to display. (by default the first 4 covariates are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotCAParametersVsCovariates") to check available displays. |
stratify |
List with the stratification arguments
|
data |
Charts data as dataframe – Output of getChartsData (getChartsData("plotCAParametersVsCovariates", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one element in covariatesRows and covariatesColumns,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software="pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runCAEstimation() plotCAParametersVsCovariates(covariates="AGE", parameters="ka", settings=list(spline=T)) plotCAParametersVsCovariates(covariates="FORM", parameters="Tlag") # stratification plotCAParametersVsCovariates(covariates= "HT", parameters="ka", stratify=list(filter=list(name="AGE", interval=c(25, 30)))) plotCAParametersVsCovariates(covariates="WT", parameters="ka", stratify=list(splitGroup=list(name="AGE", breaks=c(25)))) plotCAParametersVsCovariates(covariates="AGE", parameters="ka", stratify=list(colorGroup=list(name="HT", breaks=181))) plotCAParametersVsCovariates(covariates="SEQ", parameters="ka", stratify=list(colorGroup=list(name="HT", breaks=181), colors = c("#175C8C", "#ABD3EF"))) plotCAParametersVsCovariates( covariates="SEQ", parameters="ka", settings=list(legend=T), stratify = list(splitGroup=list(list(name = "AGE", breaks = 25), list(name = "Period"))) ) # update settings and preferences plotCAParametersVsCovariates(covariates="SEQ", parameters="Tlag", settings=list(legend=T)) preferences <- list(spline=list(lineType="dashed")) plotCAParametersVsCovariates(covariates="AGE", parameters="ka", settings=list(regressionLine=F, spline=T), preferences=preferences) # pre compute dataset data <- getChartsData(plotName="plotCAParametersVsCovariates") plotCAParametersVsCovariates(data=data) parameters <- c("Tlag", "Cl", "V") covariates <- c("AGE", "WT", "FORM") plotCAParametersVsCovariates(parameters=parameters, covariates=covariates, data=data) plotCAParametersVsCovariates(parameters=parameters, covariates=covariates)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Generate NCA individual fits (elimination)
Description
Plot the NCA individual fits (LambdaZ regression).
Usage
plotNCAIndividualFits( data = NULL, settings = list(), preferences = list(), stratify = list() )
Arguments
data |
List of charts data as dataframe – Output of getChartsData ((getChartsData("plotNCAIndividualFits", …)) If data not specified, charts data will be computed inside the function. |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotNCAIndividualFits") to check available displays. |
stratify |
List with the stratification arguments
|
Value
A ggplot object
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runNCAEstimation() plotNCAIndividualFits() # display plotNCAIndividualFits(stratify = list(ids = c(1, 2, 3)), settings = list(obsDots = T, lambda_z = T)) plotNCAIndividualFits(stratify = list(ids = c(1, 2, 3)), settings = list(obsDots = F, obsLines = T, lambda_z = T)) # stratification plotNCAIndividualFits(stratify = list(ids = c(1, 2, 3, 4), filter = list(name = "Period", cat = 1))) plotNCAIndividualFits(stratify = list(ids = c(1, 2, 3, 4, 5), colorGroup = list(name = "SEQ"), colors = c("#5DC088", "#DBA92B"))) plotNCAIndividualFits(stratify = list(colorGroup = list(list(name = "AGE", breaks = 25), list(name = "Period")))) # update settings and preferences plotNCAIndividualFits(stratify = list(ids = c(1, 4)), settings = list(ylog = TRUE, scales = "fixed")) plotNCAIndividualFits(settings = list(ncol = 5)) plotNCAIndividualFits(settings = list(splitOccasions = FALSE, ncol = 5)) preferences <- list(lambda_z = list(color = "pink", lineWidth = 1)) plotNCAIndividualFits(stratify = list(ids = c(4, 5, 6)), preferences = preferences) # pre compute dataset data <- getChartsData(plot = "plotNCAIndividualFits", ids = c(1, 2)) plotNCAIndividualFits(data = data)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Correlation between NCA individual parameters.
Description
Plot the correlation between NCA individual parameters.
Usage
plotNCAParametersCorrelation( parametersRows = NULL, parametersColumns = NULL, settings = list(), preferences = NULL, stratify = list(), data = NULL )
Arguments
parametersRows |
vector with the name of NCA parameters to display on rows (by default the first 4 computed parameters are displayed). |
parametersColumns |
vector with the name of NCA parameters to display on columns (by default parametersColumns = parametersRows). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotNCAParametersCorrelation") to check available displays. |
stratify |
List with the stratification arguments
|
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotNCAParametersCorrelation", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one element in parametersRows and parametersColumns,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runNCAEstimation() plotNCAParametersCorrelation(settings = list(spline = TRUE)) plotNCAParametersCorrelation(parametersRows = c("AUCINF_obs", "Cl_F_obs")) plotNCAParametersCorrelation(parametersRows = c("AUCINF_obs", "Cl_F_obs"), parametersColumns = c("AUCINF_obs", "Tmax")) plotNCAParametersCorrelation(parametersRows = "AUCINF_obs", parametersColumns = "Cl_F_obs", settings = list(spline = TRUE)) plotNCAParametersCorrelation(parametersRows = c("AUCINF_obs", "Tmax")) # stratification plotNCAParametersCorrelation(parametersRows = "AUCINF_obs", parametersColumns = "Cl_F_obs", stratify = list(filter = list(name = "AGE", interval = c(25, 30)))) plotNCAParametersCorrelation(parametersRows = "AUCINF_obs", parametersColumns = "Tmax", stratify = list(splitGroup = list(name = "AGE", breaks = c(25)))) plotNCAParametersCorrelation(parametersRows = "AUCINF_obs", parametersColumns = "Tmax", stratify = list(colorGroup = list(name = "HT", breaks = 181))) plotNCAParametersCorrelation( parametersRows = "AUCINF_obs", parametersColumns = "Tmax", settings=list(legend=T), stratify = list(splitGroup = list(list(name = "AGE", breaks = 25), list(name = "HT", breaks = 180))) ) # update preferences and settings preferences <- list(obs = list(color = "#51B613")) plotNCAParametersCorrelation(parametersRows = "AUCINF_obs", parametersColumns = "Tmax", preferences = preferences) # pre compute dataset data <- getChartsData(plotName = "plotNCAParametersCorrelation") plotNCAParametersCorrelation(data = data, settings = list(spline = TRUE)) parameters <- c("Lambda_z", "AUClast", "Clast", "Cmax") plotNCAParametersCorrelation(parametersRows = parameters)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Distribution of the individual NCA parameters
Description
Plot the distribution of the individual NCA parameters.
Usage
plotNCAParametersDistribution( parameters = NULL, settings = list(), preferences = list(), stratify = list(), data = NULL )
Arguments
parameters |
vector of nca parameters to display. (by default the first 4 computed nca parameters are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotNCAParametersDistribution") to check available displays. |
stratify |
List with the stratification arguments
|
data |
List of charts data as dataframe – Output of getChartsData (getChartsData("plotNCAParametersDistribution", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one parameter,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runNCAEstimation() plotNCAParametersDistribution(parameters = "AUCINF_obs", settings = list(plot = "pdf")) plotNCAParametersDistribution(parameters = "Lambda_z", settings = list(plot = "cdf")) # stratification plotNCAParametersDistribution(parameters = "AUClast", stratify = list(filter = list(name = "AGE", interval = c(25, 30)))) plotNCAParametersDistribution(parameters = "Cmax", stratify = list(splitGroup = list(name = "AGE", breaks = c(25)))) plotNCAParametersDistribution(parameters = "Tmax", settings = list(plot = "pdf"), stratify = list(colorGroup = list(name = "HT", breaks = 181))) plotNCAParametersDistribution(parameters = "AUCINF_obs", settings = list(plot = "cdf"), stratify = list(colorGroup = list(name = "HT", breaks = 181), colors = c("#46B4AF", "#B4468A"))) plotNCAParametersDistribution( parameters = "Tmax", settings=list(legend=T), stratify = list(splitGroup = list(list(name = "AGE", breaks = 25), list(name = "Period"))) ) # pre compute dataset data <- getChartsData("plotNCAParametersDistribution") plotNCAParametersDistribution(data = data, parameters = "AUClast") # display multiple parameters plotNCAParametersDistribution() plotNCAParametersDistribution(settings = list(plot = "cdf")) parameters <- c("Lambda_z", "AUClast", "Clast", "Cmax") plotNCAParametersDistribution(parameters = parameters) plotNCAParametersDistribution(parameters = parameters, settings = list(plot = "cdf")) plotNCAParametersDistribution(parameters = parameters, settings = list(plot = "pdf"))
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Individual NCA parameter vs covariate plot.
Description
Plot the NCA individual parameters vs covariates.
Usage
plotNCAParametersVsCovariates( parameters = NULL, covariates = NULL, settings = list(), preferences = NULL, stratify = list(), data = NULL )
Arguments
parameters |
vector of nca parameters to display. (by default the first 4 computed nca parameters are displayed). |
covariates |
vector of covariates to display. (by default the first 4 covariates are displayed). |
settings |
List with the following settings
|
preferences |
(optional) preferences for plot display, run getPlotPreferences("plotNCAParametersVsCovariates") to check available displays. |
stratify |
List with the stratification arguments
|
data |
Charts data as dataframe – Output of getChartsData (getChartsData("plotNCAParametersVsCovariates", …)) If data not specified, charts data will be computed inside the function. |
Value
- A ggplot object if one element in covariatesRows and covariatesColumns,
- A TableGrob object if multiple plots (output of grid.arrange)
See Also
getChartsData getPlotPreferences
Click here to see examples
# initializeLixoftConnectors(software = "pkanalix") project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx") loadProject(project) runNCAEstimation() plotNCAParametersVsCovariates(covariates="AGE", parameters="AUClast", settings=list(spline=T)) plotNCAParametersVsCovariates(covariates="FORM", parameters="Cl_F_obs") # stratification plotNCAParametersVsCovariates( covariates="HT", parameters="AUClast", stratify=list(filter=list(name="AGE", interval=c(25, 30))) ) plotNCAParametersVsCovariates( covariates="WT", parameters="AUClast", stratify=list(splitGroup=list(name="AGE", breaks=c(25))) ) plotNCAParametersVsCovariates( covariates="AGE", parameters="AUClast", stratify=list(colorGroup=list(name="HT", breaks=181)) ) plotNCAParametersVsCovariates( covariates="SEQ", parameters="AUClast", stratify=list(colorGroup=list(name="HT", breaks=181), colors=c("#175C8C", "#ABD3EF")) ) plotNCAParametersVsCovariates( covariates="SEQ", parameters="AUClast", settings=list(legend=T), stratify = list(colorGroup = list(list(name = "AGE", breaks = 25), list(name = "Period"))) ) # update settings and preferences plotNCAParametersVsCovariates( covariates="SEQ", parameters="Tmax", settings=list(legend=T) ) preferences <- list(spline=list(lineType="dashed")) plotNCAParametersVsCovariates(covariates="AGE", parameter="Tmax", settings=list(regressionLine=F, spline=T), preferences=preferences) # pre compute dataset data <- getChartsData(plotName="plotNCAParametersVsCovariates") plotNCAParametersVsCovariates(data=data) parameters <- c("Lambda_z", "AUClast", "Clast", "Cmax") covariates <- c("AGE", "WT", "FORM") plotNCAParametersVsCovariates() plotNCAParametersVsCovariates(parameters=parameters, covariates=covariates)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Define Preferences to customize plots
Description
Define the preferences to customize plots.
Usage
getPlotPreferences(plotName = NULL, update = NULL, ...)
Arguments
plotName |
(string) Name of the plot function. if plotName is NULL, all preferences are returned |
update |
list containing the plot elements to be updated. |
... |
additional arguments – dataType for some plots |
Details
This function creates a theme that customizes how a plot looks, i.e. legend, colors
fills, transparencies, linetypes an sizes, etc.
For each curve, list of available customizations:
- color: color (when lines or points)
- fill: color (when surfaces)
- opacity: color transparency
- radius: size of points
- shape: shape of points
- lineType: linetype
- lineWidth: line size
- legend: name of the legend (if NULL, no legend is displayed for the element)
Value
A list with theme specifiers
See Also
setPlotPreferences resetPlotPreferences
Click here to see examples
# ## Not run: preferences <- getPlotPreferences(update = list( obs = list(color = "red", legend = "Observations"), obsCens = list(color = rgb(70, 130, 180, maxColorValue = 255)) )) # preferences that are used by default in the plots preferences <- getPlotPreferences() # preferences that are used by default in plotObservedData preferences <- getPlotPreferences(plotName = "plotObservedData") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Export current project to Monolix, PKanalix or Simulx
Description
Export the current project to another application of the MonolixSuite, and load the exported project.
NOTE: This action switches the current session to the target software. Current unsaved modifications will be lost.
The extensions are .mlxtran for Monolix, .pkx for PKanalix, .smlx for Simulx and .dxp for Datxplore.
WARNING: R is sensitive between ‘\’ and ‘/’, only ‘/’ can be used.
Usage
exportProject(settings, force = F)
Arguments
settings |
(character) Export settings:
|
force |
(bool) [optional] Should software switch security be overpassed or not. Equals FALSE by default. |
Details
At export, a new project is created in a temporary folder. By default, the file is created with a project setting filesNextToProject = TRUE, which means that file dependencies such as data and model files are copied and kept next to the new project (or in the result folder for Simulx). This new project can be saved to the desired location withsaveProject.
Exporting a Monolix or a PKanalix project to Simulx automatically creates elements that can be used for simulation, exactly as in the GUI.
To see which elements of some type have been created in the new project, you can use the get..Element functions: getOccasionElements, getPopulationElements,
.getPopulationElements
, getIndividualElements, getCovariateElements, getTreatmentElements, getOutputElements, getRegressorElements
See Also
newProject, loadProject, importProject
Click here to see examples
# ## Not run: [PKanalix only] exportProject(settings = list(targetSoftware = "monolix", filesNextToProject = F)) [Monolix only] exportProject(settings = list(targetSoftware = "simulx", filesNextToProject = T, dataFilePath = "data.txt", dataFileType = "vpc")) exportProject(settings = list(targetSoftware = "simulx", filesNextToProject = F, dataFilePath = "/path/to/data/data.txt")) [Simulx only] exportProject(settings = list(targetSoftware = "pkanalix", dataFilePath = "data.txt", modelFileName = "model.txt")) exportProject(settings = list(targetSoftware = "pkanalix", dataFilePath = "/path/to/data/data.txt")) ## End(Not run) # Working example to export a Monolix project to Simulx. The resulting .smlx file can be opened from Simulx GUI. initializeLixoftConnectors(software = "monolix", force = TRUE) loadProject(file.path(getDemoPath(),"1.creating_and_using_models","1.1.libraries_of_models","warfarinPK_project.mlxtran")) runScenario() exportProject(settings = list(targetSoftware = "simulx"), force = TRUE) saveProject("importFromMonolix.smlx")
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get project data
Description
Get a description of the data used in the current project. Available informations are:
- dataFile (string): path to the data file
- header (array<character>): vector of header names
- headerTypes (array<character>): vector of header types
- observationNames (vector<string>): vector of observation names
- observationTypes (vector<string>): vector of observation types
- nbSSDoses (int): number of doses (if there is a SS column)
Usage
getData()
Value
A list describing project data.
See Also
Click here to see examples
# ## Not run: data = getData() data -> $dataFile "/path/to/data/file.txt" $header c("ID","TIME","CONC","SEX","OCC") $headerTypes c("ID","TIME","OBSERVATION","CATEGORICAL COVARIATE","IGNORE") $observationNames c("concentration") $observationTypes c(concentration = "continuous") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get interpreted project data
Description
Get data after interpretation done by the software, how it is displayed in the Data tab in the interface.
Interpretation of data includes, but is not limited to, data formatting, addition of doses through the ADDL column and steady state settings, addition of additional covariates, interpolation of regressors.
Usage
getInterpretedData()
[Monolix – PKanalix – Simulx] Get a library model’s content.
Description
Get the content of a library model.
Usage
getLibraryModelContent(filename, print = TRUE)
Arguments
filename |
(string) The filename of the requested model. Can start with "lib:", end with ".txt", but neither are mandatory. |
print |
(logical) If TRUE (default), model’s content is printed with human-readable line breaks (alongside regular output with "\n"). |
Value
The model’s content as a raw string.
Click here to see examples
# ## Not run: getLibraryModelContent("oral1_1cpt_kaVCl") model <- getLibraryModelContent(filename = "lib:oral1_1cpt_kaVCl.txt", print = FALSE) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get the name of a library model given a list of library filters.
Description
Get the name of a library model given a list of library filters.
Usage
getLibraryModelName(library, filters = list())
Arguments
library |
(string) One of the MonolixSuite library of models. Possible values are "pk", "pd", "pkpd", "pkdoubleabs", "pm", "tmdd", "tte", "count" and "tgi". |
filters |
(list(name = string)) Named list of filters (optional), format: list(filterKey = "filterValue", …). Default empty list. Since available filters are not in any particular order, filterKey should always be stated. |
Details
Models can be loaded from a library based on a selection of filters as in PKanalix, Monolix and Simulx GUI. For a complete description of each model library, and guidelines on how to select models, please visit https://mlxtran.lixoft.com/model-libraries/.
getLibraryModelName enables to get the name of the model to be loaded. You can then use it in setStructuralModel or newProject to load the model in an existing or in a new project.
All possible keys and values for each of the libraries are listed below.
PK library
key | values | |
administration | bolus, infusion, oral, oralBolus | |
delay | noDelay, lagTime, transitCompartments | |
absorption | zeroOrder, firstOrder | |
distribution | 1compartment, 2compartments, 3compartments | |
elimination | linear, MichaelisMenten | |
parametrization | rate, clearance, hybridConstants | |
bioavailability | true, false | |
PD library
key | values | |
response | immediate, turnover | |
drugAction | linear, logarithmic, quadratic, Emax, Imax, productionInhibition, | |
degradationInhibition, degradationStimulation, productionStimulation | ||
baseline | const, 1-exp, exp, linear, null | |
inhibition | partialInhibition, fullInhibition | |
sigmoidicity | true, false | |
PKPD library
key | values | |
administration | bolus, infusion, oral, oralBolus | |
delay | noDelay, lagTime, transitCompartments | |
absorption | zeroOrder, firstOrder | |
distribution | 1compartment, 2compartments, 3compartments | |
elimination | linear, MichaelisMenten | |
parametrization | rate, clearance | |
bioavailability | true, false | |
response | direct, effectCompartment, turnover | |
drugAction | Emax, Imax, productionInhibition, degradationInhibition, | |
degradationStimulation, productionStimulation | ||
baseline | const, null | |
inhibition | partialInhibition, fullInhibition | |
sigmoidicity | true, false | |
PK double absorption library
key | values | |
firstAbsorption | zeroOrder, firstOrder | |
firstDelay | noDelay, lagTime, transitCompartments | |
secondAbsorption | zeroOrder, firstOrder | |
secondDelay | noDelay, lagTime, transitCompartments | |
absorptionOrder | simultaneous, sequential | |
forceLongerDelay | true, false | |
distribution | 1compartment, 2compartments, 3compartments | |
elimination | linear, MichaelisMenten | |
parametrization | rate, clearance | |
Parent-metabolite library
key | values | |
administration | bolus, infusion, oral, oralBolus | |
firstPassEffect | noFirstPassEffect, withDoseApportionment, | |
withoutDoseApportionment | ||
delay | noDelay, lagTime, transitCompartments | |
absorption | zeroOrder, firstOrder | |
transformation | unidirectional, bidirectional | |
parametrization | rate, clearance | |
parentDistribution | 1compartment, 2compartments, 3compartments | |
parentElimination | linear, MichaelisMenten | |
metaboliteDistribution | 1compartment, 2compartments, 3compartments | |
metaboliteElimination | linear, MichaelisMenten | |
TMDD library
key | values | |
administration | bolus, infusion, oral, oralBolus | |
delay | noDelay, lagTime, transitCompartments | |
absorption | zeroOrder, firstOrder | |
distribution | 1compartment, 2compartments, 3compartments | |
tmddApproximation | MichaelisMenten, QE, QSS, full, Wagner, | |
constantRtot, constantRtotIB, irreversibleBinding | ||
output | totalLigandLtot, freeLigandL | |
parametrization | rate, clearance | |
TTE library
key | values | |
tteModel | exponential, Weibull, Gompertz, loglogistic, | |
uniform, gamma, generalizedGamma | ||
delay | true, false | |
numberOfEvents | singleEvent, repeatedEvents | |
typeOfEvent | intervalCensored, exact | |
dummyParameter | true, false | |
Count library
key | values | |
countDistribution | Poisson, binomial, negativeBinomial, betaBinomial, | |
generalizedPoisson, geometric, hypergeometric, | ||
logarithmic, Bernoulli | ||
zeroInflation | true, false | |
timeEvolution | constant, linear, exponential, Emax, Hill | |
parametrization | probabilityOfSuccess, averageNumberOfCounts | |
TGI library
key | values | |
shortcut | ClaretExponential, Simeoni, Stein, Wang, | |
Bonate, Ribba, twoPopulation | ||
initialTumorSize | asParameter, asRegressor | |
kinetics | true, false | |
model | linear, quadratic, exponential, generalizedExponential, | |
exponentialLinear, Simeoni, Koch, logistic, | ||
generalizedLogistic, SimeoniLogisticHybrid, Gompertz, | ||
exponentialGompertz, vonBertalanffy, generalizedVonBertalanffy | ||
additionalFeature | none, angiogenesis, immuneDynamics | |
treatment | none, pkModel, exposureAsRegressor, startAtZero, | |
startTimeAsRegressor, armAsRegressor | ||
killingHypothesis | logKill, NortonSimon | |
dynamics | firstOrder, MichaelisMenten, MichaelisMentenHill, | |
exponentialKill, constant | ||
resistance | ClaretExponential, resistantCells, none | |
delay | signalDistribution, cellDistribution, none | |
additionalTreatmentEffect | none, angiogenesisInhibition, immuneEffectorDecay | |
Value
Name of the filtered model, or vector of names of the available models if not all filters were selected. Names start with "lib:".
Click here to see examples
# ## Not run: getLibraryModelName(library = "pk", filters = list(administration = "oral", delay = "lagTime", absorption = "firstOrder", distribution = "1compartment", elimination = "linear", parametrization = "clearance")) # returns "lib:oral1_1cpt_TlagkaVCl.txt" getLibraryModelName("pd", list(response = "turnover", drugAction = "productionStimulation")) # returns c("lib:turn_input_Emax.txt", "lib:turn_input_gammaEmax.txt") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Get mapping
Description
Get mapping between data and model.
Usage
getMapping()
Value
A list of mapping information:
- mapping (list<list>) A list of lists representing a link between data and model. Each list contains:
- data (string) Data name
- prediction (string) Prediction name
- model [Monolix] (string) Model observation name (for continuous observations only)
- type (string) Type of linked data ("continuous" | "discrete" | "event")
- freeData (list<list>) A list of lists describing not mapped data:
- data (string) Data name
- type (string) Data type
- freePredictions (list<list>) A list of lists describing not mapped predictions:
- prediction (string) Prediction name
- type (string) Prediction type
See Also
Click here to see examples
# ## Not run: f = getMapping() f$mapping -> list( list(data = "1", prediction = "Cc", model = "concentration", type = "continuous"), list(data = "2", prediction = "Level", type = "discrete") ) f$freeData -> list( list(data = "3", type = "event") ) f$freePredictions -> list( list(prediction = "Effect", type = "continuous") ) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get structural model file
Description
Get the model file for the structural model used in the current project.
Usage
getStructuralModel()
Details
For Simulx, this function will return the path to the structural model only if the project was imported from Monolix, and the path to the full custom model otherwise.
Note that a custom model in Simulx may include also a statistical part.
For Simulx, there is no associated function getStructuralModel() because setting a new model is equivalent to creating a new project. Use newProject instead.
If a model was loaded from the libraries, the returned character is not a path,
but the name of the library model, such as "lib:model_name.txt". To see the content of a library model, use getLibraryModelContent.
Value
A string corresponding to the path to the structural model file.
See Also
For Monolix and PKanalix only: setStructuralModel
Click here to see examples
# ## Not run: getStructuralModel() => "/path/to/model/inclusion/modelFile.txt" ## End(Not run) # Get the name and see the content of the model used in warfarin demo project initializeLixoftConnectors("monolix", force = TRUE) loadProject(file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPK_project.mlxtran")) libModelName <- getStructuralModel() getLibraryModelContent(libModelName) # Get the name of the model file used in Simulx initializeLixoftConnectors("simulx", force = TRUE) project_name <- file.path(getDemoPath(), "1.overview", "newProject_TMDDmodel.smlx") loadProject(project_name) getStructuralModel() # Get the name of the model file imported to Simulx initializeLixoftConnectors("monolix", force = TRUE) project_name <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPK_project.mlxtran") loadProject(project_name) getStructuralModel() initializeLixoftConnectors("simulx", force = TRUE) importProject(project_name) getStructuralModel()
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Import project from Datxplore, Monolix or PKanalix
Description
Import a Monolix or a PKanalix project into the currently running application initialized in the connectors.
The extensions are .mlxtran for Monolix, .pkx for PKanalix, .smlx for Simulx and .dxp for Datxplore.
WARNING: R is sensitive between ‘\’ and ‘/’, only ‘/’ can be used.
Allowed import sources are:
CURRENT SOFTWARE | ALLOWED IMPORTS |
Monolix | PKanalix |
PKanalix | Monolix, Datxplore |
Simulx | Monolix, PKanalix. |
Usage
importProject(projectFile)
Arguments
projectFile |
(character) Path to the project file. Can be absolute or relative to the current working directory. |
Details
At import, a new project is created in a temporary folder with a project setting filesNextToProject = TRUE,
which means that file dependencies such as data and model files are copied and kept next to the new project
(or in the result folder for Simulx). This new project can be saved to the desired location withsaveProject.
Simulx projects can only be exported, not imported. To export a Simulx project to another application,
please load the Simulx project with the Simulx connectors and use exportProject.
Importing a Monolix or a PKanalix project into Simulx automatically creates elements that can be used for
simulation, exactly as in the GUI.
To see which elements of some type have been created in the new project, you can use the get..Element functions:
getOccasionElements, getPopulationElements,
,getPopulationElements
, getIndividualElements
getCovariateElements, getTreatmentElements, getOutputElements, getRegressorElements
.
See Also
Click here to see examples
# ## Not run: initializeLixoftConnectors(software = "simulx", force = TRUE) importProject("/path/to/project/file.mlxtran") importProject("/path/to/project/file.pkx") initializeLixoftConnectors(software = "monolix", force = TRUE) importProject("/path/to/project/file.pkx") initializeLixoftConnectors(software = "pkanalix", force = TRUE) importProject("/path/to/project/file.mlxtran") ## End(Not run) # working example to import a Monolix demo project into Simulx. The resulting .smlx file can be opened from Simulx GUI. initializeLixoftConnectors(software = "monolix", force = TRUE) MonolixDemoPath = file.path(getDemoPath(),"1.creating_and_using_models","1.1.libraries_of_models","warfarinPK_project.mlxtran") initializeLixoftConnectors(software = "simulx", force = TRUE) importProject(MonolixDemoPath) saveProject("importFromMonolix.smlx")
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get current project load status.
Description
Get a boolean saying if a project is currently loaded.
Usage
isProjectLoaded()
Value
TRUE if a project is currently loaded, FALSE otherwise
Click here to see examples
# initializeLixoftConnectors("monolix") project_name <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPK_project.mlxtran") loadProject(project_name) isProjectLoaded() initializeLixoftConnectors("pkanalix") isProjectLoaded()
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Load project from file
Description
Load a project in the currently running application initialized in the connectors.
The extensions are .mlxtran for Monolix, .pkx for PKanalix, and .smlx for Simulx.
WARNING: R is sensitive between ‘\’ and ‘/’, only ‘/’ can be used.
Usage
loadProject(projectFile)
Arguments
projectFile |
(character) Path to the project file. Can be absolute or relative to the current working directory. |
See Also
saveProject, importProject, exportProject, newProject
Click here to see examples
# ## Not run: loadProject("/path/to/project/file.mlxtran") for Linux platform loadProject("C:/Users/path/to/project/file.mlxtran") for Windows platform ## End(Not run) # Load a Monolix project initializeLixoftConnectors("monolix") project_name <- file.path(getDemoPath(), "8.case_studies", "hiv_project.mlxtran") loadProject(project_name) # Load a PKanalix project initializeLixoftConnectors("pkanalix") project_name <- file.path(getDemoPath(), "1.basic_examples", "project_censoring.pkx") loadProject(project_name) # Load a Simulx project initializeLixoftConnectors("simulx") project_name <- file.path(getDemoPath(), "2.models", "longitudinal.smlx") loadProject(project_name)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Create a new project
Description
Create a new project. New projects can be created in the connectors as in PKanalix, Monolix or Simulx GUI. The creation of a new project requires a dataset in PKanalix, a dataset and a model in Monolix, and a model in Simulx.
Usage
newProject(modelFile = NULL, data = NULL)
Arguments
modelFile |
(character) Path to the model file. Mandatory for Monolix and Simulx, optional for PKanalix (used only for the CA part). Can be absolute or relative to the current working directory. To use a model from the libraries, you can find the model name with getLibraryModelName and set modelFile = "lib:modelName.txt" with the name obtained. To simulate inter-individual variability in Simulx with a new project, the model file has to include the statistical model, contrary to Monolix and PKanalix for which the model file only contains the structural model. Check here in detail how to write such a model from scratch. |
data |
(list) Structure describing the data. Mandatory for Monolix and PKanalix.
|
Details
Note: instead of creating a project from scratch, it is also possible in Monolix and PKanalix to load an existing project with loadProject or importProject and change the dataset or the model with setData or setStructuralModel
.
See Also
Click here to see examples
# # Create a new Monolix project initializeLixoftConnectors("monolix") data_file <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "data", "warfarin_data.csv") newProject(data = list(dataFile = data_file, headerTypes = c("id", "time", "amount", "observation", "obsid", "contcov", "catcov", "contcov"), observationTypes = list("1" = "continuous", "2" = "continuous"), mapping = list(list(data = "1", prediction = "Cc", model = "y1"), list(data = "2", prediction = "R", model = "y2"))), modelFile = "lib:oral1_1cpt_IndirectModelInhibitionKin_TlagkaVClR0koutImaxIC50.txt") # Create a new PKanalix project initializeLixoftConnectors("pkanalix") data_file <- file.path(getDemoPath(), "1.basic_examples", "data", "data_BLQ.csv") newProject(data = list(dataFile = data_file, headerTypes = c("id", "time", "amount", "observation", "cens", "catcov"))) # Create a new Simulx project initializeLixoftConnectors("simulx") newProject(modelFile = "lib:oral1_1cpt_IndirectModelInhibitionKin_TlagkaVClR0koutImaxIC50.txt")
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Save current project
Description
Save the current project as a file that can be reloaded in the connectors or in the GUI.
Usage
saveProject(projectFile = "")
Arguments
projectFile |
[optional](character) Path where to save a copy of the current mlxtran model. Can be absolute or relative to the current working directory. If no path is given, the file used to build the current configuration is updated. |
Details
The extensions are .mlxtran for Monolix, .pkx for PKanalix, and .smlx for Simulx.
WARNING: R is sensitive between ‘\’ and ‘/’, only ‘/’ can be used.
If the project setting "userfilesnexttoproject" is set to TRUE with setProjectSettings, all file dependencies such as model, data or external files are saved next to the project for Monolix and PKanalix, and in the result folder for Simulx.
See Also
Click here to see examples
# ## Not run: [PKanalix only] saveProject("/path/to/project/file.pkx") # save a copy of the model [Monolix only] saveProject("/path/to/project/file.mlxtran") # save a copy of the model [Simulx only] saveProject("/path/to/project/file.smlx") # save a copy of the model [Monolix - PKanalix - Simulx] saveProject() # update current model ## End(Not run) # Load, change and save a PKanalix project under a new name initializeLixoftConnectors("pkanalix") project_name <- file.path(getDemoPath(), "1.basic_examples", "project_censoring.pkx") loadProject(project_name) setNCASettings(blqMethodAfterTmax = "missing") saveProject("~/changed_project.pkx") # Load, change and save a Monolix project under a new name initializeLixoftConnectors("monolix") project_name <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPK_project.mlxtran") loadProject(project_name) addContinuousTransformedCovariate(tWt = "3*exp(wt)") saveProject("~/changed_project.mlxtran") # Load, change and save a Simulx project under a new name initializeLixoftConnectors("simulx") project_name <- file.path(getDemoPath(), "2.models", "longitudinal.smlx") loadProject(project_name) defineTreatmentElement(name = "trt", element = list(data = data.frame(time = 0, amount = 100))) saveProject("~/changed_project.smlx")
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Set project data
Description
Set project data giving a data file and specifying headers and observations types.
Usage
setData(dataFile, headerTypes, observationTypes, nbSSDoses = NULL)
Arguments
dataFile |
(character): Path to the data file. Can be absolute or relative to the current working directory. |
headerTypes |
(array<character>): A collection of header types. The possible header types are: "ignore", "id", "time", "observation", "amount", "contcov", "catcov", "occ", "evid", "mdv", "obsid", "cens", "limit", "regressor","admid", "rate", "tinf", "ss", "ii", "addl", "date". Notice that these are not the types displayed in the interface, these one are shortcuts. |
observationTypes |
[optional] (list): A list giving the type of each observation present in the data file. If there is only one y-type, the corresponding observation name can be omitted. The possible observation types are "continuous", "discrete", and "event". |
nbSSDoses |
[optional](int): Number of doses (if there is a SS column). |
See Also
Click here to see examples
# ## Not run: setData(dataFile = "/path/to/data/file.txt", headerTypes = c("IGNORE", "OBSERVATION"), observationTypes = "continuous") setData(dataFile = "/path/to/data/file.txt", headerTypes = c("IGNORE", "OBSERVATION", "YTYPE"), observationTypes = list(Concentration = "continuous", Level = "discrete")) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Set mapping
Description
Set mapping between data and model.
Usage
setMapping(mapping)
Arguments
mapping |
(list<list>) A list of lists representing a link between the data and the model. Each list contains:
|
See Also
Click here to see examples
# ## Not run: [Monolix] setMapping(list(list(data = "1", prediction = "Cc", model = "concentration"), list(data = "2", prediction = "Level"))) [PKanalix] setMapping(list(list(data = "1", prediction = "Cc"), list(data = "2", prediction = "Level"))) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Set structural model file
Description
Set the structural model.
Usage
setStructuralModel(modelFile)
Arguments
modelFile |
(character) Path to the model file. Can be absolute or relative to the current working directory. |
Details
To use a model from the libraries, you can find the model name with getLibraryModelName
and set modelFile = "lib:modelName.txt" with the name obtained.
See Also
Click here to see examples
# ## Not run: setStructuralModel("/path/to/model/file.txt") setStructuralModel("'lib:oral1_2cpt_kaClV1QV2.txt'") # working example to set a model from the library: initializeLixoftConnectors("monolix",force = TRUE) loadProject(file.path(getDemoPath(),"1.creating_and_using_models","1.1.libraries_of_models","warfarinPK_project.mlxtran")) #check model currently loaded: getStructuralModel() #get the name for a model from the library with 2 compartments: LibModel2cpt = getLibraryModelName(library = "pk", filters = list(administration = "oral", delay = "lagTime", absorption = "firstOrder", distribution = "2compartments", elimination = "linear", parametrization = "clearance")) #check model content: getLibraryModelContent(LibModel2cpt) #set this new model in the project: setStructuralModel(LibModel2cpt) # check that the project has now the new model instead of the previous one: getStructuralModel() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get console mode
Description
Get console mode, ie volume of output after running estimation tasks. Possible verbosity levels are:
“none” | no output |
“basic” | at the end of each algorithm, associated results are displayed |
“complete” | each algorithm iteration and/or status is displayed |
Usage
getConsoleMode()
Value
A string corresponding to current console mode
See Also
[Monolix – PKanalix – Simulx] Get project preferences
Description
Get a summary of the project preferences. Preferences are:
“relativepath” | (bool) | Use relative path for save/load operations. |
“threads” | (int >0) | Number of threads. |
“temporarydirectory” | (string) | Path to the directory used to save temporary files. |
“timestamping” | (bool) | Create an archive containing result files after each run. |
“delimiter” | (string) | Character use as delimiter in exported result files. |
“exportchartsdata” | (bool) | Should charts data be exported. |
“exportchartsdatasets” | (bool) | [Monolix] Should charts datasets be exported if possible. |
“exportvpcsimulations” | (bool) | [Monoliw] Should vpc simulations be exported if possible. |
“exportsimulationfiles” | (bool) | [Simulx] Should simulation results files be exported. |
“headeraliases” | (list("header" = vector<string>)) | For each header, the list of the recognized aliases. |
“ncaparameters” | (vector<string>) | [PKanalix] Defaulty computed NCA parameters. |
“units” | (list("type" = string) | [PKanalix] Time, amount and/or volume units. |
Usage
getPreferences(...)
Arguments
... |
[optional] (string) Name of the preference whose value should be displayed. If no argument is provided, all the preferences are returned. |
Value
An array which associates each preference name to its current value.
Click here to see examples
# ## Not run: getPreferences() # retrieve a list of all the general settings getPreferences("imageFormat","exportCharts") # retrieve only the imageFormat and exportCharts settings values ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get project settings
Description
Get a summary of the project settings.
Associated settings for Monolix projects are:
“directory” | (string) | Path to the folder where simulation results will be saved. It should be a writable directory. |
“exportResults” | (bool) | Should results be exported. |
“seed” | (0< int <2147483647) | Seed used by random generators. |
“grid” | (int) | Number of points for the continuous simulation grid. |
“nbSimulations” | (int) | Number of simulations. |
“dataandmodelnexttoproject” | (bool) | Should data and model files be saved next to project. |
“project” | (string) | Path to the Monolix project. |
Associated settings for PKanalix projects are:
“directory” | (string) | Path to the folder where simulation results will be saved. It should be a writable directory. |
“seed” | (0< int <2147483647) | Seed used by random generators. |
“datanexttoproject” | (bool) | Should data and model (in case of CA) files be saved next to project. |
Associated settings for Simulx projects are:
“directory” | (string) | Path to the folder where simulation results will be saved. It should be a writable directory. |
“seed” | (0< int <2147483647) | Seed used by random generators. |
“userfilesnexttoproject” | (bool) | Should user files be saved next to project. |
Usage
getProjectSettings(...)
Arguments
... |
[optional] (string) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned. |
Value
An array which associates each setting name to its current value.
See Also
Click here to see examples
# ## Not run: getProjectSettings() # retrieve a list of all the project settings ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Set console mode
Description
Set console mode, ie volume of output after running estimation tasks. Possible verbosity levels are:
“none” | no output |
“basic” | for each algorithm, display current iteration then associated results at algorithm end |
“complete” | display all iterations then associated results at algorithm end |
Usage
setConsoleMode(mode)
Arguments
mode |
(string) Accepted values are: "none" [default], "basic", "complete" |
See Also
[Monolix – PKanalix – Simulx] Set preferences
Description
Set the value of one or several of the project preferences. Prefenreces are:
“relativepath” | (bool) | Use relative path for save/load operations. |
“threads” | (int >0) | Number of threads. |
“temporarydirectory” | (string) | Path to the directory used to save temporary files. |
“timestamping” | (bool) | Create an archive containing result files after each run. |
“delimiter” | (string) | Character use as delimiter in exported result files. |
“exportchartsdata” | (bool) | Should charts data be exported. |
“exportchartsdatasets” | (bool) | [Monolix] Should charts datasets be exported if possible. |
“exportvpcsimulations” | (bool) | [Monoliw] Should vpc simulations be exported if possible. |
“exportsimulationfiles” | (bool) | [Simulx] Should simulation results files be exported. |
“headeraliases” | (list("header" = vector<string>)) | For each header, the list of the recognized aliases. |
“ncaparameters” | (vector<string>) | [PKanalix] Defaulty computed NCA parameters. |
“units” | (list("type" = string) | [PKanalix] Time, amount and/or volume units. |
Usage
setPreferences(...)
Arguments
... |
A collection of comma-separated pairs {preferenceName = settingValue}. |
See Also
Click here to see examples
# ## Not run: setPreferences(exportCharts = FALSE, delimiter = ",") ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Set project settings
Description
Set the value of one or several of the settings of the project.
Associated settings for Monolix projects are:
“directory” | (string) | Path to the folder where simulation results will be saved. It should be a writable directory. |
“exportResults” | (bool) | Should results be exported. |
“seed” | (0< int <2147483647) | Seed used by random generators. |
“grid” | (int) | Number of points for the continuous simulation grid. |
“nbSimulations” | (int) | Number of simulations. |
“dataandmodelnexttoproject” | (bool) | Should data and model files be saved next to project. |
Associated settings for PKanalix projects are:
“directory” | (string) | Path to the folder where simulation results will be saved. It should be a writable directory. |
“dataNextToProject” | (bool) | Should data and model (in case of CA) files be saved next to project. |
“seed” | (0< int <2147483647) | Seed used by random generators. |
Associated settings for Simulx projects are:
“directory” | (string) | Path to the folder where simulation results will be saved. It should be a writable directory. |
“seed” | (0< int <2147483647) | Seed used by random generators. |
“userfilesnexttoproject” | (bool) | Should user files be saved next to project. |
Usage
setProjectSettings(...)
Arguments
... |
A collection of comma-separated pairs {settingName = settingValue}. |
See Also
Click here to see examples
# ## Not run: setProjectSettings(directory = "/path/to/export/directory", seed = 12345) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] Generate report
Description
Generate a project report with default options or from a custom Word template.
Usage
generateReport( templateFile = NULL, tablesStyle = NULL, watermark = NULL, reportFile = NULL )
Arguments
templateFile |
[optional] (character) Path to the .docx template file used as reporting base. If not provided, a default report file is generated (as default option in the GUI). |
tablesStyle |
[optional] (character) |
watermark |
[optional] (list)
|
reportFile |
[optional] (list) If not provided, the report will be saved next to the project file with the name <projectname>_report.docx.
|
Details
Reports can be generated as in the GUI, either by using the default reporting or by using a custom template. Placeholders for tables can be used in the template, and they are replaced by result tables. It is not possible to replace plots placeholders with the connector, because this requires an interface to be open. If plots placeholders are present in the template, they will be replaced by nothing in the generated report.
Click here to see examples
# ## Not run: generateReport() generateReport(templateFile = "/path/to/template.docx") generateReport(templateFile = "/path/to/template.docx", tablesStyle = "Plain Table 1", watermark = list(text = "watermark", fontSize = 15)) ## End(Not run) # Working example to generate a default report ### initializeLixoftConnectors("monolix") loadProject(file.path(getDemoPath(),"1.creating_and_using_models","1.1.libraries_of_models","warfarinPK_project.mlxtran")) runScenario() reportPath = tempfile("report", fileext = ".docx") generateReport(reportFile = list(nextToProject = FALSE, path = reportPath)) file.show(reportPath) # Working example to generate a report with a custom template### # Note that only tables get replaced. It is not possible to add plots to a report via connectors, but it can be done in the GUI. initializeLixoftConnectors("pkanalix") loadProject(file.path(getDemoPath(),"2.case_studies","project_aPCSK9_SAD.pkx")) runScenario() reportPath = tempfile("report", fileext = ".docx") generateReport(templateFile = file.path(getDemoPath(),"2.case_studies","report_templates","PK_report_template_aPCSK9.docx"), reportFile = list(nextToProject = FALSE, path = reportPath)) file.show(reportPath)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get Bioequivalence results
Description
Get results for different steps in bioequivalence analysis.
Usage
getBioequivalenceResults(...)
Arguments
... |
(string) Name of the step whose values must be displayed : "anova", "coefficientsOfVariation", "confidenceIntervals" |
Click here to see examples
# ## Not run: bioeqResults = getBioequivalenceResults() # retrieve all the results values. bioeqResults = getBioequivalenceResults("anova", "confidenceIntervals") # retrieve anova and confidence intervals results. ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Pkanalix] Get the value of minimized cost in CA
Description
Get the value of the cost function minimized in CA, and additional criteria to compare models.
Usage
getCACost()
Details
The detailed formulas for cost, -2LL, AIC and BIC are given in https://pkanalix.lixoft.com/ca-settings/.
- Cost: weighted sum of squared residuals. Weights are specified in setCASettings. Additional weights are applied to balance the number of observations in each profile.
- -2LL: Twice the negative log-likelihood based on the obtained cost.
- AIC: Akaike Information Criteria calculated based on a penalization of -2LL by the number of optimized parameters.
- BIC: Bayesian Information Criteria calculated based on a penalization of -2LL by the number of optimized parameters and the total number of data points.
Value
A data frame with the values of total cost, -2LL, AIC and BIC computed during the last run.
See Also
Click here to see examples
# ## Not run: getCACost() -> data.frame( Cost = -2.2, -2LL = 15.12, AIC = 17.54, BIC = 18.45 ) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get CA individual parameters
Description
Get the estimated values for each subject of some of the individual CA parameters of the current project.
Usage
getCAIndividualParameters(...)
Arguments
... |
(string) Name of the individual parameters whose values must be displayed. |
Value
A data frame giving the estimated values of the individual parameters of interest for each subject
and a list of information relative to these parameters (units)
Click here to see examples
# ## Not run: indivParams = getCAIndividualParameters() # retrieve all the available individual parameters values. indivParams = getCAIndividualParameters("ka", "V") # retrieve ka and V values for all individuals. $parameters id ka V 1 0.8 1.2 . ... ... N 0.4 2.2 ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get CA parameter statistics
Description
Get statistics over the estimated values of some of the CA parameters of the current project.
Statistics are computed on the different sets of individuals resulting from the stratification settings passed in argument or, if not given, the ones previously set.
Usage
getCAParameterStatistics(parameters = c(), stratification = NULL)
Arguments
parameters |
[optional](vector<string>) Name of the parameters whose values must be displayed. |
stratification |
[optional] Stratification to apply on results. By default, project one is applied. Stratification is a list containing:
See setCAResultsStratification for more details about this argument structure. |
Value
A data frame giving the statistics over the parameters of interest, and a list of information relative to these parameters (units)
See Also
setCAResultsStratification getCAResultsStratification setResultsStratificationGroups
Click here to see examples
# ## Not run: indivParams = getCAParameterStatistics() # retrieve all the available parameters values. indivParams = getCAParameterStatistics("ka", "V") # retrieve ka and V values for all individuals. $parameters parameter min Q1 median Q3 max mean SD SE CV geoMean geoSD ka 0.05742669 0.08886395 0.1186787 0.1495961 0.1983748 0.1221367 0.03898449 0.007957675 31.91873 0.1159751 1.398436 V 7.859237 13.51599 23.00674 30.73677 43.39608 22.95211 10.99187 2.243707 47.89047 20.23981 1.704716 #' statistics = getCAParameterStatistics(stratification = list(groups = list(name = "WEIGHT", definition = c(65,5, 72)), state = list(split = "WEIGHT"))) # retrieve the values of all the available parameters splitted by WEIGHT. ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get CA results stratification
Description
Get the stratification used to compute NCA parameters statistics table.
Stratification is defined by:
- stratification covariate groups which are shared by both NCA and CA results
- a stratification state which is specific to each task results
Usage
getCAResultsStratification()
Details
For each covariate, stratification groups can be defined as a list with:
name | string | covariate name |
definition | vector<double>(continuous) || list<vector<string>>(categorical) | group separations (continuous) || modality sets (categorical) |
A stratification state is represented as a list with:
split | vector<string> | ordered list of splitted covariates |
filter | list< pair<string, vector<int>> > | list of paired containing a covariate name and the indexes of associated kept groups |
Value
A list with stratification groups (‘groups’) and stratification state (‘state’).
See Also
Click here to see examples
# ## Not run: getCAResultsStratification() $groups list( list( name = "WEIGHT", definition = c(70), type = "continuous", range = c(65,85) ), list( name = "TRT", definition = list(c("a","b"), "c") type = "categorical", categories = c("a","b","c") ) ) $state $split "WEIGHT" $filter list(list("WEIGHT", c(1,3), list("TRT", c(1))) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get NCA individual parameters
Description
Get the estimated values for each subject of some of the individual NCA parameters of the current project.
Usage
getNCAIndividualParameters(...)
Arguments
... |
(string) Name of the individual parameters whose values must be displayed. Possible parameters:
|
Value
A data frame giving the estimated values of the individual parameters of interest for each subject,
and a list of information relative to these parameters (units & CDISC names)
Click here to see examples
# ## Not run: indivParams = getNCAIndividualParameters() # retrieve the values of all the available parameters. indivParams = getNCAIndividualParameters("Tmax","Clast") # retrieve only the values of Tmax and Clast for all individuals. $parameters id Tmax Clast 1 0.8 1.2 . ... ... N 0.4 2.2 $information CDISC Tmax TMAX Clast CLST ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get NCA parameter statistics
Description
Get statistics over the estimated values of some of the NCA parameters of the current project.
Statistics are computed on the different sets of individuals resulting from the stratification settings passed in argument or, if not given, the ones previously set.
Usage
getNCAParameterStatistics(parameters = c(), stratification = NULL)
Arguments
parameters |
[optional](vector<string>) Name of the parameters whose values must be displayed and a list of information relative to these parameters (units & CDISC names). Possible parameters:
|
stratification |
[optional] Stratification to apply on results. By default, project one is applied. Stratification is a list containing:
See setNCAResultsStratification for more details about this argument structure. |
See Also
setNCAResultsStratification getNCAResultsStratification setResultsStratificationGroups
Click here to see examples
# ## Not run: statistics = getNCAParameterStatistics() # retrieve the values of all the available parameters. statistics = getNCAParameterStatistics(parameters = c("Tmax","Clast")) # retrieve only the values of Tmax and Clast for all individuals. $statistics parameter min Q1 median Q3 max mean SD SE CV Ntot Nobs Nmiss geoMean geoSD Tmax 2.5 2.5 2.75 3 3 2.75 0.3535534 0.25 12.85649 2 2 0 2.738613 1.1376 Clast 0.76903 0.76903 0.85836 0.94769 0.94769 0.85836 0.1263317 0.08933 14.7178 2 2 0 0.853699 1.15918 $information units CDISC Tmax h Tmax Clast mg.mL^-1 Clast statistics = getNCAParameterStatistics(stratification = list(groups = list(name = "WEIGHT", definition = c(65.5, 72)), state = list(split = "WEIGHT"))) # retrieve the values of all the available parameters splitted by WEIGHT. ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get NCA results stratification
Description
Get the stratification used to compute NCA parameters stratistics table.
Stratification is defined by:
- stratification covariate groups which are shared by both NCA and CA results
- a stratification state which is specific to each task results
Usage
getNCAResultsStratification()
Details
For each covariate, stratification groups can be defined as a list with:
name | string | covariate name |
definition | vector<double>(continuous) || list<vector<string>>(categorical) | group separations (continuous) || modality sets (categorical) |
A stratification state is represented as a list with:
split | vector<string> | ordered list of splitted covariates |
filter | list< pair<string, vector<int>> > | list of paired containing a covariate name and the indexes of associated kept groups |
Value
A list with stratification groups (‘groups’) and stratification state (‘state’).
See Also
Click here to see examples
# ## Not run: getNCAResultsStratification() $groups list( list( name = "WEIGHT", definition = c(70), type = "continuous", range = c(65,85) ), list( name = "TRT", definition = list(c("a","b"), "c") type = "categorical", categories = c("a","b","c") ) ) $state $split "WEIGHT" $filter list("Span", list("TRT", c(1))) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get points included in lambda_Z computation
Description
Get points used to compute lambda_Z in NCA estimation.
Usage
getPointsIncludedForLambdaZ()
Click here to see examples
# ## Not run: pointsIncluded = getPointsIncludedForLambdaZ() ID time concentration BLQ includedForLambdaZ 1 0 0.0 0.00 0 0 2 0 0.5 3.05 0 1 3 0 2.0 5.92 1 1 ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set CA results stratification
Description
Set the stratification used to compute CA parameters statistics table.
Stratification is defined by:
- stratification covariate groups which are shared by both NCA and CA results
- a stratification state which is specific to each task results
Usage
setCAResultsStratification( split = NULL, filter = NULL, groups = NULL, state = NULL )
Arguments
split |
(vector<string>) Ordered list of splitted covariates |
filter |
(list< pair<string, vector<int>> >) List of paired containing a covariate name and the indexes of associated kept groups |
groups |
Stratification groups list |
state |
Stratification state |
Details
For each covariate, stratification groups can be defined as a list with:
name | string | covariate name |
definition | vector<double>(continuous) || list<vector<string>>(categorical) | group separations (continuous) || modality sets (categorical) |
A stratification state is represented as a list with:
split | vector<string> | ordered list of splitted covariates |
filter | list< pair<string, vector<int>> > | list of paired containing a covariate name and the indexes of associated kept groups |
See Also
Click here to see examples
# ## Not run: setCAResultsStratification(split = "SEX") setCAResultsStratification(split = c("SEX", "WEIGHT")) setCAResultsStratification(filter = list("SEX", 1)) setCAResultsStratification(filter = list(list("SEX", 1), list("WEIGHT", c(1,3)))) setCAResultsStratification(split = "WEIGHT", filter = list(list("TRT", c(1,2))), groups = list(list(name = "WEIGHT", definition = c(65,5, 72)), list(name = "TRT", definition = list(c("a","b"), "c", c("d","e"))))) s = getCAResultsStratification() setCAResultsStratification(state = s$state, groups = s$groups) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set NCA results stratification
Description
Set the stratification used to compute NCA parameters statistics table.
Stratification is defined by:
- stratification covariate groups which are shared by both NCA and CA results
- a stratification state which is specific to each task results
Usage
setNCAResultsStratification( split = NULL, filter = NULL, groups = NULL, state = NULL )
Arguments
split |
(vector<string>) Ordered list of splitted covariates |
filter |
(list< pair<string, vector<int>> >) List of paired containing a covariate name and the indexes of associated kept groups |
groups |
Stratification groups list |
state |
Stratification state |
Details
For each covariate, stratification groups can be defined as a list with:
name | string | covariate name |
definition | vector<double>(continuous) || list<vector<string>>(categorical) | group separations (continuous) || modality sets (categorical) |
A stratification state is represented as a list with:
split | vector<string> | ordered list of splitted covariates |
filter | list< pair<string, vector<int>> > | list of paired containing a covariate name and the indexes of associated kept groups |
Note: For acceptance criteria filtering, it is possible to give only the criterion name instead of a pair.
See Also
Click here to see examples
# ## Not run: setNCAResultsStratification(split = "SEX") setNCAResultsStratification(split = c("SEX", "WEIGHT")) setNCAResultsStratification(filter = "Span") setNCAResultsStratification(filter = list("Span", list("SEX", 1))) setNCAResultsStratification(split = "WEIGHT", filter = list(list("TRT", c(1,2))), groups = list(list(name = "WEIGHT", definition = c(65,5, 72)), list(name = "TRT", definition = list(c("a","b"), "c", c("d","e"))))) s = getNCAResultsStratification() setNCAResultsStratification(state = s$state, groups = s$groups) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Compute the charts data
Description
Compute (if needed) and export the charts data of a given plot or, if not specified, all the available project plots.
Usage
computeChartsData(plot = NULL, output = NULL, exportVPCSimulations = NULL)
Arguments
plot |
(character) [optional][Monolix] Plot type. If not specified, all the available project plots will be considered. Available plots: bivariatedataviewer, covariateviewer, outputplot, indfits, obspred, residualsscatter, residualsdistribution, vpc, npc, predictiondistribution, parameterdistribution, randomeffects, covariancemodeldiagnosis, covariatemodeldiagnosis, likelihoodcontribution, fisher, saemresults, condmeanresults, likelihoodresults. |
output |
(character) [optional][Monolix] Plotted output (depending on the software, it can represent an observation, a simulation output, …). By default, all available outputs are considered. |
exportVPCSimulations |
(bool) [optional][Monolix] Should VPC simulations be exported if available. Equals FALSE by default. NOTE: If ‘plot" argument is not provided, ‘output’ and "task’ arguments are ignored. |
Details
computeChartsData can be used to compute and export the charts data for plots available in the graphical user interface as in Monolix, PKanalix or Simulx, when you export > export charts data.
The exported charts data is saved as txt files in the result folder, in the ChartsData subfolder.
Notice that it does not impact the current scenario.
To get a ggplot equivalent to the plot in the GUI, but customizable in R with the ggplot2 library, better use one of the plot… functions available in the connectors for Monolix and PKanalix (not available for Simulx). To get the charts data for one of these plot functions as a dataframe, you can use getChartsData.
See Also
Click here to see examples
# ## Not run: computeChartsData() # Monolix - PKanalix - Simulx computeChartsData(plot = "vpc", output = "y1") # Monolix ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix] 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
- a boolean which equals TRUE if the last run has successfully completed,
- a summary of the errors which could have occurred.
Click here to see examples
# ## Not run: lastRunInfo = getLastRunStatus() lastRunInfo$status -> TRUE lastRunInfo$report -> "" ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Get current scenario
Description
Get the list of tasks that will be run at the next call to runScenario. For Monolix, get in addition the associated method (linearization true or false), and the associated list of plots.
Usage
getScenario()
Details
For Monolix, getScenario returns a given list of tasks, the linearization option and the list of plots.
Every task in the list is associated to a boolean.
NOTE: Within a MONOLIX scenario, the order according to which the different algorithms are run is fixed:
Algorithm | Algorithm Keyword |
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” |
For PKanalix, getScenario returns a given list of tasks.
Every task in the list is associated to a boolean.
NOTE: Within a PKanalix scenario, the order according to which the different algorithms are run is fixed:
Algorithm | Algorithm keyword |
Non Compartmental Analysis | “nca” |
Bioequivalence estimation | “be” |
For Simulx, setScenario returns a given list of tasks.
Every task in the list is associated to a boolean.
NOTE: Within a Simulx scenario, the order according to which the different algorithms are run is fixed:
Algorithm | Algorithm keyword |
Simulation | “simulation” |
Outcomes and endpoints | “endpoints” |
Note: every task can also be run separately with a specific function, such as runSimulation in Simulx, runEstimation in Monolix. The CA task in PKanalix cannot be part of a scenario, it must be run with runCAEstimation
.
Value
The list of tasks that corresponds to the current scenario, indexed by task names.
See Also
Click here to see examples
# ## Not run: [MONOLIX] scenario = getScenario() scenario -> $tasks populationParameterEstimation conditionalDistributionSampling conditionalModeEstimation standardErrorEstimation logLikelihoodEstimation plots TRUE TRUE TRUE FALSE FALSE FALSE $linearization = T $plotList = "outputplot", "vpc" [PKANALIX] scenario = getScenario() scenario nca be TRUE FALSE [SIMULX] scenario = getScenario() scenario simulation endpoints TRUE FALSE ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Run scenario
Description
Run the scenario that has been set with setScenario.
Usage
runScenario()
Details
A scenario is a list of tasks to be run. Setting the scenario is equivalent to selecting tasks in Monolix, PKanalix or Simulx GUI that will be performed when clicking on RUN.
Note: every task can also be run separately with a specific function, such as runSimulation in Simulx, runEstimation in Monolix. The CA task in PKanalix cannot be part of a scenario, it must be run with runCAEstimation
.
See Also
Click here to see examples
# ## Not run: runScenario() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[Monolix – PKanalix – Simulx] Set scenario
Description
Clear the current scenario and build a new one from a given list of tasks.
Usage
setScenario(...)
Arguments
... |
A list of tasks as previously defined |
Details
A scenario is a list of tasks to be run by runScenario. Setting the scenario is equivalent to selecting tasks in Monolix, PKanalix or Simulx
GUI that will be performed when clicking on RUN.
For Monolix, setScenario requires a given list of tasks, the linearization option and the list of plots.
Every task in the list should be associated to a boolean.
NOTE: by default the boolean is false, thus, the user can only state what will run during the scenario.
NOTE: Within a MONOLIX scenario, the order according to which the different algorithms are run is fixed:
Algorithm | Algorithm Keyword |
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” |
For PKanalix, setScenario requires a given list of tasks.
Every task in the list should be associated to a boolean.
NOTE: By default the boolean is false, thus, the user can only state what will run during the scenario.
NOTE: Within a PKanalix scenario, the order according to which the different algorithms are run is fixed:
Algorithm | Algorithm keyword |
Non Compartmental Analysis | “nca” |
Bioequivalence estimation | “be” |
For Simulx, setScenario requires a given list of tasks.
Every task in the list should be associated to a boolean.
NOTE: By default the boolean is false, thus, the user can only state what will run during the scenario.
NOTE: Within a Simulx scenario, the order according to which the different algorithms are run is fixed:
Algorithm | Algorithm keyword |
Simulation | “simulation” |
Outcomes and endpoints | “endpoints” |
Note: every task can also be run separately with a specific function, such as runSimulation in Simulx, runEstimation in Monolix. The CA task in PKanalix cannot be part of a scenario, it must be run with runCAEstimation
.
See Also
Click here to see examples
# ## Not run: [MONOLIX] scenario = getScenario() scenario$tasks = c(populationParameterEstimation = T, conditionalModeEstimation = T, conditionalDistributionSampling = T) setScenario(scenario) [PKANALIX] scenario = getScenario() scenario = c(nca = T, be = F) setScenario(scenario) [SIMULX] scenario = getScenario() scenario = c(simulation = T, endpoints = F) setScenario(scenario) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Automatically estimate initial parameters values
Description
Automatically estimate initial parameters values for CA.
Usage
getCAParametersByAutoInit()
Details
Run automatic calculation of optimized parameters for CA initial parameters set in the project.
Click here to see examples
# ## Not run: autoinitvalues <- getCAParametersByAutoInit() setCAInitialValues(initialValues = autoinitvalues) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Estimate the bioequivalence.
Description
Estimate the bioequivalence for the selected parameters.
Usage
runBioequivalenceEstimation()
Click here to see examples
# ## Not run: runNCAEstimation() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Estimate the individual parameters using compartmental analysis.
Description
Estimate the CA parameters for each individual of the project.
Usage
runCAEstimation()
Click here to see examples
# ## Not run: runCAEstimation() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Run both non compartmental and compartmental analysis.
Description
Run the NCA analysis and the CA analysis if the structural model for the CA calculation is defined.
Usage
runEstimation()
Click here to see examples
# ## Not run: runEstimation() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Estimate the individual parameters using non compartmental analysis.
Description
Estimate the NCA parameters for each individual of the project.
Usage
runNCAEstimation()
Click here to see examples
# ## Not run: runNCAEstimation() ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get the settings associated to the bioequivalence estimation.
Description
Get the settings associated to the bioequivalence estimation. Associated settings are:
“level” | (int) | Level of the confidence interval |
“bioequivalenceLimits” | (vector) | Limit in which the confidence interval must be to conclude the bioequivalence is true |
“computedBioequivalenceParameters” | (data.frame) | Parameters to consider for the bioequivalence analysis and if they should be log-transformed (true/false). This list must be a subset of the NCA setting “computedncaparamteters”. |
“linearModelFactors” | (list) | The values are headers of the data set, except for reference where it must be one of the categories of the “formulation” categorical covariate. For “additional”, a vector of headers can be given. |
“degreesFreedom” | (string) | t-test using the residuals degrees of freedom assuming equal variances (“residuals”) or using the Welch-Satterthwaite degrees of freedom assuming unequal variances (“WelchSatterthwaite”, default) |
“bedesign” | (string) | automatically recognize BE design “crossover” or “parallel” (cannot be changed) |
Usage
getBioequivalenceSettings(...)
Arguments
... |
[optional] (string) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned. |
Value
An array which associates each setting name to its current value.
See Also
Click here to see examples
# ## Not run: getBioequivalenceSettings() # retrieve a list of all the bioequivalence methodology settings getBioequivalenceSettings("level","bioequivalenceLimits") # retrieve a list containing only the value of the settings whose name has been passed in argument ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get the initial values of individual parameters for the compartmental analysis
Description
Get the list of initial values for all parameters of the model used for compartmental analysis.
Each element of the parameter list is a list of
“value” | (double) | Initial value to use. Must be in the limits in case of bounded constraint. |
“constraint” | (string) | Constraint on the parameter. Possible values are “none”, “positive” or “bounded”. |
“limits” | (vector of doubles) | [optional] Limits in case of bounded constraint. |
Usage
getCAInitialValues()
[PKanalix] Get the settings associated to the compartmental analysis
Description
Get the settings associated to the compartmental analysis. Associated settings are:
“weightingCA” | (string) | Type of weighting objective function. One of “uniform”, “Yobs”, “Ypred”, “Ypred2”, “Yobs2” or “combined”. |
“pool” | (logical) | Fit with individual parameters or with the same parameters for all individuals. |
“blqMethod” | (string) | Method by which the BLQ data should be replaced. One of “zero”, “LOQ”, “LOQ2” or “missing”. |
Usage
getCASettings(...)
Arguments
... |
[optional] (string) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned. |
Value
An array which associates each setting name to its current value.
See Also
Click here to see examples
# ## Not run: getCASettings() # retrieve a list of all the CA methodology settings getCASettings("weightingca","blqmethod") # retrieve a list containing only the value of the settings whose name has been passed in argument ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get the data settings associated to the non compartmental analysis
Description
Get the data settings associated to the non compartmental analysis. Associated settings are:
“urinevolume” | (string) | regressor name used as urine volume. |
“datatype” | (list) | list(“obsId” = string(“plasma” or “urine”)). The type of data associated with each obsId: observation ID from data set. |
“units” | (list) | list with the units associated to “dose”, “time”, “volume” and “grading”. |
“scalings” | (list) | list with the scaling factor associated to “concentration”, “dose”, “time” and “urinevolume”. |
“enableunits” | (bool) | are units enabled or not. |
Usage
getDataSettings(...)
Arguments
... |
[optional] (string) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned. |
Value
An array which associates each setting name to its current value.
See Also
Click here to see examples
# ## Not run: getDataSettings() # retrieve a list of all the NCA methodology settings getDataSettings("urinevolume") # retrieve a list containing only the value of the settings whose name has been passed in argument ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Get the settings associated to the non compartmental analysis
Description
Get the settings associated to the non compartmental analysis. Associated settings are:
“obsidtouse” | (string) | The observation id from data section to use for computations |
“administrationType” | (list) | list(key = “admId”, value = string(“intravenous” or “extravascular”)). admId Admninistration ID from data set or 1 if no admId column in the dataset. |
“integralMethod” | (string) | Method for AUC and AUMC calculation and interpolation. |
“partialAucTime” | (list) | The first element of the list is a bolean describing if this setting is used. The second element of the list is a list of the values of the bounds of the partial AUC calculation intervals. |
“blqMethodBeforeTmax” | (string) | Method by which the BLQ data before Tmax should be replaced. |
“blqMethodAfterTmax” | (string) | Method by which the BLQ data after Tmax should be replaced. |
“ajdr2AcceptanceCriteria” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value of the adjusted R2 acceptance criteria for the estimation of lambda_Z. |
“extrapAucAcceptanceCriteria” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value of the AUC extrapolation acceptance criteria for the estimation of lambda_Z. |
“spanAcceptanceCriteria” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value of the span acceptance criteria for the estimation of lambda_Z. |
“lambdaRule” | (string) | Main rule for the lambda_Z estimation. |
“timeInterval” | (vector) | Time interval for the lambda_Z estimation when “lambdaRule” = “interval”. |
“timeValuesPerId” | (list) | list(“idName” = idTimes,…): idTimes Observation times to use for the calculation of lambda_Z for the id idName. |
“nbPoints” | (integer) | Number of points for the lambda_Z estimation when “lambdaRule” = “points”. |
“maxNbOfPoints” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value maximum number of points to use for the lambda_Z estimation when “lambdaRule” = “R2” or “adjustedR2”. |
“startTimeNotBefore” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value minimum time value to use for the lambda_Z estimation when “lambdaRule” = “R2” or “adjustedR2”. |
“weightingNCA” | (string) | Weighting method used for the regression that estimates lambda_Z. |
“computedNCAParameters” | (vector) | All the parameters to compute during the analysis.” |
Usage
getNCASettings(...)
Arguments
... |
[optional] (string) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned. |
Value
An array which associates each setting name to its current value.
See Also
Click here to see examples
# ## Not run: getNCASettings() # retrieve a list of all the NCA methodology settings getNCASettings("lambdaRule","integralMethod") # retrieve a list containing only the value of the settings whose name has been passed in argument ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set the value of one or several of the settings associated to the bioequivalence estimation
Description
Set the value of one or several of the settings associated to the bioequivalence estimation. Associated settings are:
“level” | (int) | Level of the confidence interval |
“bioequivalenceLimits” | (vector) | Limit in which the confidence interval must be to conclude the bioequivalence is true |
“computedBioequivalenceParameters” | (data.frame) Parameters to consider for the bioequivalence analysis and if they should be log-transformed (true/false). This list must be a subset of the NCA setting “computedncaparamteters”. | |
“linearModelFactors” | (list) | The list can specify “id”, “period”, “formulation”, “sequence” and “additional”. The values are headers of the data set, except for reference where it must be one of the categories of the “formulation” categorical covariate. For “additional”, a vector of headers can be given. |
“degreesFreedom” | (string) | t-test using the residuals degrees of freedom assuming equal variances (“residuals”) or using the Welch-Satterthwaite degrees of freedom assuming unequal variances (“WelchSatterthwaite”, default) |
Usage
setBioequivalenceSettings(...)
Arguments
... |
A collection of comma-separated pairs {settingName = settingValue}. |
See Also
Click here to see examples
# ## Not run: setBioequivalenceSettings(level = 90, bioequivalencelimits = c(85, 115)) # set the settings whose name has been passed in argument setBioequivalenceSettings(computedbioequivalenceparameters = data.frame(parameters = c("Cmax", "Tmax"), logtransform = c(TRUE, FALSE))) setBioequivalenceSettings(linearmodelfactors = list(id="SUBJ", period="OCC", formulation="FORM", reference="ref", sequence="SEQ", additional=c("Group","Phase"))) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set the initial values of parameters for the compartmental analysis
Description
Set the initial values of parameters for the compartmental analysis.
Usage
setCAInitialValues(initialValues)
Arguments
initialValues |
a list of lists. For each parameter, a list specifies:
|
See Also
Click here to see examples
# ## Not run: setCAInitialValues(list(Cl=list(value=0.4, constraint = "none"), V=list(value=0.5, constraint="positive"), ka=list(value=0.04, constraint="bounded", limits=c(0, 1)))) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set the settings associated to the compartmental analysis
Description
Set the settings associated to the compartmental analysis. Associated settings names are:
“weightingCA” | (string) | Type of weighting objective function. Possible methods are “uniform”, “Yobs”, “Ypred”, “Ypred2”, “Yobs2” or “combined” (default). |
“pool” | (logical) | If FALSE, fit with individual parameters or with the same parameters for all individuals if TRUE. FALSE (default). |
“blqMethod” | (string) | Method by which the BLQ data should be replaced. Possible methods are “zero”, “LOQ”, “LOQ2” or “missing” (default). |
Usage
setCASettings(...)
Arguments
... |
A collection of comma-separated pairs {settingName = settingValue}. |
See Also
Click here to see examples
# ## Not run: setCASettings(weightingCA = "uniform", blqMethod = "zero") # set the settings whose name has been passed in argument ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set the value of one or several of the data settings associated to the non compartmental analysis
Description
Set the value of one or several of the data settings associated to the non compartmental analysis. Associated settings names are:
“urinevolume” | (string) | regressor name used as urine volume. |
“datatype” | (list) | list(“obsId” = string(“plasma” or “urine”). The type of data associated with each obsId. Default "plasma". |
“units” | (list) | list with the units associated to “dose” (“pg”,”ng”,”ug”,”mg”,”g”,”pmol”,”nmol”,”umol”,”mmol” or “mol”), “time” (“s”,”min”,”h”,”d” or “w”), “volume” (“L” or “mL”) and “grading” (“”, “kg”, “g”, “mg”, “m2”, “mm2” or “cm2”). |
“scalings” | (list) | list with the scaling factor associated to “concentration”, “dose”, “time” and “urinevolume”. |
“enableunits” | (bool) | are units enabled or not. |
Usage
setDataSettings(...)
Arguments
... |
A collection of comma-separated pairs {settingName = settingValue}. |
See Also
Click here to see examples
# ## Not run: setDataSettings("datatype" = list("Y" ="plasma")) # set the settings whose name has been passed in argument setDataSettings("units"=list(dose="ng",time="h",volume="mL", grading="")) setDataSettings("scalings"=list(dose=0.001, time=24)) ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.
[PKanalix] Set the value of one or several of the settings associated to the non compartmental analysis
Description
Set the value of one or several of the settings associated to the non compartmental analysis. Associated settings are:
“obsidtouse” | (string) | The observation id from data section to use for computations. |
“administrationType” | (list) | list(key = “admId”, value = string(“intravenous” or “extravascular”)). admId Admninistration ID from data set or 1 if no admId column in the dataset. |
“integralMethod” | (string) | Method for AUC and AUMC calculation and interpolation. Possible methods are “linTrapLinInterp” (default), “linLogTrapLinLogInterp”, “upDownTrapUpDownInterp” and “linTrapLinLogInterp”. |
“partialAucTime” | (list) | The first element of the list is a bolean describing if this setting is used. The second element of the list is a list of the values of the bounds of the partial AUC calculation intervals. By default, the boolean equals FALSE and the bounds are c(-Inf, +Inf). |
“blqMethodBeforeTmax” | (string) | Method by which the BLQ data before Tmax should be replaced. Possible methods are “missing”, “LOQ”, “LOQ2” or “zero” (default). |
“blqMethodAfterTmax” | (string) | Method by which the BLQ data after Tmax should be replaced. Possible methods are “zero”, “missing”, “LOQ” or “LOQ2” (default). |
“ajdr2AcceptanceCriteria” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value of the adjusted R2 acceptance criteria for the estimation of lambda_Z. By default, the boolean equals FALSE and the value is 0.98. |
“extrapAucAcceptanceCriteria” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value of the AUC extrapolation acceptance criteria for the estimation of lambda_Z. By default, the boolean equals FALSE and the value is 20. |
“spanAcceptanceCriteria” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value of the span acceptance criteria for the estimation of lambda_Z. By default, the boolean equals FALSE and the value is 3. |
“lambdaRule” | (string) | Main rule for the lambda_Z estimation. Possible rules are “R2”, “interval”, “points” or “adjustedR2” (default). |
“timeInterval” | (vector) | Time interval for the lambda_Z estimation when “lambdaRule” = “interval”. This is a vector of size two, default = c(-inf, inf) |
“timeValuesPerId” | (list) | list(“idName” = idTimes,…): idTimes Observation times to use for the calculation of lambda_Z for the id idName. Default = NULL, all the times values are used. |
“nbPoints” | (integer) | Number of points for the lambda_Z estimation when “lambdaRule” = “points”. Default = 3. |
“maxNbOfPoints” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value maximum number of points to use for the lambda_Z estimation when “lambdaRule” = “R2” or “adjustedR2”. By default, the boolean equals FALSE and the value is inf. |
“startTimeNotBefore” | (list) | The first element of the list is a boolean describing if this setting is used. The second element of the list is the value minimum time value to use for the lambda_Z estimation when “lambdaRule” = “R2” or “adjustedR2”. By default, the boolean equals FALSE and the value is 0. |
“weightingNca” | (string) | Weighting method used for the regression that estimates lambda_Z. Possible methods are “Y”, “Y2” or “uniform” (default). |
“computedNCAParameters” | (vector) | All the parameters to compute during the analysis. Possible parameters: |
|
Usage
setNCASettings(...)
Arguments
... |
A collection of comma-separated pairs {settingName = settingValue}. |
See Also
Click here to see examples
# ## Not run: setNCASettings(integralMethod = "LinLogTrapLinLogInterp", weightingnca = "uniform") # set the settings whose name has been passed in argument setNCASettings(administrationType = list("1"="extravascular")) # set the administration id "1" to extravascular setNCASettings(startTimeNotBefore = list(TRUE, 15)) # set the estimation of the lambda_z with points with time over 15 setNCASettings(timeValuesPerId = list('1'=c(4, 6, 8, 30), '4'=c(8, 12, 18, 24, 30))) # set the points to use for the lambda_z to time={4, 6, 8, 30} for id '1' and ime={8, 12, 18, 24, 30} for id '4' setNCASettings(timeValuesPerId = NULL) # set the points to use for the lambda_z to the default rule ## End(Not run)
Back to the list, PKanalix API, Monolix API, Simulx API.