Select Page

Description of the R functions associated to the plots

Description of the functions of the API

getChartsData Get the charts data.
plotBivariateDataViewer Plot the bivariate viewer.
plotCovariates Plot the covariates.
plotObservedData Plot the observed data.
plotIndividualFits Plot the individual fits.
plotObservationsVsPredictions Plot the observations versus prediction.
plotResidualsDistribution Plot the residual distribution.
plotResidualsScatterPlot Plot the scatter plot of the residuals.
plotParametersDistribution Plot the parameter distribution.
plotParametersVsCovariates Plot the parameters vs covariates.
plotRandomEffectsCorrelation Plot the random effects correlation.
plotStandardizedRandomEffectsDistribution Plot the standardized random effect distribution.
plotBlqPredictiveCheck Plot the predictive BLQ check.
plotNpc Plot the NPC.
plotPredictionDistribution Plot the prediction distribution.
plotVpc Plot the VPC.
plotImportanceSampling Plot the Importance Sampling task results.
plotMCMC Plot the MCMC task results.
plotSaem Plot the SAEM task results.
getPlotPreferences Get the Plot prerefences.
resetPlotPreferences Reset the plot preferences.
setPlotPreferences Set the plot preferences.

[Monolix – PKanalix] Compute Charts data with custom stratification options and
custom computation settings

Description

[Monolix – PKanalix] Compute Charts data with custom stratification options and
custom computation settings

Usage

getChartsData(
  plotName,
  computeSettings = NULL,
  ids = NULL,
  splitGroup = NULL,
  colorGroup = NULL,
  filter = NULL
)

Arguments

plotName (string) Name of the plot function.
computeSettings (list) list with computational settings
ids list of ids to display (by default all ids are displayed).
splitGroup data group criteria. a list, or a list of list with fields:

  • name : The name of the covariate to use in grouping,
  • breaks : In case of a continuous covariate, a list of break values,
  • groups : [optional] In case of a categorical covariate, define groups of modalities.

(by default no split is applied).

colorGroup data group criteria. a list, or a list of list with fields:

  • name : The name of the covariate to use in grouping, or the name of the column id,
  • breaks : In case of a continuous covariate, a list of break values,
  • groups : [optional] In case of a categorical covariate, define groups of modalities.

(by default no color group is defined).

filter data filtering criteria. a list, or a list of list with fields:

  • name : the name of the covariate to filter,
  • cat : in case of a categorical covariate, the name of the category to filter,
  • interval : in case of a continuous covariate, a list of filtering intervals.

(by default no filtering is applied).

Value

A dataframe object or a list of dataframe object to pass to “data” argument
of plot functions

Click here to see examples

initializeLixoftConnectors(software = “pkanalix”)

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

loadProject(project)

data <- getChartsData(plotName = “plotObservedData”, ids = c(1, 2, 3, 4))

data <- getChartsDataNCA(plotName = “plotNCAParamCorrelation”)

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

xBinsSettings <- list(is.fixedNbBins = TRUE, nbBins = 10)

data <- getChartsData(plotName = “plotVpc”,

computeSettings = list(xBinsSettings = xBinsSettings))

data <- getChartsData(plotName = “plotVpc”, computeSettings = list(level = 75))

splitGroup <- list(name = “WEIGHT”, breaks = c(75))

filter <- list(name = “WEIGHT”, interval = c(75, 100))

data <- getChartsData(plotName = “plotVpc”, splitGroup = splitGroup)

data <- getChartsData(plotName = “plotVpc”, filter = filter)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix – PKanalix] Generate Bivariate observations plots

Description

[Monolix – PKanalix] Generate Bivariate observations plots

Usage

plotBivariateDataViewer(
  obs1 = NULL,
  obs2 = NULL,
  data = NULL,
  settings = list(),
  stratify = list(),
  preferences = list()
)

Arguments

obs1 (string) Name of the observation to display in x axis (in dataset header).
By default the first observation is considered.
obs2 (string) Name of the observation to display in y axis (in dataset header).
By default the second observation is considered.
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotBivariateDataViewer”, …))
If data not specified, charts data will be computed inside the function.
settings List with the following settings

  • dots (bool) – If TRUE individual observations are displayed as dots (default TRUE).
  • lines (bool) – If TRUE individual observations are displayed as lines (default TRUE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) label on x axis (Name of obs1 by default).
  • ylab (string) label on y axis (Name of obs2 by default).
  • ncol (int) 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 (boolean) Set units in axis labels (only available with PKanalix).
  • scales (string) 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

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotBivariateDataViewer”) to check available displays.

Value

A ggplot object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “warfarinPKPD_project.mlxtran”)

loadProject(project)

plotBivariateDataViewer(obs1 = “y1”, obs2 = “y2”)

plotBivariateDataViewer(settings = list(lines = FALSE))

# stratification

plotBivariateDataViewer(obs1 = “y1”, obs2 = “y2”, stratify = list(ids = 100))

plotBivariateDataViewer(stratify = list(splitGroup = list(name = “age”, breaks = 25),

filter = list(name = “sex”, cat = 1)))

plotBivariateDataViewer(stratify = list(colorGroup = list(name = “wt”, breaks = 75)))

plotBivariateDataViewer(stratify = list(splitGroup = list(list(name = “age”, breaks = 25),

list(name = “sex”))))

# update plot settings or preferences

