R functions to run PKanalix

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.





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

  • 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, as 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 logical 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.
  • shareProject: Create a zip archive file from current project and its results.

Description of the functions concerning the project settings and preferences

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

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

  • addCustomNCAParametersFromPreferences: Add custom parameters from the preferences to the project.
  • createCustomNCAParameter: Create a new NCA parameter as a formula of existing parameters and covariates.
  • createNCARatio: To use this, the dataset must have occasions.
  • deleteCustomNCAParameter: Remove a previously created custom parameter from the current project.
  • deleteNCARatio: [PKanalix] Delete an NCA ratio.
  • 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.
  • getCustomNCAParameters: Retrieve the list of the custom NCA parameters defined in the current project and/or the preferences.
  • getDataSettings: Get the data settings associated to the non compartmental analysis.
  • getNCARatios: This returns the settings used to define ratios of NCA parameters across occasions, with the same values as the ones given with createNCARatio.
  • 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 (character) applied transformation.
base (character) [optional] base data on which the transformation is applied.
name (character) [optional] name of the covariate.

See Also

deleteAdditionalCovariate

Click here to see examples

#

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 (character) [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 = <character> "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

#

----------------------------------------------------------------------------------------

LINE [ integer ]

applyFilter( filter = list(removeLines = "line>10") ) # keep only the 10th first rows

----------------------------------------------------------------------------------------

ID [ character | integer ]

If there are only integer identifiers within the data set, ids will be considered as integers. On the contrary, they will be treated as character data.

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 [integer]

applyFilter( filter = list(list(removeIds = "idIndex!=2"), list(selectIds = "id<5")) ) # select the 4 first subjects excepted the second one

----------------------------------------------------------------------------------------

OCC [ integer ]

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 [ character ]

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 [ character (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 (character) [optional] created data set name. If not defined, the default name is "currentDataSet_filtered".
origin (character) [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 = <character> "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

applyFilter

Click here to see examples

#

----------------------------------------------------------------------------------------

LINE [ integer ]

createFilter( filter = list(removeLines = "line>10") ) # keep only the 10th first rows

----------------------------------------------------------------------------------------

ID [ character | integer ]

If there are only integer identifiers within the data set, ids will be considered as integers. On the contrary, they will be treated as character data.

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 [integer]

createFilter( filter = list(list(removeIds = "idIndex!=2"), list(selectIds = "id<5")) ) # select the 4 first subjects excepted the second one

----------------------------------------------------------------------------------------

OCC [ integer ]

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 [ character ]

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 [ character (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 (character) name of the covariate.

See Also

addAdditionalCovariate

Click here to see examples

#

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 (character) data set name.

See Also

createFilter

Click here to see examples

#

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 (character) [optional] data set name to edit (current one by default)

See Also

createFilter


[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,
  sheet = NULL
)

Arguments

dataFile (character) Path to the original data file (csv, xlsx, xlsx, sas7bdat, xpt or txt). Can be absolute or relative to the current working directory.
formattedFile (character) Path to the data file that will be exported (must end with the .csv, .txt, .tsv or .xpt extension).
headerLines (optional) (integer or vector<integer>) 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 or indexes for columns containing information about ID, time, volume (in case of urine data) and sort columns. If the headers are changed by Data Formatting, the original headers should be given.

  • id (character) – Name of the column distinguishing data from different individuals.
  • time (character) – Name of the column containing observation times (in case of plasma data).
  • sort (character or vector<character>) – Name of the column(s) distinguishing different profiles.
  • start (character) – Name of the column containing urine collection start times (in case of urine data).
  • end (character) – Name of the column containing urine collection end times (in case of urine data).
  • volume (character) – Name of the column containing collected volume of urine samples (in case of urine data).
linesToExclude (optional) (integer or vector<integer>) 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.

  • distinguishWithObsId (logical) – If TRUE, different observations will be distinguished with the observation ID column (default), otherwise they will be distinguished with occasions.
  • duplicateInformation (logical) – If TRUE, information from undefined columns will be duplicated (default) in the newly created rows.
observations (optional) (list) List of lists containing information about different observation types:

  • header (character) – Name of the column containing observations. If the header is changed by Data Formatting, the original header should be given.
  • censoring (list) – List of lists containing information about different types of censored data (not necessary if there is no censored data):
    • type (character) – Type of censoring, one of "LLOQ", "ULOQ", or "interval".
    • tags (character or vector<character>) – Strings in the observation column indicating that the data is censored (e.g., "BLQ", "LLOQ", …).
    • limits – Define limits of censored data. If censoring type is "LLOQ" or "ULOQ", the lower and upper limit is defined with one of the following arguments. If censoring type is "interval", the lower and upper limits of the censoring interval are defined with a list of two of the following arguments:
      • as character – The column with the indicated header will be used to define limits.
      • as double – The value will be used as a lower/upper limit.
      • as list – Used to give different values for different categories. List needs to be have two arguments:
        • category (character) – Name of the column containing the category.
        • values (list) – List containing modalities as keys and limit values as values (e.g., list(method1 = 0.06, method2 = 0.1)).
treatmentSettings (optional) (list) List containing settings applied to all treatments.

  • infusionType ("rate"|"duration", default = "duration") – Type of values defining infusion.
  • doseIntervalsAsOccasions (default = FALSE) (logical) – If TRUE, occasions will be created for each dose interval.
  • duplicateObservationsAtDoseTimes (default = FALSE) (logical) – If TRUE and doseIntervalsAsOccasions is TRUE, doses will duplicate observations if both are at the same time.
treatments (optional) (list or character) 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:

  • times (double or vector<double>) – Times at which the dose is administered (R function seq can be used to define regular treatments).
  • amount (character, double or list) – Administered amount. Can be defined in the same way as censoring limits (through a column name, as a fixed value or as values depending on categories).
  • infusion (character, double or list) – Infusion rate or duration (see the treatmentSettings argument for more information). Can be defined in the same way as censoring limits (through a column name, as a fixed value or as values depending on categories). Does not need to be provided if the drug is not administered through an infusion.
  • admId (character, double or list) – Administration ID. Can be defined in the same way as censoring limits (through a column name, as a fixed value or as values depending on categories). If not provided, default of 1 will be used.
  • repeatCycle (list) – List containing repetition information (does not need to be provided if the treatment is not repeated):
    • duration (double) – Duration of a cycle.
    • number (integer) – Number of repetitions.

Path to files that contain treatment information can be just one path (csv, xlsx, xlsx, sas7bdat, xpt or txt, absolute or relative to the current working directory),
or a list of paths (to combine several treatments):

  • file (character) File path 1
  • file (character) File path 2
  • file (character) etc

or a list of lists with 2 elements to specify for each treatment an xls/xlsx file and sheet in the excel file:

  • list with
    • file (character) File path 1
    • sheet [optional] (character): Name of the sheet in first xlsx/xls file.
  • list with
    • file (character) File path 2
    • sheet [optional] (character): Name of the sheet in second xlsx/xls file.
  • etc
additionalColumns (optional) (character or vector<character>) Path(s) to the file(s) containing additional columns (needs to have the ID column). Accepted formats are csv, xlsx, xlsx, sas7bdat, xpt or txt. It can be just one path, or a list of paths (to use columns from several external files):

  • file (character) File path 1
  • file (character) File path 2
  • file (character) etc

or a list of lists with 2 elements to specify an xls/xlsx file and sheet in the excel file:

  • list with
    • file (character) File path 1
    • sheet [optional] (character): Name of the sheet in first xlsx/xls file.
  • list with
    • file (character) File path 2
    • sheet [optional] (character): Name of the sheet in second xlsx/xls file.
  • etc
sheet [optional] (character): Name of the sheet in xlsx/xls file. If not provided, the first sheet is used.

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.

See Also

getFormatting

Click here to see examples

#

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"),

           observations = list(header="CONC",

                               censoring = list(type="interval", tags = c("BLQ"), 

                                                limits=list(0,"LLOQ"))),

           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"),

           observations = list(header="CONC",

                               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"),

           observations = list(header="CONC",

                               censoring = list(type="interval", tags = c("BLQ"), 

                                                limits=list(0,"LLOQ"))),

           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"),

           observations = list(header="CONC",

                               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", sort="FORM"),

           observations = list(header="CONC",

                               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: (character) the name of the data set
  • file: (character) the path of the data set file
  • current: a logical 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 the parent and details about filter definition

Click here to see examples

#

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<character>): covariate names
  • type (vector<character>): covariate types. Existing types are "continuous", "continuoustransformed", "categorical", "categoricaltransformed"./
    In Monolix mode, "latent" covariates are also allowed.

  • range (vector<pair<double>>): continuous covariate ranges
  • categories (vector<vector<character>>): discrete covariates modalities
  • [Monolix] modalityNumber (vector<integer>): 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

#

info = getCovariateInformation() # Monolix mode with latent covariates

info

  -> $name

     c("sex","wt","lcat")

  -> $type

     c(sex = "categorical", wt = "continuous", lcat = "latent")

  -> $range

     list(wt = c(55, 73.5))

  -> $categories

     c(sex = c("F", "M"))

  -> $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 settings from a loaded project.
It returns a list with the same items as the arguments of formatData, where the header items correspond to formatted headers if they have been changed by Data Formatting, and in addition:

  • originalHeaders (character) – list of original names of the columns used for data formatting.

Usage

getFormatting()

See Also

formatData

Click here to see examples

#

initializeLixoftConnectors(software = "pkanalix")

loadProject(paste0(getDemoPath(),"/0.data_formatting/DoseAndLOQ_manual.pkx"))

getFormatting()

}


Back to the list, PKanalix API, Monolix API, Simulx API.


[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<character>): observation names.
  • type (vector<character>): observation generic types. Existing types are "continuous", "discrete", "event".
  • [Monolix] detailedType (vector<character>): observation specialized types set in the structural model. Existing types are "continuous", "bsmm", "wsmm", "categorical", "count", "exactEvent", "intervalCensoredEvent".
  • [Monolix] mapping (vector<character>): 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

#

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 (character)
  • time (double)
  • amount (double)
  • [optional] administrationType (integer)
  • [optional] infusionTime (logical)
  • [optional] isArtificial (logical): is created from SS or ADDL column
  • [optional] isReset (logical): 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

applyFilter selectData

Click here to see examples

#

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 (character) current name of the covariate to rename
newName (character) new name.

See Also

addAdditionalCovariate

Click here to see examples

#

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 (character) new name.
oldName (character) [optional] current name of the filtered data set to rename (current one by default)

See Also

createFilter editFilter

Click here to see examples

#

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 (character) data set name.

See Also

getAvailableData

Click here to see examples

#

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

#

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

#

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 (logical) [optional] Should software switch security be overpassed or not. Equals FALSE by default.

Value

A logical equaling TRUE if the initialization has been successful and FALSE if not.

Click here to see examples

#

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

The Lixoft demos path corresponding to the currently active software.

Click here to see examples

#

  getDemoPath()

## 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,
  settings = list(),
  stratify = list(),
  preferences = list()
)

Arguments

obs1 (character) Name of the observation to display in x axis (in dataset header).
By default the first observation is considered.
obs2 (character) Name of the observation to display in y axis (in dataset header).
By default the second observation is considered.
settings List with the following settings

  • dots (logical) – If TRUE individual observations are displayed as dots (default TRUE).
  • lines (logical) – If TRUE individual observations are displayed as lines (default TRUE).
  • legend (logical) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (logical) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (logical) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (logical) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (character) label on x axis (Name of obs1 by default).
  • ylab (character) label on y axis (Name of obs2 by default).
  • ncol (integer) number of columns when facet = TRUE (default 4).
  • xlim (c(double, double)) limits of the x axis.
  • ylim (c(double, double)) limits of the y axis.
  • fontsize (integer) Plot text font size.
  • units (logical) Set units in axis labels (only available with PKanalix).
  • scales (character) Should scales be fixed ("fixed"),
    free ("free", the default), or free in one dimension ("free_x", "free_y") (default "free").

stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition (vector<double>(continuous) || list<vector<character>>(categorical)) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").
  • individualSelection – Ids to display (by default the 12 first ids are displayed) defined as:
    • indices (vector<integer>) – Indices of the individuals to display (by default, the 12 first individuals are selected). If occasions are present, all occasions of the selected individuals will be displayed. Takes precedence over ids. For instance c(5,6,10,11).
    • isRange (logical) – If TRUE, all individuals whose index is inside [min(indices), max[indices]] are selected (FALSE by default).
      Forced to FALSE if ids is defined.

    • ids (vector<character>) – Names of the individuals to display. If occasions are present, all occasions of the selected individuals will be displayed. For instance c("101-01","101-02","101-03"). If ids are integers, can also be c(1,3,6).
      Ignored if indices is defined.

preferences (optional) preferences for plot display,
run getPlotPreferences("plotBivariateDataViewer") to check available displays.

Value

A ggplot object

See Also

getPlotPreferences

Click here to see examples

#

  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(individualSelection = list(indices = 10)))

  plotBivariateDataViewer(stratify = list(split = "age",

                                          filter = list("sex", "1"),

                                          groups = list(name = "age", definition = c(25))))

  plotBivariateDataViewer(stratify = list(color = "wt",

                                          groups = list(name = "wt", definition = 75)))

  plotBivariateDataViewer(stratify = list(split = c("age", "sex"),

                                          groups = list(name = "age", definition = 25)))

  # 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,
  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).
settings List with the following settings

  • regressionLine (logical) If TRUE, Add regression line in scatterplots (default TRUE).
  • spline (logical) If TRUE, Add xpline in scatterplots (default FALSE).
  • histogramColors (vector<character>) List of colors to use in histograms plots.
  • histogramPosition (character) Type of histogram: "stacked", "grouped" or
    "default" (histograms with categorical covariates in xaxis the plot is grouped else it is stacked),
    (Default is "default")

  • legend (logical) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (logical) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (integer) number of columns when facet = TRUE (default 4).
  • bins (integer) number of bins for the histogram (default 10)
  • fontsize (integer) Plot text font size.
preferences (optional) preferences for plot display,
run getPlotPreferences("plotCovariates") to check available displays.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition (vector<double>(continuous) || list<vector<character>>(categorical)) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").
  • individualSelection – Ids to display (by default the 12 first ids are displayed) defined as:
    • indices (vector<integer>) – Indices of the individuals to display (by default, the 12 first individuals are selected). If occasions are present, all occasions of the selected individuals will be displayed. Takes precedence over ids. For instance c(5,6,10,11).
    • isRange (logical) – If TRUE, all individuals whose index is inside [min(indices), max[indices]] are selected (FALSE by default).
      Forced to FALSE if ids is defined.

    • ids (vector<character>) – Names of the individuals to display. If occasions are present, all occasions of the selected individuals will be displayed. For instance c("101-01","101-02","101-03"). If ids are integers, can also be c(1,3,6).
      Ignored if indices is defined.

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

getPlotPreferences

Click here to see examples

#

  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(split = "AGE",

                                 filter = list("Period", 1),

                                 groups = list(name = "AGE", definition = 25)))

  preferences <- list(regressionLine = list(color = "#E5551B"))

  plotCovariates(covariatesRows = "AGE", covariatesColumns = "WT",

                 stratify = list(color = "HT",

                                 groups = list(name = "HT", definition = 181),

                                 colors = c("#2BB9DB", "#DD6BD2")),

                 preferences = preferences)

  plotCovariates(covariatesRows = "HT", covariatesColumns = "WT",

                 stratify = list(split = c("AGE", "SEQ"),

                                 groups = list(name = "AGE", definition = 25)))

  # Mulitple covariates

  plotCovariates()

  plotCovariates(covariatesRows = c("AGE", "SEQ", "HT"), covariatesColumns = c("AGE", "SEQ", "HT"))

  plotCovariates(stratify = list(filter = list("AGE", 2),

                                 groups = list(name = "AGE", definition = c(25, 30))))


Back to the list, PKanalix API, Monolix API, Simulx API.


[Monolix – PKanalix] Generate Observed data plot

Description

Plot the observed data.

Usage

plotObservedData(
  obsName = NULL,
  settings = list(),
  stratify = list(),
  preferences = list()
)

Arguments

obsName (character) Name of the observation (if several OBS ID).
By default the first observation is considered.
settings List with the following settings:
[CONTINUOUS – DISCRETE] Settings specific to continuous and discrete data

  • dots (logical) – If TRUE individual observations are displayed as dots (default TRUE).
  • lines (logical) – If TRUE individual observations are displayed as lines (default TRUE).
  • mean (logical) – If TRUE mean of observations is displayed (default FALSE for Monolix, TRUE for PKanalix).
  • error (logical) If TRUE error bar is displayed (default FALSE for Monolix, TRUE for PKanalix).
  • meanMethod (character) – When mean is set to TRUE, display arithmetic mean ("arithmetic") or
    geometric mean ("geometric"). Default value is "arithmetic".

  • errorMethod (character) – When error is set to TRUE, display standard deviation ("standardDeviation") or
    standard error ("standardError"). Default value is "standardDeviation".

  • useCensored (logical) If TRUE, use censored data to compute mean and error (default FALSE)
  • timeAfterLastDose (logical) If TRUE, display observations as relative to the previous dose for the x-axis (default FALSE)
    Can be applied only for continuous and discrete data with dose information, and if xvariable is different from "regressor".

  • xvariable (character) Choose information to use on x-axis, one of "time", "nominalTime" or a regressor name (default "time")
    For event data, plot against regressor value is not available.

  • binLimits (logical) – If TRUE, bins limits are displayed as vertical lines (default FALSE).
  • binsSettings a list of settings for time axis binning for observation statistics computation:
    • criteria (character) – Binning criteria, one of ‘equalwidth’, ‘equalsize’, or ‘leastsquare’ methods.
      (default "leastsquare").

    • is.fixedNbBins (logical) – If TRUE, a fixed number of bins is used (see nbBins). If FALSE (default), the number of bins is optimized using binRange and nbBinData.
    • nbBins (integer) – Number of bins (default 10). Ignored if is.fixedNbBins=FALSE.
    • binRange (vector(integer, integer)) – Minimum and maximum number of bins when bins are optimized (default c(5, 100)).
    • nbBinData (vector(integer, integer)) – Minimum and maximum number of data points per bin when bins are optimized (default c(10, 200) for Monolix and c(3, 200) for PKanalix).

[DISCRETE] Settings specific to discrete data

  • plot (character) Type of plot: "continuous" (default), "stacked" or "grouped".
  • histogramColors (vector<character>) List of colors to use in histograms plots.

[EVENT] Settings specific to event data

  • eventPlot – Display Survival function ("survivalFunction") or mean number of
    events per subject ("averageEventNumber") (default "survivalFunction").

Other settings

  • cens (logical) – If TRUE censored data are displayed as dots (default TRUE).
  • dosingTimes (logical) – If TRUE, dosing times are displayed as vertical lines (default FALSE). Cannot be used if timeAfterLastDose=TRUE.
  • legend (logical) – If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) – If TRUE, plot grid is displayed (default TRUE).
  • xlog (logical) – If TRUE, log-scale on x axis is used (default FALSE).
  • ylog (logical) – If TRUE, log-scale on y axis is used (default FALSE).
  • xlab (character) – Label on x axis (default "time").
  • ylab (character) – Label on y axis (default obsName).
  • ncol (integer) – Number of columns when using split (default 4).
  • xlim (c(double, double)) – Limits of the x axis.
  • ylim (c(double, double)) – Limits of the y axis.
  • fontsize (integer) – Font size of text elements (default 11).
  • units (logical) – If TRUE, units are added in axis labels (default TRUE) (only available with PKanalix).
  • scales (character) Should scales be fixed ("fixed"), free ("free", default), or free in one dimension ("free_x", "free_y").
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition (vector<double>(continuous) || list<vector<character>>(categorical)) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • mergedSplits (logical) – When "split" is used and mean=T, should the means of the different groups be displayed on the same plot (TRUE)
    or on different subplots (FALSE, default). Not available for count/categorical data. When mergedSplits=T, the "color" argument is ignored and the coloring is done according to the splitted groups.

  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").
  • individualSelection – Ids to display (by default the 12 first ids are displayed) defined as:
    • indices (vector<integer>) – Indices of the individuals to display (by default, the 12 first individuals are selected). If occasions are present, all occasions of the selected individuals will be displayed. Takes precedence over ids. For instance c(5,6,10,11).
    • isRange (logical) – If TRUE, all individuals whose index is inside [min(indices), max[indices]] are selected (FALSE by default).
      Forced to FALSE if ids is defined.

    • ids (vector<character>) – Names of the individuals to display. If occasions are present, all occasions of the selected individuals will be displayed. For instance c("101-01","101-02","101-03"). If ids are integers, can also be c(1,3,6).
      Ignored if indices is defined.

preferences (optional) preferences for plot display,
run getPlotPreferences("plotObservedData") to check available options.

Value

A ggplot object

See Also

getPlotPreferences

Click here to see examples

#

  project <- paste0(getDemoPath(), "/2.case_studies/project_aPCSK9_SAD.pkx")

  loadProject(project)

  # by default, individual profiles and mean curve are displayed

  plotObservedData()

  # displaying dots and mean curve by dose group, merged on a single plot

  plotObservedData(settings=list(lines=F,

                            mean=T,

                            meanMethod="geometric",

                            ylog=T,

                            ylab="mAb concentration (ug/mL)"),

              stratify=list(split="DOSE_mg",

                            mergedSplits=T),

              preferences=list(observationStatistics=list(lineWidth=0.8),

                               obs=list(radius=2)))

  # coloring by ID, without mean curve

  plotObservedData(settings=list(mean=F,error=F),

              stratify = list(color=c("id")))

  # changing the settings to display only the mean curve with SE, with bin limits and dosing times

  plotObservedData(settings=list(dots=F,

                            lines=F,

                            mean=T,

                            error=T,

                            meanMethod="geometric",

                            errorMethod="standardError",

                            useCensored=T,

                            binLimits=T,

                            binsSettings=list(criteria="leastsquare", is.fixedNbBins=T, nbBins=20),

                            cens=F,

                            dosingTimes=T,

                            legend=T,

                            grid=F,

                            xlog=F,ylog=T,

                            xlab="Time since first dose (days)",

                            ylab="mAb concentration (ug/mL)",

                            xlim=c(0,96),

                            ylim=c(0.1,70),

                            fontsize=12,

                            units=F))

  # changing preferences for observations, censored observations and bin limits

  plotObservedData(settings=list(dots=T, lines=T, legend=T, dosingTimes=T, mean=F, error=F, ylog=T, cens=T),

              preferences=list(obs=list(color="#161617",

                                        radius=2,

                                        shape=18,

                                        lineWidth=0.2,

                                        lineType="dashed",

                                        legend="Observations"),

                               censObs=list(color="#cdced1",

                                            radius=2,

                                            shape=16,

                                            legend="Censored observations"),

                               dosingTimes=list(color="#fcba03",

                                                lineWidth=0.5,

                                                lineType="solid",

                                                legend="Time of doses")))

  # changing preferences for mean and bin limits

  plotObservedData(settings=list(dots=F, lines=F, legend=T, binLimits=T, grid=F),

              preferences=list(observationStatistics=list(color="#161617",

                                                          whiskersWidth=3,

                                                          lineWidth=0.7,

                                                          lineType="solid",

                                                          legend="mean and standard deviation over bins"),

                               binsValues=list(color="#cdced1",

                                               lineWidth=0.5,

                                               lineType="dashed",

                                               legend="bins")))

  # color and split by DOSE_mg but grouping two doses levels together

  plotObservedData(settings=list(mean=F,error=F,ylim=c(0,120)),

              stratify = list(groups=list(name="DOSE_mg",definition=list(c("150mg"), c("300mg","800mg"))),

                              color="DOSE_mg",

                              split="DOSE_mg"))

  # selecting only one individual

  plotObservedData(settings=list(mean=F,error=F),

                   stratify = list(individualSelection=list(indices=1)))

  plotObservedData(settings=list(mean=F,error=F),

                   stratify = list(individualSelection=list(ids="1")))

  #============= projects with several covariates to stratify

initializeLixoftConnectors(software = "pkanalix", force=T)

project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

loadProject(project)

# defining groups for AGE and HT, coloring by HT and filtering by AGE

plotObservedData(settings=list(mean=F,error=F),

            stratify = list(groups=list(list(name="AGE", definition=c(24, 34)),

                                        list(name="HT", definition=c(184.5))),

                            color="HT",

                            colors=c("#cdced1","#161617"),

                            filter=list("AGE",c(1,3))))

# filter to keep only second sequence (TR) and FORM=test

plotObservedData(settings=list(mean=F,error=F),

            stratify = list(filter=list(list("SEQ",2),list("FORM","test"))))

  #============= project with time-to-event data

initializeLixoftConnectors(software = "monolix", force=T)

project <- file.path(getDemoPath(), "/4.joint_models/4.2.continuous_noncontinuous/PKrtte_project.mlxtran")

loadProject(project)

# survival Kaplan-Meier curve

plotObservedData(obsName="Hemorrhaging")

# mean number of events

plotObservedData(obsName="Hemorrhaging",

                 settings=list(eventPlot="averageEventNumber"))

#============= project with categorical data

initializeLixoftConnectors(software = "monolix", force=T)

project <- file.path(getDemoPath(), "/4.joint_models/4.2.continuous_noncontinuous/warfarin_cat_project.mlxtran")

loadProject(project)

# display is the same as for continuous data by default

plotObservedData(obsName="Level")

# display as stacked or as grouped

plotObservedData(obsName="Level", settings=list(plot="stacked"))

plotObservedData(obsName="Level", settings=list(plot="grouped"))

# splitting by sex

plotObservedData(obsName="Level", 

                 settings=list(plot="stacked", ylim=c(0,30), legend=T),

                 stratify=list(split="sex"))

#============== project with multiple-dose to show timeAfterLastDose

initializeLixoftConnectors(software = "monolix", force=T)

project <- file.path(getDemoPath(), "/6.PK_models/6.3.multiple_doses/addl_project.mlxtran")

loadProject(project)

# with "time after first dose" by default

plotObservedData()

# with "time since previous dose"

plotObservedData(settings=list(timeAfterLastDose=T))

#============= project with regressor to show regressor on x-axis

initializeLixoftConnectors(software = "monolix", force=T)

project <- file.path(getDemoPath(), "/7.miscellaneous/7.1.regression_variables/reg3_warfarinPD_linearInterp_project.mlxtran")

loadProject(project)

# with "time" on x-axis by default

plotObservedData()

# with regressor "Cc" (concentration) on x-axis

plotObservedData(settings=list(xvariable="Cc"))

#============= project with nominal time on x-axis

initializeLixoftConnectors(software = "pkanalix", force=T)

project <- file.path(getDemoPath(), "/1.basic_examples/project_nominal_time.pkx")

loadProject(project)

# with "actual time" by default

plotObservedData()

# with nominal time on x-axis

plotObservedData(settings=list(xvariable="nominalTime"))


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] BE Confidence Intervals plot

Description

Plot the individual NCA parameters vs covariates.

Usage

plotBEConfidenceIntervals(
  parameters = NULL,
  formulations = NULL,
  settings = list(),
  preferences = 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

  • median (logical) – If TRUE median is displayed (default TRUE).
  • limits (logical) – If TRUE confidence intervals limits are displayed (default TRUE).
  • legend (logical) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (logical) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ylog (logical) add (TRUE) / remove (FALSE) log scaling on y axis (default TRUE).
  • ylab (character) label on y axis (default Ratio).
  • ncol (integer) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
  • units (logical) Set units in axis labels (default TRUE).
preferences (optional) preferences for plot display,
run getPlotPreferences("plotBEConfidenceIntervals") to check available displays.

Value

  • A ggplot object if one parameter,
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runNCAEstimation()

  runBioequivalenceEstimation()

  plotBEConfidenceIntervals()

  plotBEConfidenceIntervals(parameters = "Cmax",

                            settings = list(legend = T))


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()
)

Arguments

parameters (vector<character>) vector of NCA parameters (included in BE calculations) to display.
(by default the first 4 computed parameters are displayed).
settings List with the following settings:

  • dots (logical) – If TRUE, parameters averaged over period and sequence are displayed as dots (default TRUE).
  • lines (logical) – If TRUE, parameters averages belonging to the same sequence are connected by lines (default TRUE).
  • error (logical) – If TRUE, standard deviations are displayed as error bars (default TRUE).
  • formulationColors (vector<character>) Vector of colors to use for each formulation when there is more than one formulation.
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ylog (logical) If TRUE, log-scale on y axis is used (default FALSE).
  • ncol (integer) Number of columns to arrange subplots (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
  • xlab (character) Label on x-axis (no label by default) .
preferences (optional) preferences for plot display,
run getPlotPreferences("plotBESequenceByPeriod") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.

Value

  • A ggplot object if only one parameter is given in parameters
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getPlotPreferences

Click here to see examples

#

project <- file.path(getDemoPath(), "/3.bioequivalence/project_crossover_bioequivalence.pkx")

loadProject(project)

runNCAEstimation()

runBioequivalenceEstimation()

# display by default

plotBESequenceByPeriod()

# select only a subplot of parameters used for BE analysis

plotBESequenceByPeriod(parameters = c("AUCINF_obs","Cmax"))

# changing the settings

plotBESequenceByPeriod(parameters = c("AUCINF_obs","Cmax"),

                       settings=list(dots=T,

                                     lines=T,

                                     error=F,

                                     legend=T,

                                     grid=F,

                                     ylog=T,

                                     ncol=1,

                                     units=F,

                                     fontsize=9,

                                     xlab="Sequence of periods"))

# changing the preferences

plotBESequenceByPeriod(parameters = c("AUCINF_obs","Cmax"),

                       settings=list(legend=T),

                       preferences = list(formulationDot=list(radius=4,

                                                              shape=18,

                                                              legend="Formulations tested"),

                                          observationStatistics=list(color="#202120",

                                                                     whiskersWidth=1,

                                                                     lineWidth=1,

                                                                     lineType="solid",

                                                                     legend="Standard deviation"),

                                          sequence=list(color="#202120",

                                                        lineWidth=1,

                                                        lineType="dashed",

                                                        legend="Sequences")))

# define groups of WT and split by WT

plotBESequenceByPeriod(parameters = c("AUCINF_obs","Cmax"),

                       stratify=list(groups=list(name="WT", definition=c(70)),

                                     split=c("WT")))

# define groups of AGE and WT and filter by AGE and WT

plotBESequenceByPeriod(parameters = c("AUCINF_obs","Cmax"),

                       stratify=list(groups=list(list(name="WT", definition=c(70)),

                                                 list(name="AGE", definition=c(24,34))),

                                     filter=list(list("AGE",c(1,3)),

                                                 list("WT",2))))


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] Plot subject-by-formulation

Description

Plot the Bioequivalence parameters as Subject-by-formulation.

Usage

plotBESubjectByFormulation(
  parameters = NULL,
  formulations = NULL,
  settings = list(),
  preferences = NULL,
  stratify = list()
)

Arguments

parameters (vector<character>) vector of NCA parameters (included in BE calculations) to display.
(by default the first 4 computed parameters are displayed).
formulations (vector<character>) vector of test (i.e non-ref) formulations to display.
(by default the first 4 test formulations are displayed).
settings List with the following settings:

  • dots (logical) If TRUE, NCA parameters are displayed as dots (default TRUE).
  • lines (logical) If TRUE, NCA parameters belonging to the same individual are connected by lines (default TRUE).
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ylog (logical) If TRUE, log-scale on y axis is used (default TRUE).
  • ncol (logical) Number of columns to arrange the subplots (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
preferences (optional) preferences for plot display,
run getPlotPreferences("plotBESubjectByFormulation") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.

Value

  • A ggplot object if only one parameter is given in parameters
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getPlotPreferences

Click here to see examples

#

project <- file.path(getDemoPath(), "/3.bioequivalence/project_crossover_bioequivalence.pkx")

loadProject(project)

runNCAEstimation()

runBioequivalenceEstimation()

# display by default

plotBESubjectByFormulation()

# select only a subplot of parameters used for BE analysis

# if several test formulations are compared w.r.t a reference formulation, it is also possible to select which test formulation to display

plotBESubjectByFormulation(parameters = c("AUCINF_obs","Cmax"),

                           formulations = c("test"))

# changing the settings

plotBESubjectByFormulation(parameters = c("AUCINF_obs","Cmax"),

                           settings=list(dots=T,

                                         lines=T,

                                         legend=T,

                                         grid=F,

                                         ylog=T,

                                         units=F,

                                         fontsize=9))

# changing the preferences

plotBESubjectByFormulation(parameters = c("AUCINF_obs","Cmax"),

                           settings=list(legend=T),

                           preferences = list(formulationDot=list(color="#202120",

                                                                  radius=4,

                                                                  shape=18,

                                                                  legend="NCA parameter for each formulation"),

                                              formulationLine=list(color="#202120",

                                                                   lineWidth=0.5,

                                                                   lineType="dashed",

                                                                   legend="Individuals")))

# define groups of WT and split by WT

plotBESubjectByFormulation(parameters = c("AUCINF_obs","Cmax"),

                           stratify=list(groups=list(name="WT", definition=c(70)),

                                         split=c("WT")))

# define groups of AGE and WT and filter by AGE and WT

plotBESubjectByFormulation(parameters = c("AUCINF_obs","Cmax"),

                           stratify=list(groups=list(list(name="WT", definition=c(70)),

                                                     list(name="AGE", definition=c(24,34))),

                                         filter=list(list("AGE",c(1,3)),

                                                     list("WT",2))))


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()
)

Arguments

obsName (character) Name of the observation (if several OBS ID are used).
By default the first observation is considered.
settings List with the following settings:

  • obsDots (logical) – If TRUE, individual observations are displayed as dots (default TRUE).
  • obsLines (logical) – If TRUE, individual observations are displayed as lines (default FALSE).
  • cens (logical) – If TRUE, censored observations are displayed as intervals (default TRUE).
  • indivFits (logical) – If TRUE, individual fits are displayed (default TRUE).
  • dosingTimes (logical) – If TRUE, dosing times are displayed as vertical lines (default FALSE).
  • splitOccasions (logical) – If TRUE, occasions are displayed on separate subplots (default TRUE). If FALSE, all occasions are overlaid on the same subplot.
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • xlog (logical) If TRUE, log-scale on x axis is used (default FALSE).
  • ylog (logical) If TRUE, log-scale on y axis is used (default FALSE).
  • xlab (character) label on x axis (default "time").
  • ylab (character) label on y axis (default: observation name).
  • ncol (integer) number of columns to arrange the subplots (default 4).
  • xlim (c(double, double)) limits of the x axis.
  • ylim (c(double, double)) limits of the y axis.
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
  • scales (character) Should scales be fixed ("fixed"),
    free ("free", default), or free in one dimension ("free_x", "free_y").

preferences (optional) preferences for plot display,
run getPlotPreferences("plotCAIndividualFits") to check available displays.
stratify List with the stratification arguments. Stratification is not available in case "sparse data" calculations are used.

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates and occasions, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name (character) covariate name (e.g "AGE")
    definition (vector<double>(continuous) || list<vector<character>>(categorical)) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors (e.g list(c("study101"), c("study201","study202")))
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").
  • individualSelection – Ids to display (by default the 12 first ids are displayed) defined as:
    • indices (vector<integer>) – Indices of the individuals to display (by default, the 12 first individuals are selected). If occasions are present, all occasions of the selected individuals will be displayed. Takes precedence over ids. For instance c(5,6,10,11).
    • isRange (logical) – If TRUE, all individuals whose index is inside [min(indices), max[indices]] are selected (FALSE by default).
      Forced to FALSE if ids is defined.

    • ids (vector<character or integer>) – Names of the individuals to display. If occasions are present, all occasions of the selected individuals will be displayed. For instance c("101-01","101-02","101-03"). If ids are integers, can also be c(1,3,6).
      Ignored if indices is defined.

Value

A ggplot object

See Also

getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runCAEstimation()

# by default 12 individuals are displayed (with 2 occasions each in this example)

plotCAIndividualFits()

# loop to create several plots ("pages") with 6 individuals (2 occasions each) per page, using "indices" and "isRange"

nbIndiv <- 18

nbIndivPerPage <- 6

nbPages <- ceiling(nbIndiv/nbIndivPerPage)

for(i in 1:nbPages){

  plotCAIndividualFits(stratify = list(individualSelection=list(indices=c(nbIndivPerPage*(i-1)+1,nbIndivPerPage*i),

                                                                isRange=T)))

}

# selection of individuals based on id names

plotCAIndividualFits(stratify = list(individualSelection=list(ids=c("6","17"))))

plotCAIndividualFits(stratify = list(individualSelection=list(ids=c(6, 17))))

# changing the elements to display

plotCAIndividualFits(settings = list(obsDots=T, 

                                     obsLines=T, 

                                     cens=T,

                                     dosingTimes=T,

                                     splitOccasions=T, 

                                     ncol=5, 

                                     legend=T, 

                                     grid=F, 

                                     ylog=T,

                                     units=F, 

                                     fontsize=9,

                                     ylim=c(0.05,15),

                                     ylab="Theophylline concentration (ug/mL)"))

# get available preferences

getPlotPreferences("plotCAIndividualFits")

# change color, radius, shape, lineType, lineWidth and legend for all elements

plotCAIndividualFits(settings = list(legend=T, obsLines=T, dosingTimes=T),

                     stratify = list(individualSelection=list(ids=c(1,2,3,4))),

                     preferences = list(obs=list(color="#161617",

                                                 radius=2,

                                                 shape=18,

                                                 lineWidth=0.5,

                                                 lineType="dashed",

                                                 legend="Measured concentrations"),

                                        censObsIntervals=list(color="#cdced1",

                                                              opacity=1,

                                                              lineType="solid",

                                                              lineWidth=1,

                                                              legend="BLQ observations"),

                                        dosingTimes=list(color="#ff793f",

                                                         lineWidth=1,

                                                         lineType="solid",

                                                         legend="Time of doses"),

                                        indivFits=list(color="#00a4c6",

                                                       lineWidth=1,

                                                       lineType="solid",

                                                       legend="Individual predictions")))

# define groups for AGE and color by AGE and FORM

plotCAIndividualFits(settings=list(legend=T),

                     stratify = list(groups=list(name="AGE", definition=c(24, 34)),

                                     color=c("AGE","FORM"),

                                     individualSelection=list(ids=c(1,2,3,4))))

# filter to keep only individuals with sequence "RT" (first among "RT" and "TR")

plotCAIndividualFits(stratify = list(filter=list(list("SEQ","RT"))))

plotCAIndividualFits(stratify = list(filter=list(list("SEQ",1))))


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()
)

