View source: R/Plotting_with_ggplot.R
| plot_errors | R Documentation |
Plots the differences between observed and predicted histograms (e.g. from
WH.regression.two.components.predict) and prints the root mean
squared error based on the L2 Wasserstein distance.
plot_errors(PRED, OBS, type = "HISTO_QUA", np = 200)
PRED |
A |
OBS |
A |
type |
The type of plot: |
np |
The number of points used to compute the differences (default 200). |
The root mean squared error, invisibly. The plot is drawn on the current device.
plotPredVsObs, WH.regression.GOF
pars <- WH.regression.two.components(BLOOD, Yvar = 1, Xvars = c(2:3))
PRED <- WH.regression.two.components.predict(data = BLOOD[, 2:3], parameters = pars)
OBS <- BLOOD[, 1]
plot_errors(PRED, OBS, "HISTO_QUA")
plot_errors(PRED, OBS, "HISTO_DEN")
plot_errors(PRED, OBS, "DENS_KDE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.