resultant_index: A general function to compute a resultatnt bilateral price...

View source: R/f_general.R

resultant_indexR Documentation

A general function to compute a resultatnt bilateral price index on the basis of partial price indices

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.

Usage

resultant_index(w0 = c(), wt = c(), subindices = c(), aggr = "fisher")

Arguments

w0

A vector of positive weights from the base period that sum to one.

wt

A vector of positive weights from the current period that sum to one.

subindices

A numeric vector of partial indices.

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 aggr parameter.

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")

PriceIndices documentation built on April 7, 2026, 5:07 p.m.