plotBivariateDataViewer(preferences = list(obs = list(color = “#32CD32”)))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix – PKanalix] Generate Covariate plots

Description

Generate scatterplots between two continuous covariates or bar plot
between categorical covariates

Usage

plotCovariates(
  covariatesRows = NULL,
  covariatesColumns = NULL,
  data = NULL,
  settings = list(),
  preferences = list(),
  stratify = list()
)

Arguments

covariatesRows vector with the name of covariates to display on rows
(by default the first 4 covariates are displayed).
covariatesColumns vector with the name of covariates to display on columns
(by default the first 4 covariates are displayed).
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotCovariates”, …))
If data not specified, charts data will be computed inside the function.
settings List with the following settings

  • regressionLine (bool) If TRUE, Add regression line in scatterplots (default TRUE).
  • spline (bool) If TRUE, Add xpline in scatterplots (default FALSE).
  • histogramColors (vector<string>) List of colors to use in histograms plots.
  • histogramPosition (string) 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 (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • bins (int) 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

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “pkanalix”)

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

loadProject(project)

# covariate distribution when only one covariate is specified

plotCovariates(covariatesRows = “HT”, settings = list(bins = 10))

# scatter plot when both covariates are continuous

plotCovariates(covariatesRows = “HT”, covariatesColumns = “AGE”, settings = list(spline = TRUE))

plotCovariates(covariatesRows = “HT”, covariatesColumns = c(“AGE”, “FORM”))

# box plot when one covariate is categorical and the othe one is continuous

preferences <- list(boxplot = list(fill = “#2075AE”), boxplotOutlier = list(shape = 3))

plotCovariates(covariatesRows = “FORM”, covariatesColumns = “AGE”, preferences = preferences)

# histogram when covariate on column is categorical

plotCovariates(covariatesRows = “FORM”, covariatesColumns = “SEQ”,

settings = list(histogramColors = c(“#5DC088”, “#DBA92B”)))

plotCovariates(covariatesRows = “AGE”, covariatesColumns = “SEQ”,

settings = list(histogramColors = c(“#5DC088”, “#DBA92B”)))

# stratification

plotCovariates(covariatesRows = “HT”, covariatesColumns = “WT”, stratify = list(

splitGroup = list(name = “AGE”, breaks = 25),

filter = list(name = “Period”, cat = 1)))

preferences <- list(regressionLine = list(color = “#E5551B”))

plotCovariates(covariatesRows = “AGE”, covariatesColumns = “WT”, stratify = list(

colorGroup = list(name = “HT”, breaks = 181),

colors = c(“#2BB9DB”, “#DD6BD2”)), preferences = preferences)

plotCovariates(covariatesRows = “HT”, covariatesColumns = “WT”,

stratify = list(splitGroup = list(list(name = “AGE”, breaks = 25),

list(name = “SEQ”))))

# Mulitple covariates

plotCovariates()

plotCovariates(covariatesRows = c(“AGE”, “SEQ”, “HT”), covariatesColumns = c(“AGE”, “SEQ”, “HT”))

plotCovariates(stratify = list(filter = list(name = “AGE”, interval = c(20, 30))))

plotCovariates(stratify = list(splitGroup = list(name = “AGE”, breaks = c(25))))

plotCovariates(stratify = list(colorGroup = list(name = “AGE”, breaks = c(25))))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix – PKanalix] Generate Observation plots

Description

[Monolix – PKanalix] Generate Observation plots

Usage

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

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotObservedData”, …))
If data not specified, charts data will be computed inside the function.
settings List with the following settings
[CONTINUOUS – DISCRETE] Settings specific to continuous and discrete data

  • dots (bool) – If TRUE individual observations are displayed as dots (default TRUE).
  • lines (bool) – If TRUE individual observations are displayed as lines (default TRUE).
  • mean (bool) – If TRUE mean of observations is displayed (default FALSE).
  • error (bool) If TRUE error bar is is displayed (default FALSE).
  • meanMethod (string) – When mean is set to TRUE, display arithmetic mean (“arithmetic”) or
    geometric mean (“geometric”). Default value is “arithmetic”.
  • errorMethod (string) – When error is set to TRUE, display standard deviation (“standardDeviation”) or
    standard error (“standardError”). Default value is “standardDeviation”.
  • useCensored (bool) Choose to use censored data to compute mean and error (TRUE)
    or to ignore it (FALSE) (default FALSE).
  • binLimits (bool) – Add bins limits as vertical lines (default FALSE).
  • binsSettings a list of settings for time axis binning for observation statistics computation:
    • criteria (string) – Bining criteria, one of ‘equalwidth’, ‘equalsize’, or ‘leastsquare’ methods.
      (default leastsquare).
    • is.fixedNbBins (bool) – If TRUE define a fixed number of bins, else define a range for automatic selection
      (default FALSE).
    • nbBins (int) – Define a fixed number of bins (default 10).
    • binRange (vector(int, int)) – Define a range for the number of bins (default c(5, 100)).
    • nbBinData (vector(int, int)) – Define a range for the number of data points per bin (default c(10, 200)).

[DISCRETE] Settings specific to discrete data

  • plot (string) Type of plot: “continuous” (default),
    “stacked” and “grouped”.
  • histogramColors (vector<string>) 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 (boolean) – If TRUE censored data are displayed as dots, in addition to survival function (default TRUE).
  • dosingTimes (boolean) – Add dosing times as vertical lines (default FALSE).
    For project with dose information only
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) – Add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) – Add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) – Add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) – Label on x axis (default “Time”).
  • ylab (string) – Label on y axis (default obsName).
  • ncol (int) – 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 (boolean) – Set units in axis labels (only available with PKanalix).
  • scales (string) 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

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotObservedData”) to check available displays.

Value

A ggplot object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “pkanalix”)

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

loadProject(project)

plotObservedData()

plotObservedData(settings = list(binLimits = TRUE))

plotObservedData(settings = list(dosingTimes = TRUE))

plotObservedData(settings = list(meanMethod = “geometric”, mean = TRUE))

plotObservedData(settings = list(mean = TRUE, error = TRUE, dots = FALSE, lines = TRUE))

# stratification

plotObservedData(stratify = list(splitGroup = list(name = “AGE”, breaks = 25),

filter = list(name = “Period”, cat = 1)))

plotObservedData(stratify = list(colorGroup = list(name = “HT”, breaks = 181)))

plotObservedData(stratify = list(splitGroup = list(list(name = “AGE”, breaks = 25),

list(name = “Period”))))

# update plot theme or preferences

plotObservedData(settings = list(xlab = “Time”, ylab = “Plasma Concentration”))

plotObservedData(preferences = list(obs = list(color = “#32CD32”),

observationStatistics = list(lineType = “dashed”)))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot Monolix Individual Fits
Only available for Continuous data.

Description

[Monolix] Plot Monolix Individual Fits
Only available for Continuous data.

Usage

plotIndividualFits(
  obsName = NULL,
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
settings List with the following settings

  • indivEstimate (string) Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”)
    (default “mode”) .
  • obsDots (bool) – If TRUE individual observations are displayed as dots (default TRUE).
  • obsLines (bool) – If TRUE individual observations are displayed as lines (default FALSE).
  • cens (bool) – If TRUE censored intervals are displayed (default TRUE).
  • indivFits (bool) – If TRUE individual fits are displayed (default TRUE).
  • popFits (bool) – If TRUE population fits (typical individual) are displayed (default FALSE).
  • popCov (bool) – If TRUE population fits (individual covariates) are displayed (default FALSE).
  • predMedian (bool) – If TRUE median of individual fits computed based on multiple simulations (default FALSE).
  • predInterval (bool) – If TRUE 90 % prediction interval of individual fits computed based on multiple simulations (default FALSE).
  • splitOccasions (bool) – If TRUE occasions are displayed on separate plots (default TRUE).
  • dosingTimes (boolean) – Add dosing times as vertical lines (default FALSE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) label on x axis (default “Time”).
  • ylab (string) label on y axis (default obsName).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotIndividualFits”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotIndividualFits”, …))
If data not specified, charts data will be computed inside the function.

Value

A ggplot object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotIndividualFits()

plotIndividualFits(settings=list(popFits=T))

plotIndividualFits(settings=list(obsLines=T, obsDots=F, predInterval=T))

plotIndividualFits(settings=list(dosingTimes=T))

# stratification options

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

plotIndividualFits(stratify=list(filter=list(name=”WEIGHT”, interval=c(75, 100))))

plotIndividualFits(stratify=list(filter=list(name=”SEX”, cat =”F”)))

plotIndividualFits(stratify=list(colorGroup=list(name=”SEX”), colors=c(“#5DC088”, “#DBA92B”)))

plotIndividualFits(

settings=list(legend=T),

stratify = list(colorGroup=list(list(name = “SEX”),

list(name = “WEIGHT”, breaks = 70)))

)

# settings and preferences options

plotIndividualFits(settings=list(ylog=T, ylim=c(0.8, 11)))

preferences <- list(popFits=list(lineType=”solid”, legend=”Population fits”))

plotIndividualFits(settings=list(popFits=T), preferences=preferences)

data <- getChartsData(plotName=”plotIndividualFits”,

computeSettings=list(indivEstimate=”mean”),

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

plotIndividualFits(data=data)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot Observation VS Prediction

Description

[Monolix] Plot Observation VS Prediction

Usage

plotObservationsVsPredictions(
  obsName = NULL,
  predictions = c("indiv"),
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
predictions (string) LIst of predictions to display: population prediction (“pop”),
individual prediction (“indiv”)
(default c(“indiv”)).
settings List with the following settings

  • indivEstimate (string) Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “mode”).
  • useCensored (bool) Choose to use BLQ data (TRUE) or to ignore it (FALSE)
    to compute the statistics (default TRUE).
  • censoring (string) BLQ data can be simulated (‘simulated’),
    or can be equal to the limit of quantification (‘loq’) (default ‘simulated’).
  • obs (bool) – If TRUE observations are displayed as dots (default TRUE).
  • cens (bool) – If TRUE censoring data are displayed as red dots (default TRUE).
  • spline (bool) – If TRUE add spline (default FALSE).
  • identityLine (bool) – If TRUE add identity line (default TRUE).
  • predInterval (bool) – If TRUE add 90% prediction interval (default FALSE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
  • ylab (string) label on y axis (default “Observations”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotObservationsVsPredictions”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of cahrts data as dataframe – Output of getChartsData
(getChartsData(“plotObservationsVsPredictions”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotObservationsVsPredictions()

plotObservationsVsPredictions(predictions = “pop”)

plotObservationsVsPredictions(prediction = “indiv”, settings = list(indivEstimate = “simulated”))

plotObservationsVsPredictions(settings = list(indivEstimate = “mean”, spline = TRUE))

plotObservationsVsPredictions(settings = list(indivEstimate = “mode”, predInterval = TRUE))

# stratification

plotObservationsVsPredictions(stratify = list(filter = list(name = “SEX”, cat = “F”)))

plotObservationsVsPredictions(settings = list(ylog = TRUE, xlog = TRUE))

plotObservationsVsPredictions(stratify = list(splitGroup = list(name = “WEIGHT”, breaks = c(75))))

plotObservationsVsPredictions(stratify = list(colorGroup = list(name = “WEIGHT”, breaks = c(75))))

plotObservationsVsPredictions(

settings=list(legend=T),

stratify = list(colorGroup=list(list(name = “SEX”),

list(name = “WEIGHT”, breaks = 70)))

)

data <- getChartsData(plotName = “plotObservationsVsPredictions”,

computeSettings = list(indivEstimate = “simulated”),

colorGroup = list(name = “WEIGHT”, breaks = c(75)))

plotObservationsVsPredictions(data = data)

# display multiple predictions

plotObservationsVsPredictions(predictions = c(“pop”, “indiv”))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Generate Distribution of the residuals

Description

[Monolix] Generate Distribution of the residuals

Usage

plotResidualsDistribution(
  obsName = NULL,
  residuals = c("indiv", "npde"),
  plots = c("pdf", "cdf"),
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
residuals (string) List of residuals to display:
population residuals (“pop”), individual residuals (“indiv”),
normalized prediction distribution error (“npde”)
(default c(“indiv”, “npde)).
plots Type of plots: probability density distribution (“pdf”),
cumulative density distribution (“cdf”)
(default c(“pdf”, “cdf”)).
settings List with the following settings

  • indivEstimate (string) Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “simulated”).
  • useCensored (bool) Choose to use BLQ data (TRUE) or to ignore it (FALSE) to compute the statistics (default TRUE).
    For continuous data only.
  • censoring (string) BLQ data can be simulated (‘simulated’), or can be equal to the limit of quantification (‘loq’)
    (default ‘simulated’).
    For continuous data only.
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotResidualsDistribution”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotResidualsDistribution”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software=”monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotResidualsDistribution()

plotResidualsDistribution(residuals=”indiv”, settings=list(indivEstimate=”simulated”))

plotResidualsDistribution(residuals=”indiv”, settings=list(indivEstimate=”mode”))

plotResidualsDistribution(residuals=”pop”, plots=”pdf”)

plotResidualsDistribution(residuals=”npde”, plots=”cdf”)

plotResidualsDistribution(stratify=list(filter=list(name=”SEX”, cat=”F”)))

plotResidualsDistribution(stratify=list(splitGroup=list(name=”WEIGHT”, breaks=c(75))))

plotResidualsDistribution(

residuals=”indiv”, settings=list(legend=T),

stratify = list(splitGroup=list(list(name = “SEX”),

list(name = “WEIGHT”, breaks = 70)))

)

data <- getChartsData(plotName=”plotResidualsDistribution”,

computeSettings=list(indivEstimate=”simulated”))

plotResidualsDistribution(data=data)

plotResidualsDistribution()

plotResidualsDistribution(residuals=c(“indiv”, “npde”), settings=list(indivEstimate=”simulated”))

plotResidualsDistribution(residuals=c(“pop”, “indiv”), settings=list(indivEstimate=”mode”))

plotResidualsDistribution(plots=c(“pdf”, “cdf”))

plotResidualsDistribution(plots=c(“cdf”))

plotResidualsDistribution(residuals=”npde”)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Generate Scatter plots of the residuals

Description

Note that ‘prediction interval’ setting is not available in 2021 version for this connector.

Usage

plotResidualsScatterPlot(
  obsName = NULL,
  residuals = c("indiv"),
  xaxis = c("time", "prediction"),
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
residuals (string) List of residuals to display:
population residuals (“pop”), individual residuals (“indiv”),
normalized prediction distribution error (“npde”)
(default c(“indiv”)).
xaxis (string) List of x-axis to display:
time (“time”), prediction (“prediction”)
(default c(“time”, “prediction”) for continuous data, c(“time”) for discrete data).
settings List with the following settings

  • indivEstimate (string) Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “mode”).
    For continuous data only
  • level (int) level for prediction intervals computation (default 90).
  • higherPercentile (int) Higher percentile for empirical and predicted percentiles computation (default 90).
  • useCensored (bool) Choose to use BLQ data (TRUE) or to ignore it (FALSE) to compute the statistics (default TRUE).
    For continuous data only.
  • censoring (string) BLQ data can be simulated (‘simulated’), or can be equal to the limit of quantification (‘loq’)
    (default ‘simulated’).
    For continuous data only.
  • binsSettings a list of settings for bins:
    • criteria (string) Bining criteria, one of ‘equalwidth’, ‘equalsize’, or ‘leastsquare’ methods.
      (default leastsquare).
    • is.fixedNbBins (bool) If TRUE define a fixed number of bins, else define a range for automatic selection
      (default TRUE).
    • nbBins (int) Define a fixed number of bins (default 10).
    • binRange (vector(int, int)) Define a range for the number of bins (default c(5, 100)).
    • nbBinData (vector(int, int)) Define a range for the number of data points per bin (default c(10, 200)).
  • residuals (bool) – If TRUE display residuals (default TRUE).
  • cens (bool) – If TRUE display censored data (default TUE).
  • empPercentiles (bool) – If TRUE display empirical percentiles (default FALSE).
  • predPercentiles (bool) – If TRUE display predicted percentiles (default FALSE).
  • spline (bool) – If TRUE display spline (default FALSE).
  • binLimits (bool) – If TRUE Add bins limits as vertical lines (default FALSE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotResidualsScatterPlot”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of cahrts data as dataframe – Output of getChartsData
(getChartsData(“plotResidualsScatterPlot”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software=”monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotResidualsScatterPlot()

plotResidualsScatterPlot(residuals=”indiv”, settings=list(indivEstimate=”simulated”))

plotResidualsScatterPlot(residuals=”indiv”, settings=list(indivEstimate=”mode”))

plotResidualsScatterPlot(xaxis=”prediction”, residuals=”pop”)

plotResidualsScatterPlot(xaxis=”time”, residuals=”pop”)

plotResidualsScatterPlot(residuals=”npde”)

plotResidualsScatterPlot(settings=list(spline=T))

plotResidualsScatterPlot(settings=list(empPercentiles=T, level=90,

binsSettings=list(is.fixedNbBins=T, nbBins=5),

binLimits=T))

# Stratification

plotResidualsScatterPlot(stratify=list(filter=list(name=”SEX”, cat=”F”)))

plotResidualsScatterPlot(stratify=list(splitGroup=list(name=”WEIGHT”, breaks=c(75))))

plotResidualsScatterPlot(stratify=list(colorGroup=list(name=”WEIGHT”, breaks=c(75))))

data <- getChartsData(plotName=”plotResidualsScatterPlot”,

computeSettings=list(indivEstimate=”simulated”))

plotResidualsScatterPlot(data=data)

plotResidualsScatterPlot(residuals=c(“indiv”, “pop”),

settings=list(indivEstimate=”simulated”))

plotResidualsScatterPlot(residuals=”indiv”, xaxis=c(“prediction”),

settings=list(indivEstimate=”mode”))

plotResidualsScatterPlot(xaxis=c(“prediction”), residuals=c(“indiv”, “pop”))

plotResidualsScatterPlot(residuals=”npde”)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Distribution of the individual parameters computed by Monolix

Description

[Monolix] Distribution of the individual parameters computed by Monolix

Usage

plotParametersDistribution(
  parameters = NULL,
  plot = "pdf",
  settings = list(),
  preferences = NULL,
  stratify = list(),
  data = NULL
)

Arguments

parameters vector of parameters to display.
(by default the first 4 computed parameters are displayed).
plot (string) Type of plot: probability density distribution (“pdf”),
cumulative density distribution (“cdf”) (default “pdf)
settings a list of optional plot settings:

  • indivEstimate Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “simulated”).
  • empirical (bool) If TRUE, plot empirical density distribution (default TRUE).
  • theoretical (bool) If TRUE, plot theoretical density distribution (default TRUE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotParametersDistribution”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotParametersDistribution”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software=”monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotParametersDistribution(parameters=”ka”)

plotParametersDistribution(parameters=”Cl”, plot=”pdf”)

plotParametersDistribution(parameters=”ka”, plot=”cdf”)

plotParametersDistribution(parameters=”ka”, plot=”cdf”,

settings=list(indivEstimate=”simulated”))

plotParametersDistribution(parameters=”Cl”, plot=”pdf”,

settings=list(theoretical=F))

# stratification

plotParametersDistribution(stratify=list(filter=list(name=”WEIGHT”, interval=c(0, 75))))

plotParametersDistribution(parameters=”Cl”, stratify=list(splitGroup=list(name=”SEX”)))

colorGroup <- list(name=”WEIGHT”, breaks=c(75))

plotParametersDistribution(parameters= “Cl”, plot=”pdf”,

stratify=list(colorGroup=colorGroup, colors=c(“#46B4AF”, “#B4468A”)))

plotParametersDistribution(parameters=”Cl”, plot=”cdf”,

stratify=list(colorGroup=colorGroup, colors=c(“#46B4AF”, “#B4468A”)))

# update preferences

preferences = list(theoretical=list(color=”#B4468A”, lineType=”solid”, lineWidth=0.8))

plotParametersDistribution(parameters=”ka”, plot=”cdf”, preferences=preferences)

# pre compute dataset

data <- getChartsData(plotName=”plotParametersDistribution”,

computeSettings=list(indivEstimate=”simulated”))

plotParametersDistribution(data=data)

# multiple plots

plotParametersDistribution(parameters=c(“ka”, “Cl”))

plotParametersDistribution(plot=”pdf”)

plotParametersDistribution(plot=”cdf”)

plotParametersDistribution(plot=”cdf”, settings=list(indivEstimate=”simulated”))

plotParametersDistribution(plot = “pdf”, settings=list(theoretical=F))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Individual monolix parameter vs covariate plot

Description

[Monolix] Individual monolix parameter vs covariate plot

Usage

plotParametersVsCovariates(
  parameters = NULL,
  covariates = NULL,
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

parameters vector of parameters to display.
(by default the first 4 computed parameters are displayed).
covariates vector of covariates to display.
(by default the first 4 computed covariates are displayed).
settings List with the following settings

  • indivEstimate Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “simulated”).
  • parameterType (string) display random effect vs covariates (“randomEffect”),
    or transformed individual parameters vs covariates (“indivParameter”)
    (default “indivParameter”).
  • boxplotData (string) for categorical covariate, if boxplotData
    is not NULL, data are added as dots over the boxplot. They can be either “spread” on the box
    or “aligned” (default NULL)
  • regressionLine (bool) If TRUE, Add regression line in scatterplots (default TRUE).
  • spline (bool) If TRUE, Add xpline in scatterplots (default FALSE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotParametersVsCovariates”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotParametersVsCovariates”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software=”monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

# Individual parameters

plotParametersVsCovariates(covariates=”SEX”, parameters=”Cl”)

plotParametersVsCovariates(covariates=”WEIGHT”, parameters=”V”, settings=list(spline=T))

plotParametersVsCovariates(covariates=”WEIGHT”, parameters=”V”,

settings=list(indivEstimate=”simulated”))

# Random effects

plotParametersVsCovariates(covariates=”SEX”, parameters=”V”,

settings=list(parameterType=”randomEffect”))

plotParametersVsCovariates(covariates=”WEIGHT”, parameters=”V”,

settings=list(indivEstimate=”simulated”, parameterType=”randomEffect”))

# Stratification

plotParametersVsCovariates(covariates=”SEX”, parameters=”ka”,

stratify=list(filter=list(name=”WEIGHT”, interval=c(0, 75))))

plotParametersVsCovariates(covariates=”WEIGHT”, parameters=”ka”,

stratify=list(splitGroup=list(name=”SEX”)))

plotParametersVsCovariates(covariates=”SEX”, parameters=”Cl”,

stratify=list(colorGroup=list(name=”WEIGHT”, breaks=75)))

plotParametersVsCovariates(covariates=”WEIGHT”, parameters=”V”,

stratify=list(colorGroup=list(name=”SEX”)))

plotParametersVsCovariates(covariates=”WEIGHT”, parameters=”V”,

stratify = list(colorGroup = list(list(name = “SEX”),

list(name=”WEIGHT”, breaks=70))))

# pre process dataset

data <- getChartsData(plotName=”plotParametersVsCovariates”,

computeSettings=list(indivEstimate=”simulated”))

plotParametersVsCovariates(data=data)

# multiple plots

plotParametersVsCovariates()

plotParametersVsCovariates(covariates=”WEIGHT”)

plotParametersVsCovariates(settings=list(indivEstimate=”simulated”))

plotParametersVsCovariates(settings=list(parameterType=”randomEffect”))

plotParametersVsCovariates(settings=list(parameterType=”randomEffect”, indivEstimate=”simulated”))

plotParametersVsCovariates(stratify=list(colorGroup=list(name=”WEIGHT”, breaks=75)))

plotParametersVsCovariates(stratify=list(colorGroup=list(name=”SEX”)))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Correlations between random effect

Description

[Monolix] Correlations between random effect

Usage

plotRandomEffectsCorrelation(
  parametersRows = NULL,
  parametersColumns = NULL,
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

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

  • indivEstimate Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “simulated”).
  • variabilityLevel (bool) In case of IOV and if the conditional distribution is computedplot is displayed for
    one given level of variability (default NULL)
    If NULL, the variability level is ID + Occasions
    Run getVariabilityLevels() to see the available levels of variability
  • regressionLine (bool) If TRUE, Add regression line in scatterplots (default TRUE).
  • spline (bool) If TRUE, Add xpline in scatterplots (default FALSE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotRandomEffectsCorrelation”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotRandomEffectsCorrelation”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotRandomEffectsCorrelation()

plotRandomEffectsCorrelation(parametersRows = “ka”, parametersColumns = “V”,

settings = list(indivEstimate = “simulated”))

plotRandomEffectsCorrelation(parametersRows = “ka”, parametersColumns = “V”,

settings = list(spline = TRUE))

plotRandomEffectsCorrelation(parametersRows = c(“ka”, “V”))

# stratification

plotRandomEffectsCorrelation(parametersRows = “ka”, parametersColumns = “V”,

stratify = list(filter = list(name = “SEX”, cat = “M”)))

plotRandomEffectsCorrelation(parametersRows = “ka”, parametersColumns = “V”,

stratify = list(

colorGroup = list(name = “WEIGHT”, breaks = 75),

colors = c(“#46B4AF”, “#B4468A”)))

plotRandomEffectsCorrelation(parametersRows = “ka”, parametersColumns = “V”,

stratify = list(splitGroup = list(name = “SEX”))

plotRandomEffectsCorrelation(parametersRows = “ka”, parametersColumns = “V”,

stratify = list(splitGroup = list(list(name = “SEX”),

list(name=”WEIGHT”, breaks=70))))

# pre compute dataset

data <- getChartsData(plotName = “plotRandomEffectsCorrelation”,

computeSettings = list(indivEstimate = “simulated”))

plotRandomEffectsCorrelation(data = data)

plotRandomEffectsCorrelation(settings = list(indivEstimate = “mean”))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Distribution of the standardized random effects

Description

[Monolix] Distribution of the standardized random effects

Usage

plotStandardizedRandomEffectsDistribution(
  parameters = NULL,
  plot = "boxplot",
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

parameters vector of parameters to display.
(by default the first 4 computed parameters are displayed).
plot Type of plot: probability density distribution (“pdf”),
cumulative density distribution (“cdf”), boxplot (“boxplot”)
(default “boxplot”).
settings a list of optional plot settings:

  • indivEstimate Calculation of individual estimates: conditional mean (“mean”),
    conditional mode with EBE’s (“mode”), conditional distribution (“simulated”)
    (default “mode”).
  • variabilityLevel (string) In case of IOV and if the conditional distribution is computed plot is displayed for
    one given level of variability (default NULL)
    If NULL, the variability level is ID + Occasions
    Run getVariabilityLevels() to see the available levels of variability
  • empirical (bool) If TRUE, plot empirical density distribution(default TRUE).
    To define when plot is “pdf” or “cdf”
  • theoretical (bool) If TRUE, plot theoretical density distribution(default TRUE).
    To define when plot is “pdf” or “cdf”
  • median (bool) If TRUE, add median line (default TRUE).
    To define when plot is “boxplot”
  • quartile (bool) If TRUE, add quartile line (default TRUE).
    To define when plot is “boxplot”
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotStandardizedRandomEffectsDistribution”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotStandardizedRandomEffectsDistribution”, …))
If data not specified, charts data will be computed inside the function.

Value

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

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software=”monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

# Random effect distribution as boxplot

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”boxplot”)

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”boxplot”,

settings=list(indivEstimate=”mode”))

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”boxplot”,

settings=list(quartile=F))

# Random effect distribution as pdf

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”pdf”)

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”pdf”,

settings=list(empirical=F))

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”pdf”,

settings=list(theoretical=F))

# Random effect distribution as cdf

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”cdf”)

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”cdf”,

settings=list(indivEstimate=”simulated”))

plotStandardizedRandomEffectsDistribution(parameters=”ka”, plot=”cdf”,

settings=list(theoretical=F))

# stratification

plotStandardizedRandomEffectsDistribution(

stratify=list(filter=list(name=”WEIGHT”, interval=c(0, 75)))

)

plotStandardizedRandomEffectsDistribution(parameters=”Cl”,

stratify=list(splitGroup=list(name=”SEX”)))

colorGroup <- list(name=”WEIGHT”, breaks=c(75))

plotStandardizedRandomEffectsDistribution(

parameters=”Cl”, plot=”pdf”,

stratify=list(colorGroup=colorGroup, colors=c(“#46B4AF”, “#B4468A”))

)

plotStandardizedRandomEffectsDistribution(

parameters=”Cl”, plot=”cdf”,

stratify=list(colorGroup=colorGroup, colors=c(“#46B4AF”, “#B4468A”))

)

plotStandardizedRandomEffectsDistribution(

parameters=”Cl”, settings=list(plot=”boxplot”),

stratify=list(colorGroup=colorGroup, colors=c(“#46B4AF”, “#B4468A”))

)

data <- getChartsData(plotName=”plotStandardizedRandomEffectsDistribution”,

computeSettings=list(indivEstimate=”simulated”))

plotStandardizedRandomEffectsDistribution(data=data)

plotStandardizedRandomEffectsDistribution(parameters=c(“ka”, “Cl”))

plotStandardizedRandomEffectsDistribution(plot=”boxplot”)

plotStandardizedRandomEffectsDistribution(plot=”pdf”)

plotStandardizedRandomEffectsDistribution(plot=”cdf”)

plotStandardizedRandomEffectsDistribution(plot=”pdf”, settings=list(theoretical=F))

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot BLQ predictive checks

Description

[Monolix] Plot BLQ predictive checks

Usage

plotBlqPredictiveCheck(
  obsName = NULL,
  settings = list(),
  preferences = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
settings a list of optional plot settings:

  • level (int) level for prediction intervals computation (default 90).
  • nbPoints (int) Number of points for grid computation (default 200).
  • censoredInterval (c(double, double)) Censored interval c(min, max) for censored data.
    By default, the limit and the censored values are used.
  • empirical (bool) If TRUE Empirical data is displayed (default TRUE).
  • theoretical (bool) If TRUE theoretical data is displayed (default FALSE):
  • predInterval (bool) If TRUE Prediction intervalis displayed (default TRUE).
  • outlierAreas (bool) If TRUE Add red areas indicating empirical percentiles that are outside prediction intervals (default TRUE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) label on x axis (default “Time”).
  • ylab (string) label on y axis (default obsName).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotBlqPredictiveCheck”) to check available displays.
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotBlqPredictiveCheck”, …))
If data not specified, charts data will be computed inside the function.

Value

a ggplot2 object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

# continuous data

project <- file.path(getDemoPath(), “2.models_for_continuous_outcomes”,

“2.2.censored_data”, “censoring1_project.mlxtran”)

loadProject(project)

plotBlqPredictiveCheck(obsName = “Y”)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot Numerical predictive checks

Description

[Monolix] Plot Numerical predictive checks

Usage

plotNpc(
  obsName = NULL,
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
settings a list of optional settings:

  • level (int) level for prediction intervals computation (default 90).
  • nbPoints (int) Number of points for cdf grid computation (default 100).
  • useCensored (bool) Choose to use BLQ data (TRUE) or to ignore it (FALSE) to compute the VPC (default TRUE).
    For continuous data only.
  • censoring (string) BLQ data can be simulated (‘simulated’),
    or can be equal to the limit of quantification (‘loq’)
    (default ‘simulated’). For continuous data only.
  • empirical (bool) – If TRUE, Empirical data is displayed (default TRUE):
    empirical percentiles for continuous data; empirical probability for discrete data;
    empirical curve for event data
  • theoretical (bool) – If TRUE, Theoretical data is displayed (default FALSE).
    predicted percentiles for continuous data; theoretical probability for discrete data;
    empiricalCurve for event data
  • predInterval (bool) – If TRUE, Prediction interval is displayed (default TRUE).
  • outlierAreas (bool) -If TRUE Add red areas indicating empirical percentiles that are outside prediction intervals (default TRUE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) label on x axis (default “Time”).
  • ylab (string) label on y axis (default obsName).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotNpc”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values.
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter.
    • interval – in case of a continuous covariate, a list of filtering intervals.
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotNpc”, …))
If data not specified, charts data will be computed inside the function.

Value

a ggplot2 object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

# continuous data

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotNpc(obsName = “CONC”)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot distribution of the predictions

Description

Note that computation settings are not available for this connector in 2021 version:
Number of bands is set to 9 and Level is set to 90

Usage

plotPredictionDistribution(
  obsName = NULL,
  settings = list(),
  preferences = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
settings a list of optional settings

  • perc (bool) – If TRUE display 9 Bands for each percentile (default TRUE).
  • median (bool) – If TRUE display Median (default TRUE).
  • obs (bool) – If TRUE display observations as dots (default FALSE).
  • cens (bool) – If TRUE display censored observations as dots (default FALSE).
  • binLimits (bool) If TRUE display limits of bins (default FALSE).
    For discrete data only.
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) label on x axis (default “Time”).
  • ylab (string) label on y axis (default obsName).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotPredictionDistribution”) to check available displays.
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotPredictionDistribution”, …))
If data not specified, charts data will be computed inside the function.

Details

Note that stratification options are not available for this connector in 2021 version:

Value

a ggplot2 object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

# continuous data

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotPredictionDistribution()

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot Visual predictive checks

Description

[Monolix] Plot Visual predictive checks

Usage

plotVpc(
  obsName = NULL,
  eventPlot = "survivalFunction",
  settings = list(),
  preferences = list(),
  stratify = list(),
  data = NULL
)

Arguments

obsName (string) Name of the observation (in dataset header).
By default the first observation is considered.
eventPlot (string) Display Survival function (“survivalFunction”) or average number of event (“averageEventNumber)
(default “survivalFunction”).
For event data only.
settings a list of optional settings:

  • level (int) level for prediction intervals computation (default 90),
  • higherPercentile (int) Higher percentile for empirical and predicted percentiles computation (default 90).
    For continuous data only.
  • useCorrpred (bool) if TRUE, pcVPC are computed using Uppsala prediction correction (default FALSE).
    For continuous data only.
  • useCensored (bool) Choose to use BLQ data (TRUE) or to ignore it (FALSE) (default TRUE).
    For continuous data only.
  • censoring (string) BLQ data can be simulated (‘simulated’), or can be equal to the limit of quantification (‘loq’)
    (default ‘simulated’).
    For continuous data only.
  • timeAfterLastDose (bool) display vpc only after last dose (default FALSE)
    For data with dose information only.
  • nbDataPoints (int) Number of data point in event time grid (default 100)
    For event data only.
  • xBinsSettings a list of optional settings for time axis binning
    For continuous and discrete data only

    • criteria (string) Bining criteria, one of ‘equalwidth’, ‘equalsize’, or ‘leastsquare’ methods.
      (default leastsquare).
    • is.fixedNbBins (bool) If TRUE define a fixed number of bins, else define a range for automatic selection
      (default FALSE).
    • nbBins (int) Define a fixed number of bins (default 10).
    • binRange (vector(int, int)) Define a range for the number of bins (default c(5, 100)).
    • nbBinData (vector(int, int)) Define a range for the number of data points per bin (default c(10, 200)).
  • yBinsSettings a list of optional settings for y axis binning.
    For countable discrete data only

    • criteria (string) Bining criteria, one of ‘equalwidth’, ‘equalsize’, or ‘leastsquare’ methods.
      (default leastsquare).
    • is.fixedNbBins (bool) If TRUE define a fixed number of bins, else define a range for automatic selection
      (default TRUE).
    • nbBins (int) Define a fixed number of bins (default 10).
    • binRange (vector(int, int)) Define a range for the number of bins (default c(5, 100)).
    • nbBinData (vector(int, int)) Define a range for the number of data points per bin (default c(10, 200)).
  • obs (bool) – If TRUE, Observed data is displayed as dots (defaul FALSE).
  • cens (bool) – If TRUE, Censored data is displayed as dots (defaul FALSE).
  • empirical (bool) – If TRUE, Empirical data is displayed (default TRUE):
    empirical percentiles for continuous data; empirical probability for discrete data;
    empirical curve for event data
  • theoretical (bool) – If TRUE, Theoretical data is displayed (default FALSE).
    predicted percentiles for continuous data; theoretical probability for discrete data;
    empiricalCurve for event data
  • predInterval (bool) – If TRUE, Prediction interval is displayed (default TRUE).
  • linearInterpolation (bool) – If TRUE set piece wise display for prediction intervals,
    else show bins as rectangular (default TRUE).
  • outlierDots (bool) – If TRUE, Add red dots indicating empirical percentiles that are outside prediction intervals (default TRUE).
  • outlierAreas (bool) – If TRUE Add red areas indicating empirical percentiles that are outside prediction intervals (default TRUE).
  • binLimits (bool) – Add/remove vertical lines on the scatter plots to indicate the bins (default FALSE).
  • legend (bool) add (TRUE) / remove (FALSE) plot legend (default FALSE).
  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • xlog (bool) add (TRUE) / remove (FALSE) log scaling on x axis (default FALSE).
  • ylog (bool) add (TRUE) / remove (FALSE) log scaling on y axis (default FALSE).
  • xlab (string) label on x axis (default “Time”).
  • ylab (string) label on y axis (default obsName).
  • ncol (int) 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.
  • scales (string) Should scales be fixed (“fixed”),
    free (“free”, the default), or free in one dimension (“free_x”, “free_y”) (default “free”).
preferences (optional) preferences for plot display,
run getPlotPreferences(“plotVpc”) to check available displays.
stratify List with the stratification arguments

  • ids – List of ids to display (by default all ids are displayed).
  • splitGroup – Split plots by groups of covariates (by default no split is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • colorGroup – Color plots by groups of covariates (by default no color is applied).
    A list, or a list of list with fields:

    • name : The name of the covariate to use in grouping, or the name of the column id,
    • breaks : In case of a continuous covariate, a list of break values,
    • groups : [optional] In case of a categorical covariate, define groups of modalities.
  • filter – Filter data (by default no filtering is applied).
    A list, or a list of list with fields:

    • name – the name of the covariate to filter,
    • cat – in case of a categorical covariate, the name of the category to filter,
    • interval – in case of a continuous covariate, a list of filtering intervals.
  • colors – List of colors to use when colorGroup argument is defined
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotVpc”, …))
If data not specified, charts data will be computed inside the function.

Value

a ggplot2 object

See Also

getChartsData getPlotPreferences

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

# continuous data

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

data <- getChartsDataVpc()

p <- plotVpc(data = data, obsName = “CONC”,

settings = list(outlierDots = FALSE, grid = FALSE,

ylab = “Concentration”, xlab = “time (in hour)”))

# categorical data

project <- file.path(getDemoPath(), “3.models_for_noncontinuous_outcomes”,

“3.1.categorical_data_model”, “categorical1_project.mlxtran”)

loadProject(project)

data <- getChartsData(plotName = “plotVpc”)

p <- plotVpc(data = data, obsName = “level”,

settings = list(theoretical = TRUE, outlierDots = FALSE))

# countable data

project <- file.path(getDemoPath(), “3.models_for_noncontinuous_outcomes”,

“3.2.count_data_model”, “count1a_project.mlxtran”)

loadProject(project)

data <- getChartsData(plotName = “plotVpc”)

p <- plotVpc(data = data, obsName = “Y”)

# time to event data

project <- file.path(getDemoPath(), “3.models_for_noncontinuous_outcomes”,

“3.3.time_to_event_data_model”, “tte1_project.mlxtran”)

loadProject(project)

data <- getChartsData(plotName = “plotVpc”)

plotVpc(data = data, obsName = “Event”, eventPlot = “survivalFunction”)

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot Importance sampling convergence

Description

[Monolix] Plot Importance sampling convergence

Usage

plotImportanceSampling(settings = list(), data = NULL)

Arguments

settings a list of optional settings:

  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • fontsize (integer) Plot text font size.
data dataframe – Output of getChartsData
(getChartsData(“plotImportanceSampling”, …))
If data not specified, charts data will be computed inside the function.

Value

A ggplot object

See Also

getChartsData

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotImportanceSampling()

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot MCMC convergence

Description

[Monolix] Plot MCMC convergence

Usage

plotMCMC(settings = list(), data = NULL)

Arguments

settings a list of optional settings:

  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
data List of charts data as dataframe – Output of getChartsData
(getChartsData(“plotMCMC”, …))
If data not specified, charts data will be computed inside the function.

Value

A TableGrob object if multiple plots (output of grid.arrange)

See Also

getChartsData

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotMCMC()

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


[Monolix] Plot SAEM convergence

Description

[Monolix] Plot SAEM convergence

Usage

plotSaem(settings = list(), data = NULL)

Arguments

settings a list of optional settings:

  • grid (bool) add (TRUE) / remove (FALSE) plot grid (default TRUE).
  • ncol (int) number of columns when facet = TRUE (default 4).
  • fontsize (integer) Plot text font size.
data dataframe – Output of getChartsData
(getChartsData(“plotSaem”, …))
If data not specified, charts data will be computed inside the function.

Value

A TableGrob object if multiple plots (output of grid.arrange)

See Also

getChartsData

Click here to see examples

initializeLixoftConnectors(software = “monolix”)

project <- file.path(getDemoPath(), “1.creating_and_using_models”,

“1.1.libraries_of_models”, “theophylline_project.mlxtran”)

loadProject(project)

plotSaem()

## End(Not run)


Top of the page, PKanalix API, Monolix API, Simulx API.


Define Preferences to customize plots

Description

Define Preferences to customize plots

Usage

getPlotPreferences(plotName = NULL, update = NULL, ...)

Arguments

plotName (string) Name of the plot function.
if plotName is NULL, all preferences are returned
update list containing the plot elements to be updated.
... additional arguments – dataType for some plots

Details

This function creates a theme that customizes how a plot looks, i.e. legend, colors
fills, transparencies, linetypes an sizes, etc.
For each curve, list of available customizations:

  • color: color (when lines or points)
  • fill: color (when surfaces)
  • opacity: color transparency
  • radius: size of points
  • shape: shape of points
  • lineType: linetype
  • lineWidth: line size
  • legend: name of the legend (if NULL, no legend is displayed for the element)

Value

A list with theme specifiers

See Also

setPlotPreferences resetPlotPreferences

Click here to see examples

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)


Top of the page, PKanalix API, Monolix API, Simulx API.


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)


Top of the page, PKanalix API, Monolix API, Simulx API.


Set preferences to customize plots
When preferences are Set, the updated preferences will used in all the 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)


Top of the page, PKanalix API, Monolix API, Simulx API.