% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f_general.R
\name{resultant_index}
\alias{resultant_index}
\title{A general function to compute a resultatnt bilateral price index on the basis of partial price indices}
\usage{
resultant_index(w0 = c(), wt = c(), subindices = c(), aggr = "fisher")
}
\arguments{
\item{w0}{A vector of positive weights from the base period that sum to one.}

\item{wt}{A vector of positive weights from the current period that sum to one.}

\item{subindices}{A numeric vector of partial indices.}

\item{aggr}{The formula used for aggregating partial index results (available values are: "arithmetic", "geometric", "laspeyres", "paasche", "fisher", "tornqvist").}
}
\value{
This function returns the resultant bilateral price index based on partial price indices, the system of weights from the base and current periods (if needed), and taking into account the aggregation formula specified by the user. The user can apply the following formulas to aggregate partial indices: the unweighted arithmetic mean, the unweighted geometric mean, the Laspeyres index formula, the Paasche index formula, the Fisher index formula, and the Törnqvist index formula. The aggregation formula is selected using the \code{aggr} parameter.
}
\description{
This function returns the resultant price index based on partial price indices, the system of weights from the base and current periods, and taking into account the aggregation formula specified by the user.
}
\examples{
resultant_index(w0 = c(0.4, 0.4, 0.2), 
subindices = c(1.1, 0.95, 1.12), aggr = "laspeyres")
resultant_index(w0 = c(0.4, 0.4, 0.2), wt = c(0.35, 0.5, 0.15), 
subindices = c(1.1, 0.95, 1.12), aggr = "fisher")
}
