% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/validate.R
\name{gb_validate}
\alias{gb_validate}
\title{Lint a Green Book appraisal for common errors}
\usage{
gb_validate(appraisal)
}
\arguments{
\item{appraisal}{A \code{gb_appraisal} object.}
}
\value{
A \code{gb_validation} object with elements \code{pass}, \code{errors},
\code{warnings}, \code{info}, and \code{n_checks}.
}
\description{
Inspects a \code{gb_appraisal} for sign-convention errors, base-year
alignment, schedule plausibility, and other common authoring
mistakes. Returns a structured report classifying each check as
pass, warning, or error.
}
\details{
Checks performed:
\itemize{
\item Cashflow length matches \code{years} length
\item Schedule is one of the valid options
\item Base year is plausible (1900 to 2100)
\item Vintage matches a recognised Green Book edition
\item If \code{costs} and \code{benefits} are present (from \code{gb_appraise()}),
costs are non-negative and benefits are non-negative
\item NPV is finite (no NaN / Inf)
\item PV costs and PV benefits are consistent with NPV
}

Warnings flag suspicious patterns: missing base year, unusual
optimism bias values, METB outside 0 to 50 percent, very long
horizons (> 100 years).
}
\examples{
app <- gb_appraise(c(100, 0, 0, 0, 0), c(0, 30, 30, 30, 30))
gb_validate(app)
}
\seealso{
\code{\link[=gb_appraise]{gb_appraise()}}.

Other appraisal: 
\code{\link{gb_appraise}()},
\code{\link{gb_compare}()},
\code{\link{gb_economic_case}()},
\code{\link{gb_place_based}()},
\code{\link{gb_progression}()},
\code{\link{gb_risk_register}()},
\code{\link{gb_sensitivity_ob}()}
}
\concept{appraisal}
