\name{Reliability}
\alias{Reliability}
\title{
Forecast reliability as measured by the linear regression
of the reliability diagram 
}
\description{
The function regresses a linear regress through the conditional probabilities
in a reliability diagram. The regression is weighed by the number of
predictions that fall into each probability bin. The linear regression is 
addition forced to intercept with the climatological probability. The resulting
reliability is measured as the slope of the regression and a classification of
the slope into 5 reliability catagories. The catagories are defined on the 
basis of the uncertainty range of the slope determined by boot strapping. 

This measure of reliability is an alternative to the reliablity component 
of the Brier score and has been defined in Weisheimer A and Palmer TN.(2014). 
On the reliability of seasonal climate forecasts.  
J. R. Soc. Interface 11: 20131162. http://dx.doi.org/10.1098/rsif.2013.1162
}
\usage{
Reliability(ano_exp=ano_exp,ano_obs=ano_obs,quantile = TRUE,nbins=5,
   thr = c(2/3),nboot=1000)
}
\arguments{
  \item{ano_exp}{
Matrix of forecast anomalies with dimension of # ensemble members and
# start dates. 
  }
  \item{beta}{
Vector of observed anomalies with dimension of # start dates.
  }
  \item{quantile}{
Logical switch to define whether a quantile should be used a threshold to compute
the reliability
  }
  \item{nbins}{
Number of bins used to compute the conditional probabilities
  }
  \item{thr}{
Threshold defined as a quantile (if quantile=TRUE) or a physical threshold applied
to both model and observations
  }
  \item{nboot}{
Number of resamples drawn from the start dates with replacement
  }
}

\examples{
}
\author{
History:
1.0  -  2016-10  (O.Bellprat)  -  Original code
}
\keyword{reliability}
