cdf_plot {BioPred} | R Documentation |
CDF Plot for a biomarker
Description
Cumulative Distribution Function (CDF) plot for a biomarker.
Usage
cdf_plot(xvar, data, y.int = 5, xlim = NULL, xvar.display = xvar, group = NULL)
Arguments
xvar |
The biomarker name. |
data |
The dataset. |
y.int |
Increasement interval on the y. |
xlim |
cdf plot range for xvar, when NULL, c(min(x), max(x)) will be used. |
xvar.display |
Display name of the biomarker. |
group |
A separate CDF line will be plotted for each group. |
Value
A ggplot object representing the CDF inverse plot.
Examples
# Load a sample dataset
data <- data.frame(
biomarker = rnorm(100, mean = 50, sd = 10),
group = sample(c("Group A", "Group B"), 100, replace = TRUE)
)
# Basic CDF plot for a single biomarker without groups
cdf_plot(
xvar = "biomarker",
data = data,
y.int = 10,
xlim = c(30, 70),
xvar.display = "Biomarker Level"
)
# CDF plot for a biomarker with groups
cdf_plot(
xvar = "biomarker",
data = data,
y.int = 10,
xlim = c(30, 70),
xvar.display = "Biomarker Level",
group = "group"
)
[Package BioPred version 1.0.2 Index]