
Last chance! 50% off unlimited learning
Sale ends in
This function creates a plot of discrimination plots (overlay histograms). In the context of verification, this is often used to compare the distribution of event and no-event forecasts. This may be useful in comparing any set of observations. By default, boxplots of groups appear as upper marginal plots. These may be surpressed.
discrimination.plot(group.id, value, breaks = 11, main =
"Discrimination Plot", xlim = NULL, ylim = NULL, legend =
FALSE, leg.txt = paste("Model", sort(unique(group.id)) ), marginal = TRUE, cols =
seq(2, length(unique(group.id)) + 1), xlab = "Forecast", ... )
A vector identifying groups. A histogram is created for each unique value.
A vector of values corresponding to the group.id vector used to create the histograms
Number of breaks in the x-axis of the histogram. The range of values is taken to be the range of prediction values.
Title for plot.
Range of histogram - x axis - main plot coordinates.
Range of histogram - y axis - main plot coordinates.
Should there be a legend? Default = FALSE
Legend text. If FALSE or if a marginal plot is created, no legend is added.
A vector showing the colors to be used in the histograms and in the marginal boxplots
Should a boxplots be placed in the top margin? Defaults to TRUE
Label of the x-axis on the main plot.
Additional plotting options.
Matt Pocernich
# A sample forecast.
data(disc.dat)
discrimination.plot(disc.dat$group.id, disc.dat$frcst, main = "Default Plot")
discrimination.plot(disc.dat$group.id, disc.dat$frcst, main = "New Labels", cex = 1.2,
leg.txt = c("Low", "Med", "High" ) )
discrimination.plot(disc.dat$group.id, disc.dat$frcst, main = "Without Marginal Plots ",
marginal = FALSE)
Run the code above in your browser using DataLab