Learn R Programming

IndexNumber (version 1.1)

aggregated.index.number: Calculate an aggregate index number

Description

This function determines index numbers without weights for those cases in which there exist more than an only product (in chain or in serie)

Usage

aggregated.index.number(x, base, type, name,opt.plot=FALSE, opt.summary=FALSE)

Arguments

x

It is a matrix containing that magnitude to be studied. In each column, it contains the magnitud of a different product. Thus, we have nrow(x) values of a magnitud for ncol(x) products.

base

Chain of characters to indicate the type of index number. If we introduce serie, we compare each value with respect to the original one. Otherwise, if we introduce chain, we obtain the index serie in chain by comparing each value with the inmediately previous value.

type

Chain of characters to indicate the type of means among the different products. If we introduce aritmetic, we obtain the index number by averaging the individual values. If we introduce geometric, we obtain in each step the geometric mean of the values for the different products. If we choose harmonic, we obtain the harmonic mean index. If we write BDutot, we will obtain the Bradstreet-Dutot index.

name

Chain of characters to indicate the name of the variable under study.

opt.plot

Logical option to indicate if a graphical description of the index number along the different stages is required. It takes the value TRUE or FALSE.

opt.summary

Logical option to indicate if a statistical summary of the index number is required. It takes the value TRUE or FALSE.

Value

Summary

Statistical summary (optional) of the index number along the considered period.

Agg. index number

Table containing the values of the index number for the considered stages and the aggregate value.

Graphical

Graphical summary (optional) of the index number along the considered period.

References

Index Number (2008). In: The Concise Encyclopedia of Statistics. Springer, New York, NY. <doi:https://doi.org/10.1007/978-0-387-32833-1>

Examples

Run this code
# NOT RUN {
prices<-matrix(c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90),ncol=3)
aggregated.index.number(prices,"chain","geometric","Price",opt.plot=TRUE,opt.summary=TRUE)
# }

Run the code above in your browser using DataLab