% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/benchmark.R
\name{grp}
\alias{grp}
\title{Benchmarking following the Growth Rate Preservation Principle.}
\usage{
grp(
  s,
  t,
  objective = c("Forward", "Backward", "Symmetric", "Log"),
  conversion = c("Sum", "Average", "Last", "First", "UserDefined"),
  obsposition = 1L,
  eps = 1e-12,
  iter = 500L,
  dentoninitialization = TRUE
)
}
\arguments{
\item{s}{A preliminary series. It must be a \code{"ts"} object.}

\item{t}{The low-frequency aggregation constraint. It must be a \code{"ts"} object.}

\item{objective}{A character string specifying the objective function. The default is \code{"Forward"}. Other options are: \code{"Backward"}, \code{"Symmetric"} and \code{"Log"}. For additional information on this, see the package vignette.}

\item{conversion}{A character string specifying the conversion mode, typically \code{"Sum"} (the default) or \code{"Average"}. Other options are: \code{"Last"}, \code{"First"} and \code{"UserDefined"}.}

\item{obsposition}{An integer specifying the position of the observations of the low-frequency constraint within the benchmarked series (e.g. the 7th month of the year).
This argument is used only when \code{conversion = "UserDefined"}.}

\item{eps}{A numeric value specifying the convergence tolerance. The BFGS
algorithm proceeds until the reduction in the objective function is within
this tolerance (default is \code{1e-12}) or until the maximum number of iterations is reached.}

\item{iter}{An integer giving the maximum number of iterations allowed in the BFGS algorithm.
The default is \code{500}.}

\item{dentoninitialization}{Boolean. Indicates whether the series obtained
via the modified Denton PFD method is used as the starting values for the
GRP optimization procedure. The default is \code{TRUE}. If \code{FALSE}, the starting
values are derived directly from the aggregation constraint (e.g. \code{t/4} for
quarterly series with annual constraint and \code{conversion = "Sum"}).}
}
\value{
A \code{"ts"} object with the benchmarked series is returned.
}
\description{
GRP is a method which explicitly preserves the period-to-period growth rates
of the preliminary series. It corresponds to the method of Cauley and Trager
(1981), using the solution proposed by Di Fonzo and Marini (2011). BFGS is
used as line-search algorithm for the reduced unconstrained minimization
problem.
}
\examples{
\dontshow{if (rjd3toolkit::get_java_version() >= rjd3toolkit::minimal_java_version) withAutoprint(\{ # examplesIf}
data("qna_data")

Y <- ts(qna_data$B1G_Y_data[, "B1G_FF"], frequency = 1, start = c(2009, 1))
x <- denton(t = Y, nfreq = 4) + rnorm(n = length(Y) * 4, mean = 0, sd = 10)
grp(s = x, t = Y)
\dontshow{\}) # examplesIf}
}
\references{
Causey, B., and Trager, M.L. (1981). Derivation of Solution to
the Benchmarking Problem: Trend Revision. Unpublished research notes, U.S.
Census Bureau, Washington D.C. Available as an appendix in Bozik and Otto
(1988).

Di Fonzo, T., and Marini, M. (2011). A Newton's Method for Benchmarking
Time Series according to a Growth Rates Preservation Principle. \emph{IMF
WP/11/179}.

Daalmans, J., Di Fonzo, T., Mushkudiani, N. and Bikker, R. (2018). Growth
Rates Preservation (GRP) temporal benchmarking: Drawbacks and alternative
solutions. \emph{Statistics Canada}.
}
\seealso{
For more information, see the vignette:

\code{utils::browseVignettes()}, e.g. \code{browseVignettes(package = "rjd3bench")}
}
