data(precip.ensemble)
#Observations are in the column
obs<-precip.ensemble[,3]
#Forecast values of ensemble are in the column 4 to 54
eps<-precip.ensemble[,4:54]
#CRPS calculation
c<-crpsDecomposition(obs,eps)
#CRPS with alpha and beta
#Resampling indices
nObs<-length(obs)
i<-sample(seq(nObs),nObs,replace=TRUE)
crps2<-crpsFromAlphaBeta(c$alpha[i,],c$beta[i,],c$heaviside0[i],c$heavisideN[i])Run the code above in your browser using DataLab