View source: R/PlotResidualPlot.R
plot_residual_plot | R Documentation |
Create a figure that plots the residuals of the data. These residuals are the difference between expected normal quantiles and observed quantiles.
plot_residual_plot(
x,
transformer,
centre_width = NULL,
show_original = TRUE,
use_alpha = TRUE,
use_absolute_deviation = TRUE,
ggtheme = NULL
)
x |
A vector with numeric values that should be transformed to normality. |
transformer |
A transformer object created using
|
centre_width |
A numeric value between 0.0 and 1.0 that describes the width of the centre of the data. Can be NULL. |
show_original |
Show residuals for original, untransformed, data in addition to transformed data. |
use_alpha |
Use transparency for points in case the data contains many instances. |
use_absolute_deviation |
Plot absolute deviation instead of residuals. |
ggtheme |
|
A ggplot2
plot object for a Q-Q plot.
x <- exp(stats::rnorm(1000))
transformer <- find_transformation_parameters(
x = x,
method = "box_cox"
)
if (rlang::is_installed("ggplot2")) {
plot_residual_plot(
x = x,
transformer = transformer
)
# Plot only central 80% of the data.
plot_residual_plot(
x = x,
transformer = transformer,
centre_width = 0.80,
show_original = FALSE
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.