plotPredVsObs: Plot observed versus predicted histograms

View source: R/Plotting_with_ggplot.R

plotPredVsObsR Documentation

Plot observed versus predicted histograms

Description

Compares observed and predicted histograms (e.g. from WH.regression.two.components.predict), one panel for each individual.

Usage

plotPredVsObs(PRED, OBS, type = "HISTO", ncolu = 2)

Arguments

PRED

A MatH object with one column, the predicted histograms.

OBS

A MatH object with one column, the observed histograms.

type

The type of plot: "HISTO" (default, histograms), "CDF" (cumulative distribution functions) or "DENS" (kernel density approximations).

ncolu

The number of columns of panels (default 2).

Value

The plot is drawn on the current device and the ggplot object is returned invisibly.

See Also

plot_errors

Examples

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]
plotPredVsObs(PRED, OBS, "HISTO")

plotPredVsObs(PRED, OBS, "CDF")
plotPredVsObs(PRED, OBS, "DENS")


HistDAWass documentation built on Oct. 29, 2026, 5:07 p.m.