MonolixSuite in R
Auto Light Dark
Auto Light Dark

plotQQStandardizedRandomEffects()

QQ plot of the standardized random effects (empirical quantiles of the standardized eta'sversus the theoretical standard-normal quantiles), with an optional identity line and confidence band. Standardized random effects are N(0, 1), so points scattered closely along the identity line indicate normality. One subplot per parameter; supports stratification and visual customization.

Usage

R
plotQQStandardizedRandomEffects(parameters  = NULL,
                                settings    = list(),
                                stratify    = list(),
                                preferences = list()
                                )

Arguments

  • parameters (character) Base parameter names (e.g. c("ka", "Cl")). If NULL (default), all available parameters are used. Parameters without an estimated omega (no between-subject variability) are skipped with a message.

  • settings (list) Display and computation settings:

    • indivEstimate (character) Calculation of individual estimates: conditional mean ("mean", default), conditional mode ("mode"), or conditional distribution ("simulated").

    • identityLine (logical) Show the identity (y = x) line (default TRUE).

    • confidenceInterval (logical) Show the CI band (default TRUE).

    • legend (logical) Add (TRUE) the plot legend (default TRUE).

    • grid (logical) Add (TRUE) the plot grid (default TRUE).

    • level (numeric) CI level, e.g. 0.90 (default).

    • variabilityLevel (character) In case of IOV, which level to plot (default NULL = ID + Occasions).

    • footnote (logical) If TRUE, add a footnote below the plot (and legend) giving the Monolix project directory and the R script path, styled like the table footers (small, italic, left-aligned) (default FALSE).

    • ncol (integer) Number of columns in the facet layout (default 2).

  • stratify (list) Stratification arguments:

    • groups Custom group definitions. Each element is a list with name (covariate name) and definition (continuous: a vector of break values, e.g. c(35, 65); categorical: a list of category vectors, e.g. list(c("study101"), c("study201","study202"))).

    • split (character vector) Covariates used to facet the plot, e.g. c("FORM","AGE").

    • color (character vector) Covariates used for colouring, e.g. c("SEX").

    • colors (character vector) Colours to use, e.g. c("#2BB9DB","#DD6BD2"). Takes precedence over defaults.

    • mergedSplits (logical) When TRUE and split is used, split groups are shown on the same plot with different colours instead of separate subplots; the color argument is then ignored (default FALSE).

    • filter (list of pairs) Each pair is a covariate name and a vector of group indices (continuous) or category names (categorical) to keep, e.g. list(list("AGE", c(1,3)), list("FORM", "ref")).

    • individualSelection List with ids: character vector of individual ids to display, e.g. list(ids = c("101-01","101-02")).

  • preferences (list) Visual preferences; each element is a list of aesthetics for one plot component:

    • point Observed dots: color, size.

    • identityLine Identity (y = x) line: color, linewidth, label.

    • confidenceInterval Confidence-interval lines: color, linewidth, linetype, label.

Returns: A ggplot object.

Examples

Last updated: