Title: | Index Numbers in Social Sciences |
---|---|
Description: | We provide an R tool for teaching in Social Sciences. It allows the computation of index numbers. It is a measure of the evolution of a fixed magnitude for only a product of for several products. It is very useful in Social Sciences. Among others, we obtain simple index numbers (in chain or in serie), index numbers for not only a product or weighted index numbers as the Laspeyres index (Laspeyres, 1864), the Paasche index (Paasche, 1874) or the Fisher index (Lapedes, 1978). |
Authors: | Alejandro Saavedra-Nieves, Paula Saavedra-Nieves |
Maintainer: | Alejandro Saavedra-Nieves <[email protected]> |
License: | GPL-2 |
Version: | 1.3.2 |
Built: | 2024-10-31 22:09:37 UTC |
Source: | CRAN |
We provide an R tool for teaching in Social Sciences. It allows the computation of index numbers. It is a measure of the evolution of a fixed magnitude for only a product of for several products. It is very useful in Social Sciences. Among others, we obtain simple index numbers (in chain or in serie), index numbers for not only a product or weighted index numbers as the Laspeyres index (Laspeyres, 1864), the Paasche index (Paasche, 1874) or the Fisher index (Lapedes, 1978).
The DESCRIPTION file:
Package: | IndexNumber |
Type: | Package |
Title: | Index Numbers in Social Sciences |
Version: | 1.3.2 |
Date: | 2021-03-15 |
Author: | Alejandro Saavedra-Nieves, Paula Saavedra-Nieves |
Maintainer: | Alejandro Saavedra-Nieves <[email protected]> |
Description: | We provide an R tool for teaching in Social Sciences. It allows the computation of index numbers. It is a measure of the evolution of a fixed magnitude for only a product of for several products. It is very useful in Social Sciences. Among others, we obtain simple index numbers (in chain or in serie), index numbers for not only a product or weighted index numbers as the Laspeyres index (Laspeyres, 1864), the Paasche index (Paasche, 1874) or the Fisher index (Lapedes, 1978). |
License: | GPL-2 |
LazyData: | true |
RoxygenNote: | 7.0.2 |
NeedsCompilation: | no |
Packaged: | 2021-03-15 10:31:20 UTC; alexs |
Repository: | CRAN |
Date/Publication: | 2021-03-15 12:30:03 UTC |
Index of help topics:
ActivePeople Economically active people in Spain from 2002 to 2019. ECResources Combustibles and energy resources for the main home in Spain from 2006 to 2015. Food Food in Spain from 2006 to 2015. IndexNumber-package Index Numbers in Social Sciences Mortgages Mortgages constituted on urban properties in Spain from 2003 to 2018. aggregated.index.number Calculate an aggregate index number edgeworth.index.number Calculate the Edgeworth index number fisher.index.number Calculate the Fisher index number index.number.chain Calculate an index number in chain index.number.serie Calculate an index number in serie laspeyres.index.number Calculate the Laspeyres index number paasche.index.number Calculate the Paasche index number
Once we have defined a magnitude for a product (of several products), we can analyse how it (they) evolves along the time. Index Numbers model this effect in Social Science. In this sense, several approaches may be considered. We include in this package several options of analysing this problem.
Alejandro Saavedra-Nieves, Paula Saavedra-Nieves
Maintainer: Alejandro Saavedra-Nieves <[email protected]>
- (2004) Consumer Price Index Manual: Theory and Practice. ILO, IMF. CPI Manual OECD, UN, Eurostat, and The World Bank by ILO, Geneva.
Index Number (2008) In: The Concise Encyclopedia of Statistics. Springer, New York, NY. <doi:https://doi.org/10.1007/978-0-387-32833-1>.
Laspeyres, E. (1871) Die Berechnung einer mittleren Waarenpreissteigerung. Jahrb. Natl. Stat. 16, 296–314.
Paasche, H. (1874) Uber die Preisentwicklung der letzten Jahre nach den Hamburger Borsen-notirungen. Jahrb. Natl. Stat. 23, 168–178.
prices<-c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90) index.number.serie(prices,name="Prices",opt.plot=TRUE,opt.summary=TRUE)
prices<-c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90) index.number.serie(prices,name="Prices",opt.plot=TRUE,opt.summary=TRUE)
Number (thousands) of economically active women and men in Spain between 2002 and 2019
data(ActivePeople)
data(ActivePeople)
A data frame with columns:
A trimester (T1, T2, T3 and T4) between 2002 and 2019.
Number (thousands) of economically active women.
Number (thousands) of economically active men.
Spanish Statistical Office (INE), http://www.ine.es
## Not run: ActivePeople ## End(Not run)
## Not run: ActivePeople ## End(Not run)
This function determines index numbers without weights for those cases in which there exist more than an only product (in chain or in serie)
aggregated.index.number(x, base, type, name,opt.plot=FALSE, opt.summary=FALSE)
aggregated.index.number(x, base, type, name,opt.plot=FALSE, opt.summary=FALSE)
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 |
base |
Chain of characters that indicates the nature of the index number. If we introduce |
type |
Chain of characters to indicate the type of non-weighted index number to evaluate the evolution of a set of magnitudes (even for different products). By considering Otherwise, if we take |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
CPI Manual (2004). Consumer Price Index Manual: Theory and Practice. OECD, UN, Eurostat, and TheWorld Bank by ILO, Geneva.
Index Number (2008). In: The Concise Encyclopedia of Statistics. Springer, New York, NY. <doi:https://doi.org/10.1007/978-0-387-32833-1>
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)
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)
Unitary value (euros) and consumed amount (thousands of units) of combustibles and other energy resources for the main home in Spain from 2006 to 2015.
data(ECResources)
data(ECResources)
A data frame with columns:
Year between 2006 and 2015.
Unitary value of electricity (KWh).
Unitary value of natural gas (m3).
Unitary value of liquified gas (kilo).
Unitary value of liquified combustibles (l).
Unitary value of Solid combustibles(l).
Consumed (thousands of units) of electricity (KWh).
Consumed (thousands of units) of natural gas (m3).
Consumed (thousands of units) of liquified gas (kilo).
Consumed (thousands of units) of liquified combustibles (l).
Consumed (thousands of units) of solid combustibles (l).
Spanish Statistical Office (INE), http://www.ine.es
## Not run: ECResources ## End(Not run)
## Not run: ECResources ## End(Not run)
This function determines the Marshall-Edgeworth index number for those cases in which there exist more than an only product.
edgeworth.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
edgeworth.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
x |
Matrix that contains the magnitude(s) under study. In each column, it contains the magnitude of a different product considered. Thus, we have |
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 |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
Edgeworth, F. (1887) Measurement of change in value of money i. First Memorandum presented to the British Association for the Advancement of Science. Reprinted in his Papers Relating to Political Economy, 1, 198–259.
Marshall, A. (1887) Remedies for fluctuations of general prices. The Contemporary review, 1866-1900, 51, 355–375.
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) edgeworth.index.number(prices,weights,"Price",opt.plot=TRUE,opt.summary=TRUE)
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) edgeworth.index.number(prices,weights,"Price",opt.plot=TRUE,opt.summary=TRUE)
This function determines the Fisher index number for those cases in which there exist more than an only product.
fisher.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
fisher.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
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 |
y |
It is a matrix containing that magnitude used as weight. In each column, it contains another magnitud of the different products along the time. Thus, we have |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
Fisher, I. (1922) The making of index numbers: a study of their varieties, tests, and reliability, volume 1. Houghton Mifflin.
Lapedes, Daniel N. (1978) Dictionary of Physics and Mathematics. McGrow–Hill. p. 367. ISBN 0-07-045480-9.
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) fisher.index.number(prices,weights,name="Price",opt.plot=TRUE,opt.summary=TRUE)
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) fisher.index.number(prices,weights,name="Price",opt.plot=TRUE,opt.summary=TRUE)
Unitary value (euros) and consumed amount (thousands of units) of food in Spain from 2006 to 2015.
data(Food)
data(Food)
A data frame with columns:
Year from 2006 and 2015.
Unitary value of rice (kilo).
Unitary value of bread (kilo).
Unitary value of pork meat (kilo).
Unitary value of fish (kilo).
Unitary value of whole milk (l).
Unitary value of eggs (unit).
Unitary value of olive oil (l).
Unitary value of apples (kilo).
Unitary value of dried fruit and nuts (kilo).
Unitary value value of green vegetables (kilo).
Unitary value value of potatoes (kilo)
Unitary value value of sugar (kilo)
Unitary value value of chocolate (kilo)
Unitary value value of coffee (l).
Unitary value value of mineral water (l).
Unitary value value of wine (l).
Unitary value value of beer (l).
Total amount (thousands of units) of consumed rice (kilo).
Total amount (thousands of units) of consumed bread (kilo).
Total amount (thousands of units) of consumed pork meat (kilo).
Total amount (thousands of units) of consumed fish (kilo).
Total amount (thousands of units) of consumed whole milk (l).
Total amount (thousands of units) of consumed eggs (unit).
Total amount (thousands of units) of consumed olive oil (l).
Total amount (thousands of units) of consumed apples (kilo).
Total amount (thousands of units) of consumed dried fruit and nuts (kilo).
Total amount (thousands of units) of consumed green vegetables (kilo).
Total amount (thousands of units) of consumed potatoes (kilo)
Total amount (thousands of units) of consumed sugar (kilo)
Total amount (thousands of units) of consumed chocolate (kilo)
Total amount (thousands of units) of consumed coffee (l).
Total amount (thousands of units) of consumed mineral water (l).
Total amount (thousands of units) of consumed wine (l).
Total amount (thousands of units) of consumed beer (l).
Spanish Statistical Office (INE), http://www.ine.es
## Not run: Food ## End(Not run)
## Not run: Food ## End(Not run)
This function determines index numbers “in chain” for those cases with an only product.
index.number.chain(x, name, opt.plot = FALSE, opt.summary = FALSE)
index.number.chain(x, name, opt.plot = FALSE, opt.summary = FALSE)
x |
It is a vector containing that magnitude to be studied for a product. Thus, we have |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
Index Number (2008) In: The Concise Encyclopedia of Statistics. Springer, New York, NY. <doi:https://doi.org/10.1007/978-0-387-32833-1>.
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)
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)
This function determines index numbers “in serie” for those cases with an only product.
index.number.serie(x, name, opt.plot = FALSE, opt.summary = FALSE)
index.number.serie(x, name, opt.plot = FALSE, opt.summary = FALSE)
x |
It is a vector containing that magnitude to be studied for a product. Thus, we have |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
Index Number (2008). In: The Concise Encyclopedia of Statistics. Springer, New York, NY. <doi:https://doi.org/10.1007/978-0-387-32833-1>
prices<-c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90) index.number.serie(prices,"Prices",opt.plot=TRUE,opt.summary=TRUE)
prices<-c(70,75,77,77,85,90,85,75,77,87,85,90,70,75,77,77,85,90) index.number.serie(prices,"Prices",opt.plot=TRUE,opt.summary=TRUE)
This function determines the Laspeyres index number for those cases in which there exist more than an only product.
laspeyres.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
laspeyres.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
x |
Matrix that contains the magnitude(s) under study. In each column, it contains the magnitude of a different product considered. Thus, we have |
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 |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
Laspeyres, E. (1864) Hamburger Warenpreise 1850–1863 und die kalifornisch-australischen Geldentdeckung seit. Jahrb. Natl. Stat. 3, 81–118, 209–236.
Laspeyres, E. (1871) Die Berechnung einer mittleren Waarenpreissteigerung. Jahrb. Natl. Stat. 16, 296–314.
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) laspeyres.index.number(prices,weights,"Price",opt.plot=TRUE,opt.summary=TRUE)
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) laspeyres.index.number(prices,weights,"Price",opt.plot=TRUE,opt.summary=TRUE)
Number of mortgages constituted on urban properties and mortgages amounts (thousands of euros) from 2003 to 2018.
data(Mortgages)
data(Mortgages)
A data frame with columns:
Year from 2003 to 2018
Numbers of bank mortages.
Amount (thousands of euros) of bank mortages.
Numbers of savings bank mortages.
Amount (thousands of euros) of savings bank mortages.
Numbers of other entities mortages.
Amount (thousands of euros) of other entities mortages.
Spanish Statistical Office (INE), http://www.ine.es
## Not run: Mortgages ## End(Not run)
## Not run: Mortgages ## End(Not run)
This function determines the Paasche index number for those cases in which there exist more than an only product.
paasche.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
paasche.index.number(x, y, name, opt.plot = FALSE, opt.summary = FALSE)
x |
Matrix that contains the magnitude(s) under study. In each column, it contains the magnitude of a different product considered. Thus, we have |
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 |
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 |
opt.summary |
Logical option to indicate if a statistical summary of the index number is required. It takes the 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. |
A. Saavedra-Nieves, P. Saavedra-Nieves
Paasche, H. (1874) Uber die Preisentwicklung der letzten Jahre nach den Hamburger Borsen-notirungen. Jahrb. Natl. Stat. 23, 168–178.
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)
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)