IndexNumR v0.1.3

0

Monthly downloads

0th

Percentile

Index Number Calculation

Computes bilateral and multilateral index numbers. It has support for several standard bilateral indices as well as the GEKS multilateral index number methods (see Ivancic, Diewert and Fox (2011) <doi:10.1016/j.jeconom.2010.09.003>) . It also supports updating of GEKS indexes using several splicing methods.

Readme

IndexNumR

Build Status

Codecov test coverage

Rdoc

An R package for computation of index numbers

IndexNumR provides a set of functions for computing various bilateral and multilateral indices. It is designed to compute price or quantity indices over time. Bilateral indices include Laspeyres, Paasche, Fisher, Tornqvist, Sato-Vartia, Walsh and CES, as well as elementary indices Dutot, Carli, Harmonic mean, CSWD and Jevons. All of these bilateral indices can be computed as period-on-period, fixed-base or chained.

Multilateral indices can be computed in the time series context using the GEKS methodology, and updating is provided via the window, movement or mean splice methods. The GEKS method is computed using either the Fisher or Tornqvist superlative index number methods.

The package also provides functions to compute measures of dissimilarity between time periods, which can be used to choose the linking period for chained indices.

To install the latest Github version of the package, you will first need devtools installed,

install.packages("devtools")

then use the following R commands,

devtools::install_github("grahamjwhite/IndexNumR")  
library(IndexNumR)

Or to include the vignette,

devtools::install_github("grahamjwhite/IndexNumR", build_vignettes = TRUE)  
library(IndexNumR)

Examples

To estimate a simple chained Laspeyres price index using the CES_sigma_2 dataset,

priceIndex(CES_sigma_2,pvar = "prices",qvar = "quantities",pervar = "time",prodID = "prodID", indexMethod = "laspeyres", output = "chained")

A GEKS index with mean splicing and an 11 period window is estimated as follows,

GEKSIndex(CES_sigma_2, pvar = "prices", qvar = "quantities", pervar = "time", prodID = "prodID", indexMethod = "tornqvist", window=11, splice = "mean")

More examples are contained in the package vignette.

vignette("indexnumr", package = "IndexNumR")

Functions in IndexNumR

Name Description
elasticity Computes the elasticity of substitution
valueDecomposition valueDecomposition
unitValues Aggregates prices to unit values and quantities to sums
quantityIndex Computes a bilateral quantity index
quantityIndicator Compute a quantity indicator
weekIndex Generate an index of weeks
values Compute values (price x quantity)
quarterIndex Generate an index of quarters
yearIndex Generate an index of years
relativeDissimilarity Computes measures of relative dissimilarity between all periods
CES_sigma_2 Dataset of prices and quantities on four products
monthIndex Generate an index of months
GEKSIndex Compute a GEKS multilateral index
mixScaleDissimilarity Computes mix, scale and absolute dissimilarity measures
evaluateMatched Evaluate product overlap between periods
maximumSimilarityLinks Finds periods to link using minimum dissimilarity.
GEKS_w GEKS_w
priceIndex Computes a bilateral price index
priceIndicator Calculate a price indicator
No Results!

Vignettes of IndexNumR

Name
indexnumr.Rmd
indexnumrbib.bib
No Results!

Last month downloads

Details

Type Package
License GPL-2
Encoding UTF-8
LazyData true
RoxygenNote 6.1.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2020-03-04 11:16:27 UTC; Graham
Repository CRAN
Date/Publication 2020-03-04 21:30:02 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/IndexNumR)](http://www.rdocumentation.org/packages/IndexNumR)