% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/412_elt_diagnostics_aaeaal_with_adj.R
\name{elt_diagnostics_aaeaal_with_adj}
\alias{elt_diagnostics_aaeaal_with_adj}
\title{Calculates AAE and AAL from an ELT}
\usage{
elt_diagnostics_aaeaal_with_adj(elt, adjustmentsbycatevent)
}
\arguments{
\item{elt}{A data frame containing the ELT.
The ELT must contain \code{mrate}, \code{mloss} and \code{cat} columns.}

\item{adjustmentsbycatevent}{A matrix with rate adjustments (cat 1-ncat, event)
An adjustment of 1 means no change.
Copes with any number of cats, set by the first dimension of this matrix.}
}
\value{
AAE and AAL.
}
\description{
Calculates AAE and AAL from an ELT,
taking into account an input matrix of stochastic parameter adjustments by cat and event.
It doesn't produce an adjusted ELT, just gives the AAE and AAL you would get.
It could, for instance, be used to test code that produces adjusted YLTs.
}
\details{
For historical reasons the adjustments are stored in a matrix by cat-event, not just by event,
which is a bit inefficient.
I could change that at some point.
}
\examples{
#
# create an elt
#
mrate=seq(0.1,0.5,0.1)
mloss=seq(100,500,100)
cat=c(1,1,1,2,2)
elt=data.frame(mrate,mloss,cat)
#
# make the rate adjustments (two sets, for comparison)
#
adjustmentsbycatevent1=matrix(1,7,5)
adjustmentsbycatevent2=matrix(2,7,5)
#
# calculate the AAE and AAL 3 ways
#
op0=elt_diagnostics_aaeaal(elt)
op1=elt_diagnostics_aaeaal_with_adj(elt,adjustmentsbycatevent1)
op2=elt_diagnostics_aaeaal_with_adj(elt,adjustmentsbycatevent2)
#
cat("no adjustments (from the basic elt_diagnostics routine, for comparison):\n")
cat(" AAE=",op0$AAE,"\n")
cat(" AAL=",op0$AAL,"\n")
cat("no adjustments (from this routine, but with adjustments all set to 1):\n")
cat(" AAE=",op1$AAE,"\n")
cat(" AAL=",op1$AAL,"\n")
cat("with adjustments (this routine, with some actual adjustments):\n")
cat(" AAE=",op2$AAE,"\n")
cat(" AAL=",op2$AAL,"\n")
}
\author{
Stephen Jewson \email{stephen.jewson@gmail.com}
}
