plotNpc
[Monolix] Plot Numerical predictive checks
Plot the numerical predictive checks.
Usage
plotNpc(
obsName = NULL,
settings = list(),
preferences = list(),
stratify = list()
)
Arguments
- obsName
(character) Name of the observation (in dataset header). By default the first observation is considered.
- settings
a list of optional settings:
level
(integer) level for prediction intervals computation (default 90).nbPoints
(integer) Number of points for cdf grid computation (default 100).useCensored
(logical) Choose to use BLQ data (TRUE) or to ignore it (FALSE) to compute the VPC (default TRUE). For continuous data only.censoring
(character) BLQ data can be simulated ('simulated'), or can be equal to the limit of quantification ('loq') (default 'simulated'). For continuous data only.empirical
(logical) - If TRUE, Empirical data is displayed (default TRUE): empirical percentiles for continuous data; empirical probability for discrete data; empirical curve for event datatheoretical
(logical) - If TRUE, median is displayed (default FALSE): median of predicted percentilespredInterval
(logical) - If TRUE, Prediction interval is displayed (default TRUE).outlierAreas
(logical) -If TRUE Add red areas indicating empirical percentiles that are outside prediction intervals (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 (default "Time").ylab
(character) label on y axis (default obsName).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.scales
(character) 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:
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(continuous) || list>(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.glist(c("study101"), c("study201","study202"))
)split
(vector) - Vector of covariates used to split (i.e facet) the plot (by default no split is applied). For instancec("FORM","AGE")
.filter
(list< list> >) - 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 ingroups
. For instance,list("FORM","ref")
using the category name for categorical covariates.
Value
a ggplot2 object
See also
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)
runPopulationParameterEstimation()
plotNpc(obsName = "CONC")
$body