Arguments

obsName (character) Name of the observation (if several OBS ID are used).
By default the first observation id is considered.
settings List with the following settings:

  • useCensored (logical) Choose to use BLQ data (TRUE) or to ignore it (FALSE, default) to compute the spline.
  • obs (logical) – If TRUE, observations are displayed as dots (default TRUE).
  • cens (logical) – If TRUE, censored observations are displayed as red dots (default TRUE).
  • spline (logical) – If TRUE, spline is displayed (default FALSE).
  • identityLine (logical) – If TRUE, identity line y=x is displayed (default TRUE).
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • xlog (logical) If TRUE, log-scale on x axis is used (default FALSE).
  • ylog (logical) If TRUE, log-scale on y axis is used (default FALSE).
  • ncol (integer) number of columns when split is used (default 4).
  • xlim (c(double, double)) limits of the x axis.
  • ylim (c(double, double)) limits of the y axis.
  • xlab (character) label on x axis (default "individual predictions").
  • ylab (character) label on y axis (default "observations").
  • fontsize (integer) Font size of text elements (default 11).
  • scales (character) Should scales be fixed ("fixed"), free ("free", default), or free in one dimension ("free_x", "free_y")
preferences (optional) preferences for plot display,
run getPlotPreferences("plotCAObservationsVsPredictions") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). Coloring applies to dots of plots w.r.t continuous covariates, but not on histograms or boxplots. For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").

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

