Learn R Programming

IndexNumR (version 0.6.0)

yearOverYearIndexes: Estimate year-over-year indexes

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

yearOverYearIndexes(freq, indexFunction, indexArgs)

Value

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

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.

Examples

Run this code
argsList <- list(x = CES_sigma_2, pvar = "prices", qvar = "quantities", pervar = "time",
prodID = "prodID", indexMethod = "fisher", output = "chained")

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

Run the code above in your browser using DataLab