index.number.chain: Calculate an index number in chain

Description Usage Arguments Value Author(s) References Examples

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

Description

This function determines index numbers “in chain” for those cases with an only product.

Usage

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

Arguments

x

It is a vector containing that magnitude to be studied for a product. Thus, we have length(x) values of it.

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.

Index number

Table containing the values of the index number for the considered stages.

Graphical

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

Author(s)

A. Saavedra-Nieves, P. Saavedra-Nieves

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

1
2
prices<-c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90)
index.number.chain(prices,"Prices",opt.plot=TRUE,opt.summary=TRUE)

Example output

Index number in chain

Summary

Min.=77.7777777777778

Stage=12

Max.=112.987012987013

Stage=10

$Summary
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  77.78  100.00  102.67  101.87  107.14  112.99 

$`Index number`
   Stages Prices Index number
1       0     70    100.00000
2       1     75    107.14286
3       2     77    102.66667
4       3     77    100.00000
5       4     85    110.38961
6       5     90    105.88235
7       6     85     94.44444
8       7     75     88.23529
9       8     77    102.66667
10      9     87    112.98701
11     10     85     97.70115
12     11     90    105.88235
13     12     70     77.77778
14     13     75    107.14286
15     14     77    102.66667
16     15     77    100.00000
17     16     85    110.38961
18     17     90    105.88235

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