#

loadProject(project)

setCASettings(blqMethod="LOQ") #not recommended but allows to show plot settings related to censored data

runCAEstimation()

# plot with default options

plotCAObservationsVsPredictions()

# changing the elements to display

plotCAObservationsVsPredictions(settings=list(spline=T,

                                              useCensored=T,

                                              cens=T,

                                              identityLine=F,

                                              legend=T,

                                              grid=F,

                                              xlog=T,

                                              ylog=T,

                                              xlim=c(0.01,20),

                                              ylim=c(0.01,20),

                                              fontsize=9,

                                              xlab=c('Individual CA predictions'),

                                              ylab=c('Theophylline measurements (obs)')))

# coloring by FORM and Period using a greyscale

plotCAObservationsVsPredictions(settings = list(legend=T),

                                stratify = list(color=c("FORM", "Period"),

                                                colors=c("#cdced1","#97989c","#4c4d4f","#161617")))

# coloring by FORM and filtering to keep only SEQ=TR

plotCAObservationsVsPredictions(settings = list(legend=T),

                                stratify = list(color=c("FORM"),

                                                filter=list("SEQ","TR")))

# defining groups for AGE and HT, coloring by AGE and splitting by HT

plotCAObservationsVsPredictions(settings = list(legend=T, cens=F),

                                stratify = list(groups=list(list(name="AGE", definition=c(24, 34)), 

                                                            list(name="HT", definition=180)),

                                                color="AGE",

                                                colors=c("#00a4c6","#64bc48","#ff793f"),

                                                split="HT"))


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()
)

Arguments

parametersRows (vector<character>) vector with the name of CA parameters to display on rows
(by default the first 4 computed parameters are displayed).
parametersColumns (vector<character>) vector with the name of CA parameters to display on columns
(by default parametersColumns = parametersRows).
settings List with the following settings:

  • regressionLine (logical) If TRUE, regression line is displayed (default TRUE).
  • spline (logical) If TRUE, spline is displayed (default FALSE).
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ncol (integer) number of columns when using split (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
preferences (optional) preferences for plot display,
run getPlotPreferences("plotCAParametersCorrelation") to check available displays.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). Coloring applies to dots of plots w.r.t continuous covariates, but not on histograms or boxplots. For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").

Value

  • A ggplot object if one element in parametersRows and parametersColumns,
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runCAEstimation()

# by default only the 4 first CA parameters are shown

plotCAParametersCorrelation()

# choosing to display only a subset of possible covariates and CA parameters (same param on rows and columns)

plotCAParametersCorrelation(parametersRows = c("Cl","V"))

# selecting different parameters on rows and columns

plotCAParametersCorrelation(parametersRows = c("Cl","V"),

                            parametersColumns = c("Tlag","ka"))

# changing the settings to choose which elements to display

plotCAParametersCorrelation(settings = list(regressionLine=F,

                                            spline=T,

                                            legend=T,

                                            grid=F,

                                            units=F,

                                            fontsize=8))

# changing the preferences (appearance of the elements)

