eta_covariate | R Documentation |
Get a single graphic of ETA
versus continuous and / or categorical
covariates (eta_covariate()
) or the component plots as a list
that can be arranged by the user (eta_covariate_list()
).
eta_covariate(
df,
x,
y,
ncol = 2,
tag_levels = NULL,
byrow = NULL,
transpose = FALSE
)
eta_covariate_list(df, x, y, transpose = FALSE)
df |
a data frame to plot. |
x |
character |
y |
character |
ncol |
passed to |
tag_levels |
passed to |
byrow |
passed to |
transpose |
logical; if |
Pass ncol = NULL
or another non-numeric value to bypass arranging plots
coming from eta_covariate()
.
eta_covariate()
returns a list of plots arranged in graphics as a
patchwork
object using pm_grid()
. eta_covariate_list()
the same
plots, but unarranged as a list of lists.
When transpose
is FALSE
(default), plots in a single graphic are grouped
by the ETA
, and the names of the list reflect that name (e.g., ETA1
).
When transpose
is TRUE
, the graphics are grouped by column names passed
via x
and the names of the list reflect those covariate data names. See
Examples.
npde_covariate()
, cwres_covariate()
data <- pmplots_data_id()
etas <- c("ETA1//ETA-CL", "ETA2//ETA-V")
cont <- c("WT//Weight (kg)", "ALB//Albumin (mg/dL)")
cats <- c("RF//Renal function", "CPc//Child-Pugh")
eta_covariate(data, x = c(cont, cats), y = etas, tag_levels = "A")
eta_covariate(data, cont, y = etas)
eta_covariate(data, cont, y = etas, transpose = TRUE)
eta_covariate_list(data, x = cats, y = etas)
eta_covariate_list(data, x = cats, y = etas, transpose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.