% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cea.R
\name{mb_qaly}
\alias{mb_qaly}
\title{Quality-adjusted life years (QALYs) accumulator}
\usage{
mb_qaly(utility, persons = 1, years = 1, discount_rate = NULL)
}
\arguments{
\item{utility}{Numeric scalar or vector in \verb{[0, 1]}. Utility
weight per year. Length 1 or \code{years}.}

\item{persons}{Numeric scalar. Number of persons. Default \code{1}.}

\item{years}{Numeric scalar. Number of years. Default \code{1}.}

\item{discount_rate}{Optional numeric in \verb{[0, 1)}. Annual
discount rate. If supplied, returns the discounted QALY total.
Default \code{NULL} (undiscounted).}
}
\value{
Numeric scalar. Total QALYs.
}
\description{
Sums utility-weighted years lived across persons, with optional
annual discounting.
}
\details{
Without discounting:
\deqn{\text{QALY} = \text{persons} \cdot \sum_{t=0}^{T-1} u_t}

With annual discount rate \code{r}:
\deqn{\text{QALY} = \text{persons} \cdot \sum_{t=0}^{T-1} \frac{u_t}{(1+r)^t}}

Compatible with \code{greenbook::gb_qaly}: when \code{utility} is scalar and
\code{discount_rate} is \code{NULL}, this returns \code{persons * utility * years}.
}
\examples{
mb_qaly(utility = 0.8, persons = 100, years = 5)
mb_qaly(utility = 0.8, persons = 100, years = 5, discount_rate = 0.035)
mb_qaly(utility = c(0.5, 0.7, 0.9), persons = 50)
}
\references{
Drummond, M. F. et al. (2015). Methods for the Economic
Evaluation of Health Care Programmes (4th ed.). OUP.

NICE (2022). Guide to the methods of technology appraisal.
}
\seealso{
\code{\link[=mb_daly]{mb_daly()}}, \code{\link[=mb_cea]{mb_cea()}}.

Other cost-effectiveness: 
\code{\link{mb_cea}()},
\code{\link{mb_ceac}()},
\code{\link{mb_daly}()},
\code{\link{mb_icer}()},
\code{\link{mb_inb}()}
}
\concept{cost-effectiveness}