plotCAParametersCorrelation(parametersRows = c("Cl","V"),

                            settings=list(legend=T, spline=T),

                            preferences = list(obs=list(color="#202120",

                                                        radius=2,

                                                        shape=18,

                                                        legend="CA parameter values"),

                                               regressionLine=list(color="#202120",

                                                                   lineWidth=1,

                                                                   lineType="dashed",

                                                                   legend="Linear regression line"),

                                               spline=list(color="#97989c",

                                                           lineWidth=1,

                                                           lineType="solid",

                                                           legend="Spline regression line")))

# split each plot into two subplot for FORM=ref and FORM=test, vertically (ncol=1)

plotCAParametersCorrelation(parametersRows = c("ka","Cl","V"),

                            settings=list(ncol=1),

                            stratify = list(split=c("FORM")))

# define groups for AGE and HT, color by HT and filter by AGE

plotCAParametersCorrelation(settings=list(legend=T),

                            parametersRows = c("Cl","V"),

                            stratify = list(groups=list(list(name="AGE", definition=c(30, 35)),

                                                        list(name="HT", definition=c(184.5))),

                                            color="HT",

                                            colors=c("#cdced1","#161617"),

                                            filter=list("AGE",c(1,3))))

# filter to keep only second sequence (TR) and FORM=test

plotCAParametersCorrelation(settings=list(legend=T),

                            parametersRows = c("Cl","V"),

                            stratify = list(filter=list(list("SEQ",2),list("FORM","test"))))


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()
)

Arguments

parameters (vector<character>) vector of CA parameters to display.
(by default the first 12 computed ca parameters are displayed).
settings List with the following settings:

  • plot (character) Type of plot: probability density distribution as histogram ("pdf", default), or
    cumulative density distribution ("cdf").

  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ncol (integer) number of columns to arrange subplots (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
  • scales (character) Should scales be fixed ("fixed"), free ("free", default), or free in one dimension ("free_x", "free_y").
preferences (optional) preferences for plot display,
run getPlotPreferences("plotCAParametersDistribution") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.

Value

  • A ggplot object if only one parameter is specified in parameters
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runCAEstimation()

# plot a single parameter, as pdf or cdf

plotCAParametersDistribution(parameters = "V", settings = list(plot = "pdf"))

plotCAParametersDistribution(parameters = "Cl", settings = list(plot = "cdf"))

# with a single parameter, a ggplot object if returned and additional ggplot elements can be added

library(ggplot2)

plotCAParametersDistribution(parameters = "V")+geom_vline(xintercept=52)

# display 4 parameters in a 2x2 matrix (ncol=2)

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings = list(ncol=2))

# changing the settings to choose which elements to display

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings = list(ncol=2,

                                             units=F,

                                             legend=T,

                                             grid=F,

                                             fontsize=9))

# changing the preferences (appearance of the elements) when using plot="cdf"

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings = list(ncol=2, legend=T, plot="cdf"),

                             preferences = list(empirical=list(color="#161617",

                                                               lineWidth=1,

                                                               lineType="solid",

                                                               legend="cumulative density distribution")))

# changing the preferences (appearance of the elements) when using plot="pdf"

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings = list(ncol=2, legend=T, plot="pdf"),

                             preferences = list(histogramBar=list(fill="#cdced1",

                                                                  opacity=0.7,

                                                                  stroke="#161617",

                                                                  strokeWidth=1,

                                                                  legend="probability density distribution")))

# split each plot into two subplots for FORM=ref and FORM=test

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings = list(ncol=2),

                             stratify = list(split=c("FORM")))

# define groups for AGE and HT, filter by AGE and split by HT

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings=list(ncol=2),

                             stratify = list(groups=list(list(name="AGE", definition=c(30, 35)),

                                                         list(name="HT", definition=c(184.5))),

                                             filter=list("AGE",c(1,3)),

                                             split="HT"))

# filter to keep only second sequence (TR) and Period=1

plotCAParametersDistribution(parameters = c('V','Cl','ka','Tlag'),

                             settings=list(ncol=2),

                             stratify = list(filter=list(list("SEQ",2),list("Period","1"))))


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()
)

Arguments

parameters (vector<character>) vector of ca parameters to display, e.g c("V", "Cl")
(by default the first 4 computed ca parameters are displayed).
covariates (vector<character>) vector of covariates to display, e.g c("AGE", "FORM")
(by default the first 4 covariates are displayed).
settings List with the following settings:

  • regressionLine (logical) If TRUE, regression line is displayed (default TRUE).
  • spline (logical) If TRUE, spline is displayed (default FALSE).
  • boxplotData (character) for categorical covariate, if boxplotData
    is not NULL, NCA parameter values are added as dots on top of the boxplot. They can be either "spread" over the width of the box
    or "aligned" (default NULL)

  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ncol (integer) number of columns when using split (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
preferences (optional) preferences for plot display,
run getPlotPreferences("plotCAParametersVsCovariates") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). Coloring applies to dots of plots w.r.t continuous covariates, but not on histograms or boxplots. For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").

Value

  • A ggplot object if parameters and covariates have only one element
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runCAEstimation()

# choosing to display only a subset of possible covariates and CA parameters

plotCAParametersVsCovariates(parameters = c("Cl","V"),

                             covariates = c("WT","FORM"))

# changing the settings to choose which elements to display

plotCAParametersVsCovariates(settings = list(regressionLine=F,

                                             spline=T,

                                             boxplotData="spread",

                                             legend=T,

                                             grid=F,

                                             units=F,

                                             fontsize=8))

# changing the preferences (appearance of the elements)

plotCAParametersVsCovariates(parameters = c("Cl","V"),

                             covariates = c("WT","FORM"),

                             settings=list(legend=T, spline=T, boxplotData="spread"),

                             preferences = list(boxplot=list(fill="#FBFBFB",

                                                             opacity=0.5,

                                                             legend=""),

                                                boxplotOutlier=list(color="#D71313",

                                                                    size=1.5,

                                                                    shape=2),

                                                boxplotValues=list(color="#1642f2",

                                                                   radius=1.5,

                                                                   shape=17,

                                                                   opacity=0.3,

                                                                   legend="NCA parameter values"),

                                                obs=list(color="#1642f2",

                                                         radius=2,

                                                         shape=17,

                                                         legend="NCA parameter values"),

                                                regressionLine=list(color="#202120",

                                                                    lineWidth=1,

                                                                    lineType="dashed",

                                                                    legend="Linear regression line"),

                                                spline=list(color="#97989c",

                                                            lineWidth=1,

                                                            lineType="solid",

                                                            legend="Spline regression line")))

# split each plot into two subplot for FORM=ref and FORM=test, vertically (ncol=1)

plotCAParametersVsCovariates(parameters = c("Cl","V"),

                             covariates = c("WT","AGE"),

                             settings=list(ncol=1),

                             stratify = list(split=c("FORM")))

# define groups for AGE and HT, color by HT and filter by AGE

plotCAParametersVsCovariates(settings=list(legend=T),

                             parameters = c("Cl","V"),

                             covariates = c("WT","FORM"),

                             stratify = list(groups=list(list(name="AGE", definition=c(30, 35)),

                                                         list(name="HT", definition=c(184.5))),

                                             color="HT",

                                             colors=c("#cdced1","#161617"),

                                             filter=list("AGE",c(1,3))))

# filter to keep only second sequence (TR) and FORM=test

plotCAParametersVsCovariates(settings=list(legend=T),

                             parameters = c("Cl","V"),

                             covariates = c("WT","FORM"),

                             stratify = list(filter=list(list("SEQ",2),list("FORM","test"))))


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] Generate NCA data plots

Description

Plot the observed data as used for the NCA calculations.

Usage

plotNCAData(settings = list(), stratify = list(), preferences = list())

Arguments

settings List with the following settings:

  • dots (logical) – If TRUE, individual observations are displayed as dots (default TRUE).
  • lines (logical) – If TRUE, individual observations are connected by lines (default FALSE if NCA has been run using sparse data option, TRUE either).
  • mean (logical) – If TRUE, mean (geometric or arithmetic) of observations is displayed (default TRUE).
  • error (logical) If TRUE, error bar presenting standard deviation or standard error are displayed (default TRUE).
  • meanMethod (character) – When mean is set to TRUE, display arithmetic mean ("arithmetic", default) or
    geometric mean ("geometric"). Forced to ‘arithmetic’ if NCA has been run using sparse data option.

  • errorMethod (character) – When error is set to TRUE, display standard deviation ("standardDeviation", default) or
    standard error ("standardError"). Forced to ‘standardDeviation’ if NCA has been run using sparse data option.

  • useCensored (logical) If TRUE, censored observations are used to compute mean and error (default TRUE). Not available if NCA has been run using sparse data option.
  • binLimits (logical) – If TRUE, bins limits are displayed as vertical lines (default FALSE). Not available if NCA has been run using sparse data option.
  • binsSettings a list of settings for time axis binning for observation statistics computation. Not available if NCA has been run using sparse data option.
    • criteria (character) – Binning criteria, one of ‘equalwidth’, ‘equalsize’, or ‘leastsquare’ (default) methods.
    • is.fixedNbBins (logical) – If TRUE, a fixed number of bins is used (see nbBins). If FALSE (default), the number of bins is optimized using binRange and nbBinData.
    • nbBins (integer) – Number of bins (default 10). Ignored if is.fixedNbBins=FALSE.
    • binRange (vector(integer, integer)) – Minimum and maximum number of bins when bins are optimized (default c(5, 100)).
    • nbBinData (vector(integer, integer)) – Minimum and maximum number of data points per bin when bins are optimized (default and c(3, 200)).
  • cens (logical) – If TRUE, censored observations are displayed as dots (default TRUE).
  • dosingTimes (logical) – If TRUE, dosing times are displayed as vertical lines (default FALSE).
  • legend (logical) – If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) – If TRUE, plot grid is displayed (default TRUE).
  • xlog (logical) – If TRUE, log-scale on x axis is used (default FALSE).
  • ylog (logical) – If TRUE, log-scale on y axis is used (default FALSE).
  • xlab (character) – Label on x axis (default "time").
  • ylab (character) – Label on y axis (default obsName).
  • ncol (integer) – Number of columns when using split (default 4).
  • xlim (c(double, double)) – Limits of the x axis.
  • ylim (c(double, double)) – Limits of the y axis.
  • fontsize (integer) – Font size of text elements (default 11).
  • units (logical) – If TRUE, units are added in axis labels (default TRUE).
  • scales (character) Should scales be fixed ("fixed"), free ("free", default), or free in one dimension ("free_x", "free_y").
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition (vector<double>(continuous) || list<vector<character>>(categorical)) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • mergedSplits (logical) – When "split" is used and mean=T, should the means of the different groups be displayed on the same plot (TRUE)
    or on different subplots (FALSE, default). Not available for count/categorical data. When mergedSplits=T, the "color" argument is ignored and the coloring is done according to the splitted groups.

  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring or "id" (by default no coloring is applied). For instance c("FORM","AGE") or "id".
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").
  • individualSelection – Ids to display (by default the 12 first ids are displayed) defined as:
    • indices (vector<integer>) – Indices of the individuals to display (by default, the 12 first individuals are selected). If occasions are present, all occasions of the selected individuals will be displayed. Takes precedence over ids. For instance c(5,6,10,11).
    • isRange (logical) – If TRUE, all individuals whose index is inside [min(indices), max[indices]] are selected (FALSE by default).
      Forced to FALSE if ids is defined.

    • ids (vector<character>) – Names of the individuals to display. If occasions are present, all occasions of the selected individuals will be displayed. For instance c("101-01","101-02","101-03"). If ids are integers, can also be c(1,3,6).
      Ignored if indices is defined.

preferences (optional) preferences for plot display,
run getPlotPreferences("plotNCAData") to check available options.

Value

A ggplot object

See Also

getPlotPreferences

Click here to see examples

#

  project <- paste0(getDemoPath(), "/2.case_studies/project_aPCSK9_SAD.pkx")

  loadProject(project)

  setNCASettings(blqMethodBeforeTmax="missing",blqMethodAfterTmax="LOQ")

  runNCAEstimation()

  # by default, individual profiles and mean curve are displayed

  plotNCAData()

  # displaying dots and mean curve by dose group, merged on a single plot

  plotNCAData(settings=list(lines=F,

                            mean=T,

                            meanMethod="geometric", 

                            ylog=T),

              stratify=list(split="DOSE_mg",

                            mergedSplits=T),

              preferences=list(observationStatistics=list(lineWidth=0.8),

                               obs=list(radius=2)))

  # coloring by ID, without mean curve

  plotNCAData(settings=list(mean=F,error=F),

              stratify = list(color=c("id")))

  # changing the settings to display only the mean curve with SE, with bin limits and dosing times

  plotNCAData(settings=list(dots=F,

                            lines=F,

                            mean=T,

                            error=T,

                            meanMethod="geometric",

                            errorMethod="standardError",

                            useCensored=T,

                            binLimits=T,

                            binsSettings=list(criteria="leastsquare", is.fixedNbBins=T, nbBins=20),

                            cens=F,

                            dosingTimes=T,

                            legend=T,

                            grid=F,

                            xlog=F,ylog=T,

                            xlab="Time since first dose (days)",

                            ylab="mAb concentration (ug/mL)",

                            xlim=c(0,96),

                            ylim=c(0.1,70),

                            fontsize=12,

                            units=F))

  # changing preferences for observations, censored observations and bin limits

  plotNCAData(settings=list(dots=T, lines=T, legend=T, dosingTimes=T, mean=F, error=F, ylog=T, cens=T),

              preferences=list(obs=list(color="#161617",

                                        radius=2,

                                        shape=18,

                                        lineWidth=0.2,

                                        lineType="dashed",

                                        legend="Observations"),

                               censObs=list(color="#cdced1",

                                            radius=2,

                                            shape=16,

                                            legend="Censored observations"),

                               dosingTimes=list(color="#fcba03",

                                                lineWidth=0.5,

                                                lineType="solid",

                                                legend="Time of doses")))

  # changing preferences for mean and bin limits

  plotNCAData(settings=list(dots=F, lines=F, legend=T, binLimits=T, grid=F),

              preferences=list(observationStatistics=list(color="#161617",

                                                          whiskersWidth=3,

                                                          lineWidth=0.7,

                                                          lineType="solid",

                                                          legend="mean and standard deviation over bins"),

                               binsValues=list(color="#cdced1",

                                               lineWidth=0.5,

                                               lineType="dashed",

                                               legend="bins")))

  # color and split by DOSE_mg but grouping two doses levels together

  plotNCAData(settings=list(mean=F,error=F,ylim=c(0,120)),

              stratify = list(groups=list(name="DOSE_mg",definition=list(c("150mg"), c("300mg","800mg"))),

                              color="DOSE_mg",

                              split="DOSE_mg"))

  #============= projects with several covariates

