eta_vs_cov.Rd
Plot ETAs against a continuous or categorical covariate.
eta_vs_cov(
xpdb,
covariate,
mapping = NULL,
drop_fixed = FALSE,
group = "ID",
type = "bpls",
title = "ETAs vs @x | @run",
subtitle = "Based on @nind individuals",
caption = "@dir",
tag = NULL,
log = NULL,
guide = FALSE,
onlyfirst = TRUE,
facets,
.problem,
quiet,
...
)
An xpose database object.
Character; String of covariate name
List of aesthetics mappings to be used for the xpose plot
(e.g. point_color
).
Logical; Logic specifying whether ETAs having same value for the given covariate value should be removed from plotting
Grouping variable to be used for lines. ID
by default
Character; String setting the type of plot to be used. Must be 'b' for categorical covariates, one or a combination of 'p','l','s' for continuous covariates.
Character; Plot title. Use NULL
to remove.
Character; Plot subtitle. Use NULL
to remove.
Character; Page caption. Use NULL
to remove.
Character; Plot identification tag. Use NULL
to remove.
Character; String assigning logarithmic scale to axes, can be either '', 'x', y' or 'xy'.
Logical; Should the guide (e.g. reference distribution) be displayed.
Logical; Should the data be filtered to retain first value for each group/facet.
Either a character string to use facet_wrap_paginate
or a formula to use facet_grid_paginate
.
The $problem number to be used. By default returns the last estimation problem.
Logical, if FALSE
messages are printed to the console.
Any additional aesthetics to be passed on xplot_scatter
or xplot_box
.
Plots can be customized by mapping arguments to specific layers. The naming convention is layer_option where layer is one of the names defined in the list below and option is any option supported by this layer e.g. boxplot_fill = 'blue', etc.
box plot: options to geom_boxplot
point plot: options to geom_point
line plot: options to geom_line
smooth plot: options to geom_smooth
xscale: options to scale_x_continuous
or scale_x_log10
yscale: options to scale_y_continuous
or scale_y_log10
Michael Tomashevskiy
2022/12/07
eta_vs_cov(xpose::xpdb_ex_pk,
covariate = "WT",
type = "ps",
smooth_color = "red",
point_color = "green",
point_shape = "square",
point_alpha = .5,
point_size = 3
)
#> Using data from $prob no.1
#> Removing duplicated rows based on: ID
#> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'
eta_vs_cov(xpose::xpdb_ex_pk,
covariate = "AGE",
type = "ps",
facets = DOSE ~ variable,
guide = TRUE,
guide_color = "red",
guide_slope = 0,
guide_intercept = 0
)
#> Using data from $prob no.1
#> Removing duplicated rows based on: ID, DOSE
#> Tidying data by ID, SEX, MED1, MED2, DOSE ... and 23 more variables
#> `geom_smooth()` using formula = 'y ~ x'
#> `geom_smooth()` using formula = 'y ~ x'