scat_cont_plot {BioPred} | R Documentation |
Scatter Plot for a Biomarker Associated with Continuous Outcome
Description
Generates a scatter plot for exploring the relationship between a continuous response variable and a biomarker variable.
Usage
scat_cont_plot(
yvar,
xvar,
data,
ybreaks = NULL,
xbreaks = NULL,
yvar.display = yvar,
xvar.display = xvar
)
Arguments
yvar |
Continuous response variable name. |
xvar |
biomarker name. |
data |
The dataset containing the variables. |
ybreaks |
Breaks on the y-axis. |
xbreaks |
Breaks on the x-axis. |
yvar.display |
Display name for the response variable. |
xvar.display |
Display name for the biomarker variable. |
Value
A list containing correlation coefficients, scatter plot, slope, and intercept.
Examples
data <- data.frame(
outcome = rnorm(100, mean = 10, sd = 2),
biomarker = rnorm(100, mean = 0, sd = 1)
)
# Generate a scatter plot with default axis breaks
scat_cont_plot(
yvar = "outcome",
xvar = "biomarker",
data = data,
yvar.display = "Continuous Outcome",
xvar.display = "Biomarker Level"
)
# Generate a scatter plot with specified axis breaks
scat_cont_plot(
yvar = "outcome",
xvar = "biomarker",
data = data,
ybreaks = seq(5, 15, by = 1),
xbreaks = seq(-2, 2, by = 0.5),
yvar.display = "Continuous Outcome",
xvar.display = "Biomarker Level"
)
[Package BioPred version 1.0.2 Index]