project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

loadProject(project)

runNCAEstimation()

# defining groups for AGE and HT, coloring by HT and filtering by AGE

plotNCAData(settings=list(mean=F,error=F),

            stratify = list(groups=list(list(name="AGE", definition=c(24, 34)),

                                        list(name="HT", definition=c(184.5))),

                            color="HT",

                            colors=c("#cdced1","#161617"),

                            filter=list("AGE",c(1,3))))

# filter to keep only second sequence (TR) and FORM=test

plotNCAData(settings=list(mean=F,error=F),

            stratify = list(filter=list(list("SEQ",2),list("FORM","test"))))

  #============= project with sparse calculations

  project <- paste0(getDemoPath(), "/1.basic_examples/project_sparse.pkx")

  loadProject(project)

  runNCAEstimation()

  # mean profiles are already calculated for each stratification group used for the sparse calculations

  # stratify argument cannot be used

  plotNCAData()

  # displaying only the averaged profiles, without individual dots and without error bars

  plotNCAData(settings=list(dots=F,

                            error=F))


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] Generate NCA individual fits (lambda_z regression)

Description

Plot the NCA individual fits (LambdaZ regression).

Usage

plotNCAIndividualFits(
  settings = list(),
  preferences = list(),
  stratify = list()
)

Arguments

settings List with the following settings:

  • obsDots (logical) – If TRUE individual observations are displayed as dots (default TRUE).
  • obsLines (logical) – If TRUE individual observations are displayed as lines (default FALSE).
  • cens (logical) – If TRUE censored observations are displayed as dots (default TRUE).
  • obsUnused (logical) – If TRUE (and if dots is set to TRUE),
    individual observations not used for lambda z calculation are displayed as dots (default TRUE).

  • obsUnusedColor – If obsUnused is TRUE, observation points not included in lambda_z regression can be colored with the same color as used for the points included in lambda_z
    ("colored"), or can be colored in grey ("greyed", default).

  • lambda_z (logical) – If TRUE, lambda_z regression lines are displayed (default TRUE).
  • dosingTimes (logical) – If TRUE, dosing times are displayed as vertical lines (default FALSE).
  • splitOccasions (logical) – If TRUE, occasions are displayed on separate subplots (default TRUE). If FALSE, all occasions are overlaid on the same subplot.
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • xlog (logical) If TRUE, log-scale on x axis is used (default FALSE).
  • ylog (logical) If TRUE, log-scale on y axis is used (default TRUE).
  • xlab (character) label on x axis (default "time").
  • ylab (character) label on y axis (default "concentration").
  • ncol (integer) number of columns to arrange the subplots (default 4).
  • xlim (c(double, double)) limits of the x axis.
  • ylim (c(double, double)) limits of the y axis.
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
  • scales (character) Should scales be fixed ("fixed"),
    free ("free", the default), or free in one dimension ("free_x", "free_y").

preferences (optional) preferences for plot display,
run getPlotPreferences("plotNCAIndividualFits") to check available options.
stratify List with the stratification arguments. Stratification is not available in case "sparse data" calculations are used.

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates and occasions, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name (character) covariate name (e.g "AGE")
    definition (vector<double>(continuous) || list<vector<character>>(categorical)) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors (e.g list(c("study101"), c("study201","study202")))
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").
  • individualSelection – Ids to display (by default the 12 first ids are displayed) defined as:
    • indices (vector<integer>) – Indices of the individuals to display (by default, the 12 first individuals are selected). If occasions are present, all occasions of the selected individuals will be displayed. Takes precedence over ids. For instance c(5,6,10,11).
    • isRange (logical) – If TRUE, all individuals whose index is inside [min(indices), max[indices]] are selected (FALSE by default).
      Forced to FALSE if ids is defined.

    • ids (vector<character or integer>) – Names of the individuals to display. If occasions are present, all occasions of the selected individuals will be displayed. For instance c("101-01","101-02","101-03"). If ids are integers, can also be c(1,3,6).
      Ignored if indices is defined.

Value

A ggplot object

See Also

getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runNCAEstimation()

  # by default 12 individuals are displayed (with 2 occasions each in this example) 

  plotNCAIndividualFits()

  # loop to create several plots ("pages") with 6 individuals (2 occasions each) per page, using "indices" and "isRange"

  nbIndiv <- 18

  nbIndivPerPage <- 6

  nbPages <- ceiling(nbIndiv/nbIndivPerPage)

  for(i in 1:nbPages){    

    plotNCAIndividualFits(stratify = list(individualSelection=list(indices=c(nbIndivPerPage*(i-1)+1,nbIndivPerPage*i),

                                                                   isRange=T)))

  }

  # selection of individuals based on id names

  plotNCAIndividualFits(stratify = list(individualSelection=list(ids=c("6","17"))))

  plotNCAIndividualFits(stratify = list(individualSelection=list(ids=c(6, 17))))

# plot only the observations (lambda_z=F) with dots, lines and dosing times. The two occasions are overlayed (splitOccasions=F)

# all observations are displayed in the same way without distinguishing those use for lambda_z (obsUnusedColor="colored")

# coloring by formulation with user-defined colors

plotNCAIndividualFits(settings = list(lambda_z=F, obsDots=T, obsLines=T, dosingTimes=T,

                                      splitOccasions=F, ncol=3, obsUnusedColor="colored",

                                      legend=T, grid=F, ylog=T,

                                      units=F, ylab="Theophylline concentration (ug/mL)"),

                      stratify = list(color=c("FORM"),

                                      colors=c("#00a4c6","#ff793f")))

  # get available preferences

  getPlotPreferences("plotNCAIndividualFits")    

  # change color, radius, shape, lineType, lineWidth and legend for all elements

plotNCAIndividualFits(settings = list(legend=T),

                      preferences = list(obs=list(color="#161617",

                                                  radius=2,

                                                  shape=18,

                                                  legend="Points included in lambda_z"),

                                         censObs=list(color="#161617",

                                                      radius=2,

                                                      shape=5,

                                                      legend="BLQ points"),

                                         obsUnused=list(color="#cdced1",

                                                        radius=2,

                                                        shape=18,

                                                        legend="Points NOT included in lambda_z"),

                                         lambda_z=list(color="#1642f2",

                                                       lineWidth=1,

                                                       lineType="solid",

                                                       legend="Lambda_z regression")))                           

  #==== stratification (not available for sparse data)

  # define groups for AGE and color by AGE and FORM

plotNCAIndividualFits(settings = list(obsDots=T,legend=T,obsUnusedColor="colored", obsLines=T),

                      stratify = list(groups=list(name="AGE", definition=c(30, 35)), 

                                      color=c("AGE","FORM")))

# filter to keep only individuals with sequence "RT" (first among "RT" and "TR")

plotNCAIndividualFits(stratify = list(filter=list(list("SEQ","RT"))))

plotNCAIndividualFits(stratify = list(filter=list(list("SEQ",1))))                                                  


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()
)

Arguments

parametersRows (vector<character>) vector with the names of NCA parameters to display on rows
(by default the first 4 computed parameters are displayed).
parametersColumns (vector<character>) vector with the names of NCA parameters to display on columns
(by default parametersColumns = parametersRows).
settings List with the following settings:

  • regressionLine (logical) If TRUE, regression line is displayed (default TRUE).
  • spline (logical) If TRUE, spline is displayed (default FALSE).
  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ncol (integer) number of columns when using split (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
preferences (optional) preferences for plot display,
run getPlotPreferences("plotNCAParametersCorrelation") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). Coloring applies to dots of plots w.r.t continuous covariates, but not on histograms or boxplots. For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").

Value

  • A ggplot object if parametersRows and parametersColumns have only one element
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getChartsData getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runNCAEstimation()

# by default only the 4 first NCA parameters are shown

plotNCAParametersCorrelation()

# choosing to display only a subset of possible covariates and NCA parameters (same param on rows and columns)

plotNCAParametersCorrelation(parametersRows = c("Cmax","Lambda_z","AUCINF_obs"))

# selecting different parameters on rows and columns

plotNCAParametersCorrelation(parametersRows = c("AUCINF_obs","Cmax"),

                             parametersColumns = c("Lambda_z","Tmax"))

# changing the settings to choose which elements to display

plotNCAParametersCorrelation(settings = list(regressionLine=F,

                                             spline=T,

                                             legend=T,

                                             grid=F,

                                             units=F,

                                             fontsize=8))

# changing the preferences (appearance of the elements)

plotNCAParametersCorrelation(parametersRows = c("Cmax","Lambda_z"),

                             settings=list(legend=T, spline=T),

                             preferences = list(obs=list(color="#202120",

                                                         radius=2,

                                                         shape=18,

                                                         legend="NCA parameter values"),

                                                regressionLine=list(color="#202120",

                                                                    lineWidth=1,

                                                                    lineType="dashed",

                                                                    legend="Linear regression line"),

                                                spline=list(color="#97989c",

                                                            lineWidth=1,

                                                            lineType="solid",

                                                            legend="Spline regression line")))

# split each plot into two subplot for FORM=ref and FORM=test, vertically (ncol=1)

plotNCAParametersCorrelation(parametersRows = c("Cmax","Lambda_z","AUCINF_obs"),

                             settings=list(ncol=1),

                             stratify = list(split=c("FORM")))

# define groups for AGE and HT, color by HT and filter by AGE

plotNCAParametersCorrelation(settings=list(legend=T),

                             parametersRows = c("Cmax","Lambda_z"),

                             stratify = list(groups=list(list(name="AGE", definition=c(30, 35)),

                                                         list(name="HT", definition=c(184.5))),

                                             color="HT",

                                             colors=c("#cdced1","#161617"),

                                             filter=list("AGE",c(1,3))))

# filter to keep only second sequence (TR) and FORM=test

plotNCAParametersCorrelation(settings=list(legend=T),

                             parametersRows = c("Cmax","Lambda_z"),

                             stratify = list(filter=list(list("SEQ",2),list("FORM","test"))))


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()
)

Arguments

parameters (vector<character>) vector of NCA parameters to display.
(by default the first 12 computed NCA parameters are displayed).
settings List with the following settings:

  • plot (character) Type of plot: probability density distribution as histogram ("pdf", default), or
    cumulative density distribution ("cdf").

  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ncol (integer) number of columns to arrange subplots (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
  • scales (character) Should scales be fixed ("fixed"),
    free ("free", default), or free in one dimension ("free_x", "free_y").

preferences (optional) preferences for plot display,
run getPlotPreferences("plotNCAParametersDistribution") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.

Value

  • A ggplot object if only one parameter is specified in parameters
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getChartsData getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runNCAEstimation()

# plot a single parameter, as pdf or cdf

plotNCAParametersDistribution(parameters = "AUCINF_obs", settings = list(plot = "pdf"))

plotNCAParametersDistribution(parameters = "Lambda_z", settings = list(plot = "cdf"))

# with a single parameter, a ggplot object if returned and additional ggplot elements can be added

library(ggplot2)

plotNCAParametersDistribution(parameters = "AUCINF_obs")+geom_vline(xintercept=140)

# display only 4 parameters in a 2x2 matrix (ncol=2)

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                              settings = list(ncol=2))

# changing the settings to choose which elements to display

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                              settings = list(ncol=2,

                                              units=F,

                                              legend=T,

                                              grid=F,

                                              fontsize=9))

# changing the preferences (appearance of the elements) when using plot="cdf"

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                             settings = list(ncol=2, legend=T, plot="cdf"),

                             preferences = list(empirical=list(color="#161617",

                                                               lineWidth=1,

                                                               lineType="solid",

                                                               legend="cumulative density distribution")))

# changing the preferences (appearance of the elements) when using plot="pdf"

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                              settings = list(ncol=2, legend=T, plot="pdf"),

                              preferences = list(histogramBar=list(fill="#cdced1",

                                                                   opacity=0.7,

                                                                   stroke="#161617",

                                                                   strokeWidth=1,

                                                                   legend="probability density distribution")))

# split each plot into two subplots for FORM=ref and FORM=test

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                              settings = list(ncol=2),

                              stratify = list(split=c("FORM")))

# define groups for AGE and HT, filter by AGE and split by HT

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                              settings=list(ncol=2),

                              stratify = list(groups=list(list(name="AGE", definition=c(30, 35)),

                                                          list(name="HT", definition=c(184.5))),

                                              filter=list("AGE",c(1,3)),

                                              split="HT"))

# filter to keep only second sequence (TR) and Period=1

plotNCAParametersDistribution(parameters = c('AUCINF_obs', 'AUClast', 'Cl_F_obs', 'Clast'),

                              settings=list(ncol=2),

                              stratify = list(filter=list(list("SEQ",2),list("Period","1"))))


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()
)

Arguments

parameters (vector<character>) vector of nca parameters to display, e.g c("Cmax", "AUCINF_obs")
(by default the first 4 computed nca parameters are displayed).
covariates (vector<character>) vector of covariates to display, e.g c("AGE", "FORM")
(by default the first 4 covariates are displayed).
settings List with the following settings

  • regressionLine (logical) If TRUE, regression line is displayed (default TRUE).
  • spline (logical) If TRUE, spline is displayed (default FALSE).
  • boxplotData (character) for categorical covariate, if boxplotData
    is not NULL, NCA parameter values are added as dots on top of the boxplot. They can be either "spread" over the width of the box
    or "aligned" (default NULL)

  • legend (logical) If TRUE, plot legend is displayed (default FALSE).
  • grid (logical) If TRUE, plot grid is displayed (default TRUE).
  • ncol (integer) number of columns when using split (default 4).
  • fontsize (integer) Font size of text elements (default 11).
  • units (logical) If TRUE, units are added in axis labels (default TRUE).
preferences (optional) preferences for plot display,
run getPlotPreferences("plotNCAParametersVsCovariates") to check available options.
stratify List with the stratification arguments:

  • groups – Definition of stratification groups. By default, stratification groups are already defined as one group for each category for categorical covariates, and two groups of equal number of individuals for continuous covariates. To redefine groups, for each covariate to redefine, specify a list with:
    name character covariate name (e.g "AGE")
    definition vector<double>(continuous) || list<vector<character>>(categorical) For continuous covariates, vector of break values (e.g c(35, 65)). For categorical covariates, groups of categories as a list of vectors(e.g list(c("study101"), c("study201","study202")))
  • split (vector<character>) – Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instance c("FORM","AGE").
  • filter (list< list<character, vector<integer>> >) – List of pairs containing a covariate name and the vector of indexes or categories (for categorical covariates) of the groups to keep (by default no filtering is applied). For instance, list("AGE",c(1,3)) to keep the individuals belonging to the first and third age group, according to the definition in groups. For instance, list("FORM","ref") using the category name for categorical covariates.
  • color (vector<character>) – Vector of covariates used for coloring (by default no coloring is applied). Coloring applies to dots of plots w.r.t continuous covariates, but not on histograms or boxplots. For instance c("FORM","AGE").
  • colors – Vector of colors to use when color argument is used. Takes precedence over colors defined in preferences. For instance c("#ebecf0","#cdced1","#97989c").

