% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/025_bootstrap_ep_uncertainty.R
\name{bootstrap_ep_uncertainty}
\alias{bootstrap_ep_uncertainty}
\title{Bootstrap EP uncertainty}
\usage{
bootstrap_ep_uncertainty(losses, nbs, rps)
}
\arguments{
\item{losses}{A vector of losses}

\item{nbs}{The number of bootstrap resamples required}

\item{rps}{The return periods required}
}
\value{
A vector of standard deviations, one for each return level
}
\description{
Reads in a vector of annual losses, bootstraps, and calculates
the standard deviation of losses at a list of return levels
}
\details{
Can be used with \code{make_ep_by_sorting}, for the basic EP curve.
Obviously using more bootstrap samples is better, but slower.
}
\examples{
#
# 1 create losses
#
message("1. make losses")
losses=seq(1,1000,1)
#
# 2 set the return periods to look at
#
rps=c(2,3,4,5,10,20,50,100)
#
#
message("2. calculate the losses at the given return levels")
ep=make_ep_by_sorting(losses,rps)
print(ep)
#
message("3. calculate the sd of the uncertainty around those losses")
epsd=bootstrap_ep_uncertainty(losses,nbs=100,rps)
#
print(epsd)

}
\author{
Stephen Jewson \email{stephen.jewson@gmail.com}
}
