View source: R/Plotting_with_ggplot.R
plotPredVsObs | R Documentation |
This function allows the representation of observed vs predicted histograms. It can be used as a tool for interpreting preditive methods (for exampe, the regression of histogrma data)
plotPredVsObs(PRED, OBS, type = "HISTO", ncolu = 2)
PRED |
a |
OBS |
a |
type |
a string. "HISTO" (default), if ones want to compare histograms |
ncolu |
number of columns in which is arranged the plot, default is 2. If you have a lot of data consider to choose higher values. |
A plot with compared histogram-valued data.
## do a regression
pars <- WH.regression.two.components(BLOOD, Yvar = 1, Xvars = c(2:3))
## predict data
PRED <- WH.regression.two.components.predict(data = BLOOD[, 2:3], parameters = pars)
## define observed data
## Not run:
OBS <- BLOOD[, 1]
plotPredVsObs(PRED, OBS, "HISTO")
plotPredVsObs(PRED, OBS, "CDF")
plotPredVsObs(PRED, OBS, "DENS")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.