Value

  • A ggplot object if parameters and covariates have only one element
  • A TableGrob object if multiple plots (output of grid.arrange)

See Also

getChartsData getPlotPreferences

Click here to see examples

#

  project <- file.path(getDemoPath(), "/2.case_studies/project_Theo_extravasc_SD.pkx")

  loadProject(project)

  runNCAEstimation()

# choosing to display only a subset of possible covariates and NCA parameters  

plotNCAParametersVsCovariates(parameters = c("Cmax","Lambda_z"),

                              covariates = c("WT","FORM"))

# changing the settings to choose which elements to display

plotNCAParametersVsCovariates(settings = list(regressionLine=F,

                                              spline=T,

                                              boxplotData="aligned",

                                              legend=T,

                                              grid=F,

                                              units=F,

                                              fontsize=8))

# changing the preferences (appearance of the elements)

plotNCAParametersVsCovariates(parameters = c("Cmax","Lambda_z"),

                              covariates = c("WT","FORM"),

                              settings=list(legend=T, spline=T, boxplotData="spread"),

                              preferences = list(boxplot=list(fill="#FBFBFB",

                                                              opacity=0.5,

                                                              legend=""),

                                                 boxplotOutlier=list(color="#D71313",

                                                                     size=1.5,

                                                                     shape=2),

                                                 boxplotValues=list(color="#1642f2",

                                                                    radius=1.5,

                                                                    shape=17,

                                                                    opacity=0.3,

                                                                    legend="NCA parameter values"),

                                                 obs=list(color="#1642f2",

                                                          radius=2,

                                                          shape=17,

                                                          legend="NCA parameter values"),

                                                 regressionLine=list(color="#202120",

                                                                     lineWidth=1,

                                                                     lineType="dashed",

                                                                     legend="Linear regression line"),

                                                 spline=list(color="#97989c",

                                                             lineWidth=1,

                                                             lineType="solid",

                                                             legend="Spline regression line")))

# split each plot into two subplot for FORM=ref and FORM=test, vertically (ncol=1)

plotNCAParametersVsCovariates(parameters = c("Cmax","Lambda_z","AUCINF_obs"),

                              covariates = c("WT","AGE"),

                              settings=list(ncol=1),

                              stratify = list(split=c("FORM")))                                                             

# define groups for AGE and HT, color by HT and filter by AGE

plotNCAParametersVsCovariates(settings=list(legend=T),

                              parameters = c("Cmax","Lambda_z"),

                              covariates = c("WT","FORM"),

                              stratify = list(groups=list(list(name="AGE", definition=c(30, 35)), 

                                                          list(name="HT", definition=c(184.5))),

                                              color="HT",

                                              colors=c("#cdced1","#161617"),

                                              filter=list("AGE",c(1,3))))

# filter to keep only second sequence (TR) and FORM=test

plotNCAParametersVsCovariates(settings=list(legend=T),

                              parameters = c("Cmax","Lambda_z"),

                              covariates = c("WT","FORM"),

                              stratify = list(filter=list(list("SEQ",2),list("FORM","test"))))


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 (character) 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

#

  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] Reset plot preferences to go back to default preferences

Description

Reset plot preferences to go back to default preferences.

Usage

resetPlotPreferences()

See Also

getPlotPreferences setPlotPreferences

Click here to see examples

#

  getPlotPreferences()$obs[c("color", "legend")]

  update = list(obs = list(color = "green", legend = "Observation"))

  setPlotPreferences(update = update)

  getPlotPreferences()$obs[c("color", "legend")]

  resetPlotPreferences()

  getPlotPreferences()$obs[c("color", "legend")]

## End(Not run)


Back to the list, PKanalix API, Monolix API, Simulx API.


[Monolix – PKanalix] Set preferences to customize plots

Description

Set preferences to customize plots.
When preferences are set, the updated preferences will used in all the plots.

Usage

setPlotPreferences(update = NULL)

Arguments

update list containing the plot elements to be updated.

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)

See Also

getPlotPreferences resetPlotPreferences

Click here to see examples

#

  getPlotPreferences()$obs[c("color", "legend")]

  update = list(obs = list(color = "green", legend = "Observation"))

  setPlotPreferences(update = update)

  getPlotPreferences()$obs[c("color", "legend")]

## 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:

  • targetSoftware (character) Target software ("monolix" | "simulx" | "pkanalix")
  • filesNextToProject (logical) [optional][Monolix – PKanalix] Save data and/or structural model file next to exported project ([TRUE] | FALSE). Forced to TRUE for Simulx.
  • dataFilePath (character) [optional][Monolix – Simulx] Path (filesNextToProject == FALSE) or name (filesNextToProject == TRUE) of the exported data file. Available only for generated datasets in Monolix (vpc, individual fits)
  • dataFileType (character) [optional][Monolix] Dataset used in the exported project (["original"] | "vpc" | "individualFits")
  • modelFileName (character) [optional][Simulx] Name of the exported model file.
  • exportedUnusedCovariates (list) [optional][Monolix – PKanalix => Simulx] Covariates not used in the individual model (if present) to be exported to Simulx. A list with:
    • all (logical) Export all unused covariates. FALSE by default.
    • name (vector<character>) List of exported unused covariate names. Required if all == FALSE, ignored if not.
