Library: | VaR |
See also: | VaRest VaRdiagtable VaRgrdiag |
Quantlet: | VaRdiagplot | |
Description: | produces calibration and discrimination plots which verify the validity of a probability forecasts. |
Usage: | VaRdiagplot(int,sig,real,g) | |
Input: | ||
int | m x 2 matrix containing intervals in the rows. | |
sig | n x 1 vector of predicted standard deviations (assume normality) | |
real | n x 1 vector of realizations. | |
g | scalar, number of grid points. |
library("VaR") x=read("kupfer") ; time series x=x[1:1001] y=diff(log(x)) ; returns sig=VaRest(y)[,2]/qfn(0.99) y=y[251:1000] VaRdiagplot((-0.01~0.01),sig,y,10)
2 displays: the first showing a frequency plot in the upper window and a calibration plot in the lower one of the first 1000 observations of the kupfer data and the second display shows the corresponding discrimination plot.