View source: R/dependent_sample_vis.R
dependent_sample_vis | R Documentation |
Dependent sample scatter plot
dependent_sample_vis(
df,
x = names(df)[1],
y = names(df)[2],
test = "norm",
conf_level = 0.95,
height_multiplier = 1.5 * diff(range(df[, x], na.rm = TRUE)),
plot_mean = TRUE,
plot_unit_line = TRUE,
plot_projections = TRUE,
plot_differences = TRUE,
plot_ci = TRUE,
plot_ci_lines = FALSE,
plot_samp_dist = TRUE
)
df |
the data.frame containing the data. |
x |
the name of the column for the x-axis. |
y |
the name of the column for the y-axis. |
test |
whether to use the normal distribution ( |
conf_level |
the confidence level for the null hypothesis test. |
height_multiplier |
a multiplier applied to the sampling distribution to increase the height. |
plot_mean |
whether to plot a line for the mean difference. |
plot_unit_line |
whether to plot the line y = x. |
plot_projections |
whether to plot lines connecting the raw data points to a line perpendicular to the unit line representing the distribution of differences. |
plot_differences |
whether to plot points on aline perpendicular to the unit line representing the distribution of differences. |
plot_ci |
whether to plot a confidence interval. |
plot_ci_lines |
whether to plot to lines corresponding to the confidence interval. |
plot_samp_dist |
whether to plot the sampling distribution (normal or t depending
on the |
a ggplot2 expression.
data(blood_lead, package = 'granova')
dependent_sample_vis(
df = blood_lead,
test = 'norm', # or 't'
conf_level = 0.95,
plot_mean = TRUE,
plot_unit_line = TRUE,
plot_projections = TRUE,
plot_differences = TRUE,
plot_ci = TRUE,
plot_ci_lines = FALSE,
plot_samp_dist = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.