yearOverYearIndexes: Estimate year-over-year indexes

Description Usage Arguments Value Examples

View source: R/groups.R

Description

Year-over-year indexes are indexes where the months or quarters of the year are split in separate datasets and an index estimated on each. Therefore, year-over-year indexes estimated on a dataset with five full years of observations at a monthly frequency will have 12 separate indexes, each with 5 observations.

Usage

1
yearOverYearIndexes(freq, indexFunction, indexArgs)

Arguments

freq

the frequency of the data. Either "monthly" or "quarterly".

indexFunction

the name of the function to use to calculate the index as a string. Available options are 'priceIndex', 'GEKSIndex', 'GKIndex', 'WTPDIndex'.

indexArgs

arguments for the price index function as a named list. All arguments must be named.

Value

a list of indexes with one element for each month or quarter

Examples

1
2
3
4
argsList <- list(x = CES_sigma_2, pvar = "prices", qvar = "quantities", pervar = "time",
prodID = "prodID", indexMethod = "fisher", output = "chained")

yearOverYearIndexes("quarterly", "priceIndex", argsList)

IndexNumR documentation built on Feb. 7, 2022, 5:09 p.m.