paasche.index.number: Calculate the Paasche index number

Description Usage Arguments Value Author(s) References Examples

View source: R/paasche.index.number.R

Description

This function determines the Paasche index number for those cases in which there exist more than an only product.

Usage

1
paasche.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)

Arguments

x

Matrix that contains the magnitude(s) under study. In each column, it contains the magnitude of a different product considered. Thus, we have nrow(x) values of a magnitude for ncol(x) products.

y

Matrix that contains that magnitude used as weight. In each column, it contains another magnitude associated to each different product along the time. Thus, we have nrow(x) values of magnitudes for the set of ncol(x) products.

name

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

opt.plot

Logical option to indicate if a graphical descriptiony 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.

Author(s)

A. Saavedra-Nieves, P. Saavedra-Nieves

References

Paasche, H. (1874) Uber die Preisentwicklung der letzten Jahre nach den Hamburger Borsen-notirungen. Jahrb. Natl. Stat. 23, 168–178.

Examples

1
2
3
prices<-matrix(c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90),ncol=3)
weights<-matrix(c(1,1.5,0.8,1.1,1,0.9,0.7,0.8,0.6,1,1.1,0.9,1,1,0.9,1.1,0.6,0.8),ncol=3)
paasche.index.number(prices,weights,"Price",opt.plot=TRUE,opt.summary=TRUE)

Example output

 

Paasche index number

 

Summary

Min.=101.851851851852

Stage=1

Max.=119.693094629156

Stage=5

$Summary
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  101.9   104.2   107.3   108.9   111.7   119.7 

$`Agg. index number`
  Stages Price 1 Price 2 Price 3 Agg. index number
1      0      70      85      70          100.0000
2      1      75      75      75          101.8519
3      2      77      77      77          104.1765
4      3      77      87      77          107.2803
5      4      85      85      85          111.6788
6      5      90      90      90          119.6931

IndexNumber documentation built on March 15, 2021, 5:08 p.m.