force (logical) [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

#

[PKanalix only]

exportProject(settings = list(targetSoftware = "monolix", filesNextToProject = F))

exportProject(settings = list(targetSoftware = "monolix", filesNextToProject = F, exportedUnusedCovariates = list(all = FALSE, name = c("sex", "weight"))))

[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 (character): Path to the data file (csv, xlsx, xlsx, sas7bdat, xpt or txt). Can be absolute or relative to the current working directory.
  • header (vector<character>): vector of header names
  • headerTypes (vector<character>): vector of header types
  • observationNames (vector<character>): vector of observation names
  • observationTypes (vector<character>): vector of observation types
  • nbSSDoses (integer): number of doses (if there is a SS column)
  • regressorsSettings (character): regressors interpolation method (either last carried forward or linear)
  • sheet (character): Name of the sheet in xlsx/xls file. If not provided, the first sheet is used.

Usage

getData()

Value

A list describing project data.

See Also

setData

Click here to see examples

#

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")

   $sheet

     "sheet1"

## 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, as it is displayed in the Data tab in the interface.
Interpretation of data includes, but is not limited to, data formatting, filters, addition of doses through the ADDL column and steady state settings, addition of additional covariates, interpolation of regressors.
It returns as dataframe with all columns of type "character".

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 (character) 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 single string.

Click here to see examples

#

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 (character) One of the MonolixSuite library of models. Possible values are "pk", "pd", "pkpd", "pkdoubleabs", "pm", "tmdd", "tte", "count" and "tgi".
filters (list(name = character)) 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

#

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:
    • obsId (character) Name of observation id present in the dataset. It corresponds to the content of column tagged as "obsid" in case of several obs ids, or to the header of the column tagged as "observation" otherwise
    • modelOutput (character) Name of the model prediction listed in the output= line of the structural model
    • observationName [Monolix] (character) Model observation name (for continuous observations only)
    • type (character) Type of linked data ("continuous" | "discrete" | "event")
  • freeData (list<list>) A list of lists describing not mapped data:
    • obsId (character) Name of observation id present in the dataset
    • type (character) Data type
  • freePredictions (list<list>) A list of lists describing not mapped predictions:
    • modelOutput (character) Name of the model prediction listed in the output= line of the structural model
    • type (character) Prediction type

See Also

setMapping

Click here to see examples

#

f = getMapping()

f$mapping

  -> list( list(obsId = "1", modelOutput = "Cc", observationName = "concentration", type = "continuous"),

           list(obsId = "2", modelOutput = "Level", type = "discrete") )

f$freeData

  -> list( list(obsId = "3", type = "event") )

f$freePredictions

  -> list( list(modelOutput = "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

The path to the structural model file.

See Also

For Monolix and PKanalix only: setStructuralModel

Click here to see examples

#

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

saveProject, exportProject

Click here to see examples

#

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 logical saying if a project is currently loaded.

Usage

isProjectLoaded()

Value

TRUE if a project is currently loaded, FALSE otherwise

Click here to see examples

#

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

#

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, mapping = 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.

  • dataFile (character): Path to the data file (csv, xlsx, xlsx, sas7bdat, xpt or txt). Can be absolute or relative to the current working directory.
  • sheet [optional] (character): Name of the sheet in xlsx/xls file. If not provided, the first sheet is used.
  • headerTypes (vector<character>): A vector of header types. The possible header types are: "ignore", "id", "time", "observation", "amount", "contcov", "catcov", "occ", "evid", "mdv", "obsid", "cens", "limit", "regressor", "nominaltime", "admid", "rate", "tinf", "ss", "ii", "addl", "date". Notice that these are not exactly the types displayed in the interface, they 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 (integer): Number of doses (if there is a SS column for steady-state).
  • regressorsSettings [optional] (character): Regressors interpolation method. Either ‘lastCarriedForward’ (default) or ‘linearInterpolation’.
mapping [optional](list): A list of lists representing a link between observation types and model outputs. Each list contains:

  • obsId (character) Name of observation id present in the dataset. It corresponds to the content of column tagged as "obsid" in case of several obs ids, or to the header of the column tagged as "observation" otherwise
  • observationName (character) Name of the model prediction listed in the output= line of the structural model
  • modelOutput [Monolix] (character) Name of the observation, e.g "y1" (for continuous observations only)

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

newProject saveProject

Click here to see examples

#

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")),

           modelFile = "lib:oral1_1cpt_IndirectModelInhibitionKin_TlagkaVClR0koutImaxIC50.txt",

           mapping = list(list(obsId = "1",

                               modelOutput = "Cc",

                               observationName = "y1"),

                          list(obsId = "2",

                               modelOutput = "R",

                               observationName = "y2")))

# 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

newProject loadProject

Click here to see examples

#

[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 = NULL,
  nbSSDoses = NULL,
  regressorsSettings = NULL,
  sheet = NULL
)

Arguments

dataFile (character): Path to the data file (csv, xlsx, xlsx, sas7bdat, xpt or txt). Can be absolute or relative to the current working directory.
headerTypes (vector<character>): A vector of header types.
The possible header types are: "ignore", "id", "time", "observation", "amount", "contcov", "catcov", "occ", "evid", "mdv", "obsid", "cens", "limit", "regressor", "nominaltime", "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](integer): Number of doses (if there is a SS column).
regressorsSettings [optional](character): Regressors interpolation method. Either ‘lastCarriedForward’ (default) or ‘linearInterpolation’.
sheet [optional] (character): Name of the sheet in xlsx/xls file. If not provided, the first sheet is used.

See Also

getData

Click here to see examples

#

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"))

setData(dataFile = "/path/to/data/file.xlsx", sheet = "sheet2",

        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:

  • obsId (character) Name of observation id present in the dataset. It corresponds to the content of column tagged as "obsid" in case of several obs ids, or to the header of the column tagged as "observation" otherwise
  • modelOutput (character) Name of the model prediction listed in the output= line of the structural model
  • observationName [Monolix] (character) Name of the observation, e.g "y1" (for continuous observations only)

See Also

getMapping

Click here to see examples

#

[Monolix] setMapping(list(list(obsId = "1", modelOutput = "Cc", observationName = "concentration"), list(obsId = "2", modelOutput = "Level")))

[PKanalix] setMapping(list(list(obsId = "1", modelOutput = "Cc"), list(obsId = "2", modelOutput = "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

getStructuralModel

Click here to see examples

#

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] Share project.

Description

Create a zip archive file from current project and its results.

Usage

shareProject(archiveFile)

Arguments

archiveFile (character) Path to the .zip archive file to create.

Click here to see examples

#

shareProject("/path/to/archive.zip")

## 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

setConsoleMode


[Monolix – PKanalix – Simulx] Get project preferences

Description

Get a summary of the project preferences. Preferences are:

“relativepath” (logical) Use relative path for save/load operations.
“threads” (integer > 0) Number of threads.
“temporarydirectory” (character) Path to the directory used to save temporary files.
“usebinarydataset” (logical) Save dataset as binary file to speed project reload up.
“timestamping” (logical) Create an archive containing result files after each run.
“delimiter” (character) Character use as delimiter in exported result files.
“reportingrenamings” (list("label" = "alias">)) For each label, an alias to be use at report generation (using generateReport).
“exportchartsdata” (logical) Should charts data be exported.
“savebinarychartsdata” (logical) [Monolix] Save charts simulations as binray file to speed charts creation up.
“exportchartsdatasets” (logical) [Monolix] Should charts datasets be exported if possible.
“exportvpcsimulations” (logical) [Monolix] Should vpc simulations be exported if possible.
“exportsimulationfiles” (logical) [Simulx] Should simulation results files be exported.
“headeraliases” (list("header" = vector<character>)) For each header, the list of the recognized aliases.
“ncaparameters” (vector<character>) [PKanalix] Defaulty computed NCA parameters.
“units” (list("type" = character) [PKanalix] Time, amount and/or volume units.

Usage

getPreferences(...)

Arguments

... [optional] (character) Name of the preference whose value should be displayed. If no argument is provided, all the preferences are returned.

Value

A list with each preference name mapped to its current value.

Click here to see examples

#

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” (character) Path to the folder where simulation results will be saved. It should be a writable directory.
“exportResults” (logical) Should results be exported.
“seed” (0 < integer < 2147483647) Seed used by random generators.
“grid” (integer) Number of points for the continuous simulation grid.
“nbSimulations” (integer) Number of simulations.
“dataandmodelnexttoproject” (logical) Should data and model files be saved next to project.
“project” (character) Path to the Monolix project.

Associated settings for PKanalix projects are:

“directory” (character) Path to the folder where simulation results will be saved. It should be a writable directory.
“seed” (0 < integer < 2147483647) Seed used by random generators.
“datanexttoproject” (logical) Should data and model (in case of CA) files be saved next to project.

Associated settings for Simulx projects are:

“directory” (character) Path to the folder where simulation results will be saved. It should be a writable directory.
“seed” (0 < integer < 2147483647) Seed used by random generators.
“userfilesnexttoproject” (logical) Should user files be saved next to project.

Usage

getProjectSettings(...)

Arguments

... [optional] (character) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned.

Value

A list with each setting name mapped to its current value.

See Also

setProjectSettings

Click here to see examples

#

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 (character) Accepted values are: "none" [default], "basic", "complete"

See Also

getConsoleMode


[Monolix – PKanalix – Simulx] Set preferences

Description

Set the value of one or several of the project preferences. Prefenreces are:

“relativepath” (logical) Use relative path for save/load operations.
“threads” (integer > 0) Number of threads.
“temporarydirectory” (character) Path to the directory used to save temporary files.
“usebinarydataset” (logical) Save dataset as binary file to speed project reload up.
“timestamping” (logical) Create an archive containing result files after each run.
“delimiter” (character) Character use as delimiter in exported result files.
“reportingrenamings” (list("label" = "alias")) For each label, an alias to be use at report generation (using generateReport).
“exportchartsdata” (logical) Should charts data be exported.
“savebinarychartsdata” (logical) [Monolix] Save charts simulations as binray file to speed charts creation up.
“exportchartsdatasets” (logical) [Monolix] Should charts datasets be exported if possible.
“exportvpcsimulations” (logical) [Monolix] Should vpc simulations be exported if possible.
“exportsimulationfiles” (logical) [Simulx] Should simulation results files be exported.
“headeraliases” (list("header" = vector<character>)) For each header, the list of the recognized aliases.
“ncaparameters” (vector<character>) [PKanalix] Defaulty computed NCA parameters.
“units” (list("type" = character) [PKanalix] Time, amount and/or volume units.

Usage

setPreferences(...)

Arguments

... A collection of comma-separated pairs {preferenceName = settingValue}.

See Also

getPreferences

Click here to see examples

#

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” (character) Path to the folder where simulation results will be saved. It should be a writable directory.
“exportResults” (logical) Should results be exported.
“seed” (0 < integer < 2147483647) Seed used by random generators.
“grid” (integer) Number of points for the continuous simulation grid.
“nbSimulations” (integer) Number of simulations.
“dataandmodelnexttoproject” (logical) Should data and model files be saved next to project.

Associated settings for PKanalix projects are:

“directory” (character) Path to the folder where simulation results will be saved. It should be a writable directory.
“dataNextToProject” (logical) Should data and model (in case of CA) files be saved next to project.
“seed” (0 < integer < 2147483647) Seed used by random generators.

Associated settings for Simulx projects are:

“directory” (character) Path to the folder where simulation results will be saved. It should be a writable directory.
“seed” (0 < integer < 2147483647) Seed used by random generators.
“userfilesnexttoproject” (logical) Should user files be saved next to project.

Usage

setProjectSettings(...)

Arguments

... A collection of comma-separated pairs {settingName = settingValue}.

See Also

getProjectSettings

Click here to see examples

#

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)

  • text (character)
  • fontFamily (character) ["Arial"]
  • fontSize (integer) [36]
  • color (vector<integer>) Rgb color [c(255, 0, 0)]
  • layout (character)
  • semiTransparent (logical) [true]
reportFile [optional] (list) If not provided, the report will be saved next to the project file with the name <projectname>_report.docx.

  • nextToProject (logical) Generate report file next to project
  • path (character) Path (nextToProject == FALSE) or name (nextToProject == TRUE) of the generated report file

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

#

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

... (character) Name of the step whose values must be displayed : "anova", "coefficientsOfVariation", "confidenceIntervals"

Click here to see examples

#

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

setCASettings getCASettings

Click here to see examples

#

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

... (character) 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

#

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<character>) 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:

  • state Stratification state
  • groups Stratification groups list

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

#

indivParams = getCAParameterStatistics() 

# retrieve all the available parameter values.

indivParams = getCAParameterStatistics(parameters = c("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, 70, 72)), state = list(split = "WEIGHT")))

# retrieve the values of all the available parameters split 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 character covariate name
definition vector<double>(continuous) || list<vector<character>>(categorical) group separations (continuous) || modality sets (categorical)

A stratification state is represented as a list with:

split vector<character> ordered list of splitted covariates
filter list< pair<character, vector<integer>> > 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

setCAResultsStratification

Click here to see examples

#

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

... (character) Name of the individual parameters whose values must be displayed. Possible parameters:

  • parameters related to the calculation of lambda_z: "Rsq", "Rsq_adjusted", "Corr_XY", "No_points_lambda_z", "Lambda_z", "Lambda_z_lower", "Lambda_z_upper", "HL_Lambda_z", "Lambda_z_intercept", "Span"
  • parameters calculated in case of plasma data: "Tlag", "T0", "Dose", "N_Samples", "C0", "Tmax", "Cmax", "Cmax_D", "Tlast", "Clast", "AUClast", "AUClast_D", "AUMClast", "MRTlast", "MRTlast", "AUCall", "AUCINF_obs", "AUCINF_D_obs", "AUC_PerCentExtrap_obs", "AUC_PerCentBack_Ext_obs", "AUMCINF_obs", "AUMC_PerCentExtrap_obs", "MRTINF_obs", "MRTINF_obs", "Vz_F_obs", "Cl_F_obs", "Vz_obs", "Cl_obs", "Vss_obs", "Clast_pred", "AUCINF_pred", "AUCINF_D_pred", "AUC_PerCentExtrap_pred", "AUC_PerCentBack_Ext_pred", "AUMCINF_pred", "AUMC_PerCentExtrap_pred", "MRTINF_pred", "MRTINF_pred", "Vz_F_pred", "Cl_F_pred", "Vz_pred", "Cl_pred", "Vss_pred"
  • parameters calculated in case of plasma data if partial AUC calculation intervals are provided through the partialAucTime: "AUC_lower_upper", "AUC_lower_upper_D", "CAVG_lower_upper"
  • parameters calculated only for multiple dose data: "Tau", "Ctau", "Ctrough", "AUC_TAU", "AUC_TAU_D", "AUC_TAU_PerCentExtrap", "AUMC_TAU", "Vz_F", "Vz", "CLss_F", "CLss", "Cavg", "FluctuationPerCent", "FluctuationPerCent_Tau", "Accumulation_Index", "Swing", "Swing_Tau", "Tmin", "Cmin", "Cmax", "MRTINF_obs"
  • parameters calculated in case of urine data: "T0", "Dose", "N_Samples", "Tlag", "Tmax_Rate", "Max_Rate", "Mid_Pt_last", "Rate_last", "AURC_last", "AURC_last_D", "Vol_UR", "Amount_Recovered", "Percent_Recovered", "AURC_all", "AURC_INF_obs", "AURC_PerCentExtrap_obs", "AURC_INF_pred", "AURC_PerCentExtrap_pred", "AURC_lower_upper", "Rate_last_pred"
  • parameters calculated in case of urine data if partial AUC calculation intervals are provided through the partialAucTime: "AURC_lower_upper", "AURC_lower_upper_D"

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

#

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 estimated values of NCA ratios

Description

Get for each subject the estimated values of NCA ratios, defined as ratios of NCA parameters across occasions.

Usage

getNCAIndividualRatios(...)

Arguments

... (character) Names of the ratios whose values must be displayed. Empty: all available ratios are displayed.

See Also

getNCARatioStatistics, createNCARatio, deleteNCARatio, getNCARatios

Click here to see examples

#

loadProject(paste0(getDemoPath(),"/1.basic_examples/project_accumulationRatio.pkx"))

runNCAEstimation()

getNCAIndividualRatios()


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<character>) Name of the parameters whose values must be displayed and a list of information relative to these parameters (units & CDISC names). Possible parameters:

  • parameters related to the calculation of lambda_z: "Rsq", "Rsq_adjusted", "Corr_XY", "No_points_lambda_z", "Lambda_z", "Lambda_z_lower", "Lambda_z_upper", "HL_Lambda_z", "Lambda_z_intercept", "Span"
  • parameters calculated in case of plasma data: "Tlag", "T0", "Dose", "N_Samples", "C0", "Tmax", "Cmax", "Cmax_D", "Tlast", "Clast", "AUClast", "AUClast_D", "AUMClast", "MRTlast", "MRTlast", "AUCall", "AUCINF_obs", "AUCINF_D_obs", "AUC_PerCentExtrap_obs", "AUC_PerCentBack_Ext_obs", "AUMCINF_obs", "AUMC_PerCentExtrap_obs", "MRTINF_obs", "MRTINF_obs", "Vz_F_obs", "Cl_F_obs", "Vz_obs", "Cl_obs", "Vss_obs", "Clast_pred", "AUCINF_pred", "AUCINF_D_pred", "AUC_PerCentExtrap_pred", "AUC_PerCentBack_Ext_pred", "AUMCINF_pred", "AUMC_PerCentExtrap_pred", "MRTINF_pred", "MRTINF_pred", "Vz_F_pred", "Cl_F_pred", "Vz_pred", "Cl_pred", "Vss_pred"
  • parameters calculated in case of plasma data if partial AUC calculation intervals are provided through the partialAucTime: "AUC_lower_upper", "AUC_lower_upper_D", "CAVG_lower_upper"
  • parameters calculated only for multiple dose data: "Tau", "Ctau", "Ctrough", "AUC_TAU", "AUC_TAU_D", "AUC_TAU_PerCentExtrap", "AUMC_TAU", "Vz_F", "Vz", "CLss_F", "CLss", "Cavg", "FluctuationPerCent", "FluctuationPerCent_Tau", "Accumulation_Index", "Swing", "Swing_Tau", "Tmin", "Cmin", "Cmax", "MRTINF_obs"
  • parameters calculated in case of urine data: "T0", "Dose", "N_Samples", "Tlag", "Tmax_Rate", "Max_Rate", "Mid_Pt_last", "Rate_last", "AURC_last", "AURC_last_D", "Vol_UR", "Amount_Recovered", "Percent_Recovered", "AURC_all", "AURC_INF_obs", "AURC_PerCentExtrap_obs", "AURC_INF_pred", "AURC_PerCentExtrap_pred", "AURC_lower_upper", "Rate_last_pred"
  • parameters calculated in case of urine data if partial AUC calculation intervals are provided through the partialAucTime: "AURC_lower_upper", "AURC_lower_upper_D"
stratification [optional] Stratification to apply on results. By default, project one is applied. Stratification is a list containing:

  • state Stratification state
  • groups Stratification groups list

See setNCAResultsStratification for more details about this argument structure.

See Also

setNCAResultsStratification getNCAResultsStratification setResultsStratificationGroups

Click here to see examples

#

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 summary statistics for NCA ratios

Description

Get statistics over the estimated values of NCA ratios defined in the current project as ratios of NCA parameters across occasions.

Usage

getNCARatioStatistics(...)

Arguments

... (character) Names of the ratios whose values must be displayed. Empty: all available ratios are displayed.

See Also

getNCAIndividualRatios, createNCARatio, deleteNCARatio, getNCARatios

Click here to see examples

#

loadProject(paste0(getDemoPath(),"/1.basic_examples/project_accumulationRatio.pkx"))

runNCAEstimation()

getNCARatioStatistics()


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 character covariate name
definition vector<double>(continuous) or list<vector<character>>(categorical) group separations (continuous) or modality sets (categorical)

A stratification state is represented as a list with:

split vector<character> ordered list of splitted covariates
filter list< pair<character, vector<integer>> > 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

setNCAResultsStratification

Click here to see examples

#

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

#

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<character>) Ordered list of splitted covariates
filter (list< pair<character, vector<integer>> >) 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 character covariate name
definition vector<double>(continuous) || list<vector<character>>(categorical) group separations (continuous) || modality sets (categorical)

A stratification state is represented as a list with:

split vector<character> ordered list of splitted covariates
filter list< pair<character, vector<integer>> > list of paired containing a covariate name and the indexes of associated kept groups

See Also

getCAResultsStratification

Click here to see examples

#

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<character>) Ordered list of splitted covariates
filter (list< pair<character, vector<integer>> >) List of pairs 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 character covariate name
definition vector<double>(continuous) || list<vector<character>>(categorical) group separations (continuous) || modality sets (categorical)

A stratification state is represented as a list with:

split vector<character> ordered list of splitted covariates
filter list< pair<character, vector<integer>> > 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

getNCAResultsStratification

Click here to see examples

#

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 (logical) [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

getChartsData

Click here to see examples

#

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

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

Click here to see examples

#

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 logical
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 logical
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 logical
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

setScenario

Click here to see examples

#

[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.

If exportchartsdata preference is set to TRUE with setPreferences, runscenario generates the charts data in the result folder.

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

setScenario getScenario

Click here to see examples

#

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 logical
NOTE: by default the logical 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 logical
NOTE: By default the logical 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 logical
NOTE: By default the logical 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

getScenario.

Click here to see examples

#

[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

#

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

#

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

#

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

#

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

#

runNCAEstimation()

## End(Not run)


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] Add custom parameters from the preferences to the project

Description

Add custom parameters from the preferences to the project.
If a custom NCA parameter exists in preferences, this function can be used to add it to the current
project. Available arguments:

“names” (character, required) Name of the parameter.

Usage

addCustomNCAParametersFromPreferences(names = NULL)

See Also

createCustomNCAParameter, deleteCustomNCAParameter, getCustomNCAParameters


[PKanalix] Create a new NCA parameter as a formula of existing parameters

Description

Create a new NCA parameter as a formula of existing parameters and covariates. Available arguments:

“name” (character, required) Name of the parameter.
“formula” (character, required) Formula used to calculate the parameter.
This mathematical expression can contain PKanalix names of parameters (including
partial AUCs, but excluding other custom parameters), names of covariates, operators
+, -, /, * and ^, parentheses and functions abs, sqrt, exp, log, log10, logit, invlogit,
sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, floor, ceil, factorial, min, max,
atan2, rem. Partial AUC parameters with non-integer times need to be specifically formatted
(e.g., AUC_0_24.5 becomes AUC_0_24d5 and AUC_0_1e-07 becomes AUC_0_1em07).
“alias” (character, optional) Stylized name of the parameter that will
be displayed in results. Can contain tags <sub></sub> and <sup></sup> for subscript
and superscript.
“unit” (character, optional) Units of the parameter. It can contain
substrings TIME, AMOUNT, VOLUME, CONC, GRADING to use data set units of time, dose amount,
volume, concentration and normalization units. Different units should be combined with
the character “.”, and “^-1” can be used.
“previousName” (character, optional) Should be used only when editing
an existing custom parameter. In that case the previous parameter is replaced with the new parameter.
“addToPreferences” (logical, optional) Whether to add the custom NCA parameter to PKanalix preferences (default=FALSE).

Usage

createCustomNCAParameter(
  name,
  formula,
  alias = "",
  unit = "",
  addToPreferences = FALSE,
  previousName = ""
)

See Also

deleteCustomNCAParameter, getCustomNCAParameters, addCustomNCAParametersFromPreferences

Click here to see examples

#

loadProject(paste0(getDemoPath(),"/1.basic_examples/project_covariates.pkx"))

createCustomNCAParameter(name="CLperkg", 

                         formula = "Cl_F_obs/WEIGHT", 

                         alias = "CL/kg", 

                         unit = "VOLUME.TIME^-1.KG^1",

                         addToPreferences = FALSE)


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] Create a ratio of NCA parameters across occasions.

Description

To use this, the dataset must have occasions. The ratios of parameters are calculated for each individual, across occasions.
The ratio corresponds to the parameter value for the test modality divided by the parameter value for the reference modality. If certain subjects have multiple values of the test or reference value (for example, one occasion of R drug and two occasions of T drug), then the arithmetic mean of values of the subject-occasion results is taken.

Usage

createNCARatio(name, variable, reference, test, parameter)

Arguments

name (character) Name of the new parameter defined as ratio of existing parameters.
variable (character) Occasion or categorical covariate column.
reference (character) Reference modality.
test (character) Test modality.
parameter (character) Name of the NCA parameter used in the ratio.

See Also

deleteNCARatio, getNCARatios, getNCAIndividualRatios, getNCARatioStatistics

Click here to see examples

#

loadProject(paste0(getDemoPath(),"/2.case_studies/project_Theo_extravasc_SD.pkx"))

createNCARatio(name="AUCratio", variable="FORM", reference = "ref", test = "test", parameter = "AUCINF_obs")


Back to the list, PKanalix API, Monolix API, Simulx API.


[PKanalix] Delete a custom NCA parameter

Description

Remove a previously created custom parameter from the current project. Available arguments:

“name” (character, required) Name of the parameter.

Usage

deleteCustomNCAParameter(name)

See Also

createCustomNCAParameter, getCustomNCAParameters, addCustomNCAParametersFromPreferences


[PKanalix] Delete an NCA ratio.

Description

[PKanalix] Delete an NCA ratio.

Usage

deleteNCARatio(name)

Arguments

name (character) Name of the parameter defined as ratio of existing NCA parameters.

See Also

createNCARatio, getNCARatios

Click here to see examples

#

loadProject(file.path(getDemoPath(), "1.basic_examples", "project_accumulationRatio.pkx"))

deleteNCARatio(name = "accumulationRatio")

getNCARatios()


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” (integer) 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” (character) 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” (character) automatically recognize BE design “crossover” or “parallel” (cannot be changed)

Usage

getBioequivalenceSettings(...)

Arguments

... [optional] (character) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned.

Value

A list with each setting name mapped to its current value.

See Also

setBioequivalenceSettings

Click here to see examples

#

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” (character) 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” (character) 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” (character) Method by which the BLQ data should be replaced. One of “zero”, “LOQ”, “LOQ2” or “missing”.

Usage

getCASettings(...)

Arguments

... [optional] (character) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned.

Value

A list with each setting name mapped to its current value.

See Also

setCASettings

Click here to see examples

#

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] Retrieve the list of the custom NCA parameters in the project and/or the preferences

Description

Retrieve the list of the custom NCA parameters defined in the current project and/or the preferences. Available arguments:

“fromPreferences” (logical, optional) If the list should include
parameters available in preferences.
“fromProject” (logical, optional) If the list should include
parameters added to the current project.
“onlyCompatible” (logical, optional) If the list should include
only parameters compatible with the current project.

Usage

getCustomNCAParameters(
  fromPreferences = TRUE,
  fromProject = TRUE,
  onlyCompatible = FALSE
)

See Also

createCustomNCAParameter, deleteCustomNCAParameter


[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” (character) regressor name used as urine volume.
“datatype” (list) list(“obsId” = character(“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” (logical) are units enabled or not.

Usage

getDataSettings(...)

Arguments

... [optional] (character) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned.

Value

A list with each setting name mapped to its current value.

See Also

setNCASettings

Click here to see examples

#

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 defined NCA ratios.

Description

This returns the settings used to define ratios of NCA parameters across occasions, with the same values as the ones given with createNCARatio.

Usage

getNCARatios()

See Also

createNCARatio, deleteNCARatio

Click here to see examples

#

loadProject(paste0(getDemoPath(),"/1.basic_examples/project_accumulationRatio.pkx"))

getNCARatios()


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” (character) The observation id from data section to use for computations
“administrationType” (list) list(key = “admId”, value = character(“intravenous” or “extravascular”)). admId Admninistration ID from data set or 1 if no admId column in the dataset.
“integralMethod” (character) Method for AUC and AUMC calculation and interpolation. Possible outputs are Possible methods are “linTrapLinInterp” (linear trapezoidal linear), “linLogTrapLinLogInterp” (linear log trapezoidal), “upDownTrapUpDownInterp” (linear up log down ) and “linTrapLinLogInterp” (linear trapezoidal linear/log).
“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.
“interdoseIntervalForSingleDose” (list) The first element of the list is a logical describing if this setting is used. The second element of the list is a number defining the interdose interval.
“blqMethodBeforeTmax” (character) Method by which the BLQ data before Tmax should be replaced.
“blqMethodAfterTmax” (character) Method by which the BLQ data after Tmax should be replaced.
“ajdr2AcceptanceCriteria” (list) The first element of the list is a logical 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 logical 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 logical 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” (character) 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 logical 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 logical 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” (character) Weighting method used for the regression that estimates lambda_Z.
“computedNCAParameters” (vector) All the parameters to compute during the analysis.
“sparse” (logical) If the data should be considered sparse, and hence NCA should run on the mean profiles.
“spareStratification” (vector) The covariates that should be used to stratify the mean profiles for sparse NCA.
“sparseCensoring” (list) The censoring settings to apply to calculate the mean profiles for sparse NCA in case of censored data (see setNCASettings for more details).

Usage

getNCASettings(...)

Arguments

... [optional] (character) Name of the settings whose value should be displayed. If no argument is provided, all the settings are returned.

Value

A list with each setting name mapped to its current value.

See Also

setNCASettings

Click here to see examples

#

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” (integer) 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” (character) 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

getBioequivalenceSettings

Click here to see examples

#

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:

“value” (double) Initial value to use. Must be in the limits in case of bounded constraint.
“constraint” (character) Possible values are “none”, “positive” or “bounded”.
“limits” (vector of doubles) [optional] Limits in case of bounded constraint.

See Also

getCAInitialValues

Click here to see examples

#

  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” (character) 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” (character) 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

getCASettings

Click here to see examples

#

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” (character) regressor name used as urine volume.
“datatype” (list) list(“obsId” = character(“plasma” or “urine”). The type of data associated with each obsId. Default "plasma".
“units” (list) list with the units associated to “dose” (“fg”, “pg”,”ng”,”ug”,”mg”,”g”,”pmol”,”nmol”,”umol”,”mmol”, “mol”, “IU”, “mIU”, “uIU”, “Bq”, “kBq”, “MBq”, “GBq”, “mgEq”, “ugEq”, “ngEq” or “pgEq”), “time” (“s”,”min”,”h”,”d” or “w”), “volume” (“L”, “dL” 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” (logical) are units enabled or not.

Usage

setDataSettings(...)

Arguments

... A collection of comma-separated pairs {settingName = settingValue}.

See Also

getDataSettings

Click here to see examples

#

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” (character) The observation id from data section to use for computations.
“administrationType” (list) list(key = “admId”, value = character(“intravenous” or “extravascular”)). admId Admninistration ID from data set or 1 if no admId column in the dataset.
“integralMethod” (character) Method for AUC and AUMC calculation and interpolation. Possible methods are “linTrapLinInterp” (default, linear trapezoidal linear), “linLogTrapLinLogInterp” (linear log trapezoidal), “upDownTrapUpDownInterp” (linear up log down ) and “linTrapLinLogInterp” (linear trapezoidal linear/log).
“partialAucTime” (list) The first element of the list is a logical 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 logical equals FALSE, the lower bound equals to the last dose time in the data set and the upper bound equals to the last observation time of the selected observation ID.
“interdoseIntervalForSingleDose” (list) The first element of the list is a logical describing if this setting is used. The second element of the list is a number defining the interdose interval. By default, the logical equals FALSE.
“blqMethodBeforeTmax” (character) Method by which the BLQ data before Tmax should be replaced. Possible methods are “missing”, “LOQ”, “LOQ2” or “zero” (default).
“blqMethodAfterTmax” (character) 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 logical 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 logical equals FALSE and the value is 0.98.
“extrapAucAcceptanceCriteria” (list) The first element of the list is a logical 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 logical equals FALSE and the value is 20.
“spanAcceptanceCriteria” (list) The first element of the list is a logical 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 logical equals FALSE and the value is 3.
“lambdaRule” (character) 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 logical 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 logical equals FALSE and the value is 500.
“startTimeNotBefore” (list) The first element of the list is a logical 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 logical equals FALSE and the value is 0.
“weightingNca” (character) 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:
  • parameters related to the calculation of lambda_z: "Rsq", "Rsq_adjusted", "Corr_XY", "No_points_lambda_z", "Lambda_z", "Lambda_z_lower", "Lambda_z_upper", "HL_Lambda_z", "Lambda_z_intercept", "Span"
  • parameters calculated in case of plasma data: "Tlag", "T0", "Dose", "N_Samples", "C0", "Tmax", "Cmax", "Cmax_D", "Tlast", "Clast", "AUClast", "AUClast_D", "AUMClast", "MRTlast", "MRTlast", "AUCall", "AUCINF_obs", "AUCINF_D_obs", "AUC_PerCentExtrap_obs", "AUC_PerCentBack_Ext_obs", "AUMCINF_obs", "AUMC_PerCentExtrap_obs", "MRTINF_obs", "MRTINF_obs", "Vz_F_obs", "Cl_F_obs", "Vz_obs", "Cl_obs", "Vss_obs", "Clast_pred", "AUCINF_pred", "AUCINF_D_pred", "AUC_PerCentExtrap_pred", "AUC_PerCentBack_Ext_pred", "AUMCINF_pred", "AUMC_PerCentExtrap_pred", "MRTINF_pred", "MRTINF_pred", "Vz_F_pred", "Cl_F_pred", "Vz_pred", "Cl_pred", "Vss_pred"
  • parameters calculated in case of plasma data if partial AUC calculation intervals are provided through the partialAucTime (range between t0 and t1): "AUC_t0_t1", "AUC_t0_t1_D", "CAVG_t0_t1"
  • parameters calculated only for multiple dose data: "Tau", "Ctau", "Ctrough", "AUC_TAU", "AUC_TAU_D", "AUC_TAU_PerCentExtrap", "AUMC_TAU", "Vz_F", "Vz", "CLss_F", "CLss", "Cavg", "FluctuationPerCent", "FluctuationPerCent_Tau", "Accumulation_Index", "Swing", "Swing_Tau", "Tmin", "Cmin", "Cmax", "MRTINF_obs"
  • parameters calculated in case of urine data: "T0", "Dose", "N_Samples", "Tlag", "Tmax_Rate", "Max_Rate", "Mid_Pt_last", "Rate_last", "AURC_last", "AURC_last_D", "Vol_UR", "Amount_Recovered", "Percent_Recovered", "AURC_all", "AURC_INF_obs", "AURC_PerCentExtrap_obs", "AURC_INF_pred", "AURC_PerCentExtrap_pred", "AURC_lower_upper", "Rate_last_pred"
  • parameters calculated in case of urine data if partial AUC calculation intervals are provided through the partialAucTime (range between t0 and t1): "AURC_t0_t1", "AURC_t0_t1_D"
“sparse” (logical) If the data should be considered sparse, and hence NCA should run on the mean profiles. By default, the logical equals FALSE.
“sparseStratification” (vector) The covariates that should be used to stratify the mean profiles for sparse NCA. By default, the list is empty.
“sparseCensoring” (list) The censoring settings to calculate the mean profiles for sparse NCA in case of censored data. It is a list with:
  • an element named "rule", that is either a string (possible values: "missing", "zero", "loq", "loq2") if a single rule is applied, or a list if two different rules are applied depending on the number of censored samples. In that case, "rule" is a list of three elements named "criterion", "target" and "rules". The "criterion" element is a string with the syntax "N_BLQ >= [number]" if the criterion is on the absolute number of censored samples at each time point, or "N_BLQ >= [number]% N_tot" if the criterion is on the fraction of censored samples relatively to the total number of samples. The "target" element is a string equal to "meanValues" or "individualValues" and corresponds to the values impacted by the first rule. The "rules" element is a vector of two strings of possible values "missing", "zero", "loq" or "loq2". The first rule is applied on the samples specified in "target" if the criterion is not met, and the second rule is applied on the individual samples if the criterion is met.
  • an optional list named "checkMeanSamples" with elements "loq" (double), "blqBeforeTmax" and "blqAfter Tmax" (possible values: "missing", "zero", "loq", "loq2"). If the list is given, mean samples are compared to the LOQ value from the list and if they are smaller than the LOQ they are replaced according to the specified rules before and after Tmax.

Usage

setNCASettings(...)

Arguments

... A collection of comma-separated pairs {settingName = settingValue}.

See Also

getNCASettings

Click here to see examples

#

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

setNCASettings(sparse=TRUE, sparseStratification=list("DGROUP", "STUDY"), sparseCensoring=list(rule = list(criterion = "N_BLQ >= 4", target = "individualValues", rules = c("missing", "loq")))) # set sparse NCA with stratication by STUDY and DGROUP. At each time point and in each group, if there are less than 4 censored samples they are considered as missing (ignored), otherwise the mean value is replaced by the largest LOQ.

setNCASettings(sparse=T, sparseCensoring=list(rule = "zero", checkMeanSamples = list(loq = 3500, blqBeforeTmax = "zero", blqAfterTmax = "missing"))) # set sparse NCA. At each time point, censored samples are replaced by zero to calculate mean samples. If calculated mean samples are smaller than 3500 they are replaced by zero before Tmax and ignored after Tmax.

## End(Not run)


Back to the list, PKanalix API, Monolix API, Simulx API.