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 <alejandro.saavedra.nieves@gmail.com> |
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 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).
Details
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 <alejandro.saavedra.nieves@gmail.com> |
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 |
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.
Author(s)
Alejandro Saavedra-Nieves, Paula Saavedra-Nieves
Maintainer: Alejandro Saavedra-Nieves <alejandro.saavedra.nieves@gmail.com>
References
- (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.
Examples
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)
Economically active people in Spain from 2002 to 2019.
Description
Number (thousands) of economically active women and men in Spain between 2002 and 2019
Usage
data(ActivePeople)
Format
A data frame with columns:
- Time
A trimester (T1, T2, T3 and T4) between 2002 and 2019.
- TotalWomen
Number (thousands) of economically active women.
- TotalMen
Number (thousands) of economically active men.
Source
Spanish Statistical Office (INE), http://www.ine.es
Examples
## Not run:
ActivePeople
## End(Not run)
Combustibles and energy resources for the main home in Spain from 2006 to 2015.
Description
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.
Usage
data(ECResources)
Format
A data frame with columns:
- Time
Year between 2006 and 2015.
- ElectricityPrice
Unitary value of electricity (KWh).
- NaturalGasPrice
Unitary value of natural gas (m3).
- LiquifiedGasPrice
Unitary value of liquified gas (kilo).
- LiquifiedCombustiblesPrice
Unitary value of liquified combustibles (l).
- SolidCombustiblesPrice
Unitary value of Solid combustibles(l).
- ElectricityConsumed
Consumed (thousands of units) of electricity (KWh).
- NaturalGasConsumed
Consumed (thousands of units) of natural gas (m3).
- LiquifiedGasConsumed
Consumed (thousands of units) of liquified gas (kilo).
- LiquifiedCombustiblesConsumed
Consumed (thousands of units) of liquified combustibles (l).
- SolidCombustiblesConsumed
Consumed (thousands of units) of solid combustibles (l).
Source
Spanish Statistical Office (INE), http://www.ine.es
Examples
## Not run:
ECResources
## End(Not run)
Food in Spain from 2006 to 2015.
Description
Unitary value (euros) and consumed amount (thousands of units) of food in Spain from 2006 to 2015.
Usage
data(Food)
Format
A data frame with columns:
- Year
Year from 2006 and 2015.
- RicePrice
Unitary value of rice (kilo).
- BreadPrice
Unitary value of bread (kilo).
- PorkPrice
Unitary value of pork meat (kilo).
- FishPrice
Unitary value of fish (kilo).
- WholeMilkPrice
Unitary value of whole milk (l).
- EggsPrice
Unitary value of eggs (unit).
- OliveOilPrice
Unitary value of olive oil (l).
- ApplesPrice
Unitary value of apples (kilo).
- DriedFruitAndNutsPrice
Unitary value of dried fruit and nuts (kilo).
- GreenVegetablePrice
Unitary value value of green vegetables (kilo).
- PotatoesPrice
Unitary value value of potatoes (kilo)
- SugarPrice
Unitary value value of sugar (kilo)
- ChocolatePrice
Unitary value value of chocolate (kilo)
- CoffeePrice
Unitary value value of coffee (l).
- MineralWaterPrice
Unitary value value of mineral water (l).
- WinePrice
Unitary value value of wine (l).
- BeerPrice
Unitary value value of beer (l).
- RiceConsumed
Total amount (thousands of units) of consumed rice (kilo).
- BreadConsumed
Total amount (thousands of units) of consumed bread (kilo).
- PorkConsumed
Total amount (thousands of units) of consumed pork meat (kilo).
- FishConsumed
Total amount (thousands of units) of consumed fish (kilo).
- WholeMilkConsumed
Total amount (thousands of units) of consumed whole milk (l).
- EggsConsumed
Total amount (thousands of units) of consumed eggs (unit).
- OliveOilConsumed
Total amount (thousands of units) of consumed olive oil (l).
- ApplesConsumed
Total amount (thousands of units) of consumed apples (kilo).
- DriedFruitAndNutsConsumed
Total amount (thousands of units) of consumed dried fruit and nuts (kilo).
- GreenVegetableConsumed
Total amount (thousands of units) of consumed green vegetables (kilo).
- PotatoesConsumed
Total amount (thousands of units) of consumed potatoes (kilo)
- SugarConsumed
Total amount (thousands of units) of consumed sugar (kilo)
- ChocolateConsumed
Total amount (thousands of units) of consumed chocolate (kilo)
- CoffeeConsumed
Total amount (thousands of units) of consumed coffee (l).
- MineralWaterConsumed
Total amount (thousands of units) of consumed mineral water (l).
- WineConsumed
Total amount (thousands of units) of consumed wine (l).
- BeerConsumed
Total amount (thousands of units) of consumed beer (l).
Source
Spanish Statistical Office (INE), http://www.ine.es
Examples
## Not run:
Food
## End(Not run)
Mortgages constituted on urban properties in Spain from 2003 to 2018.
Description
Number of mortgages constituted on urban properties and mortgages amounts (thousands of euros) from 2003 to 2018.
Usage
data(Mortgages)
Format
A data frame with columns:
- Year
Year from 2003 to 2018
- Number.of.bank.mortgages
Numbers of bank mortages.
- Amount.of.bank.mortgages
Amount (thousands of euros) of bank mortages.
- Number.of.savings.bank.mortgages
Numbers of savings bank mortages.
- Amount.of.savings.bank.mortgages
Amount (thousands of euros) of savings bank mortages.
- Number.of.other.entities.mortgages
Numbers of other entities mortages.
- Amount.of.other.entities.mortgages
Amount (thousands of euros) of other entities mortages.
Source
Spanish Statistical Office (INE), http://www.ine.es
Examples
## Not run:
Mortgages
## End(Not run)
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 |
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 |
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
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>
Examples
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)
Calculate the Edgeworth index number
Description
This function determines the Marshall-Edgeworth index number for those cases in which there exist more than an only product.
Usage
edgeworth.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 |
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 |
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
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.
Examples
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)
Calculate the Fisher index number
Description
This function determines the Fisher index number for those cases in which there exist more than an only product.
Usage
fisher.index.number(x, y, 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 |
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 |
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
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.
Examples
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)
Calculate an index number in chain
Description
This function determines index numbers “in chain” for those cases with an only product.
Usage
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 |
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 |
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
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)
Calculate an index number in serie
Description
This function determines index numbers “in serie” for those cases with an only product.
Usage
index.number.serie(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 |
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 |
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
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)
Calculate the Laspeyres index number
Description
This function determines the Laspeyres index number for those cases in which there exist more than an only product.
Usage
laspeyres.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 |
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 |
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
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.
Examples
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)
Calculate the Paasche index number
Description
This function determines the Paasche index number for those cases in which there exist more than an only product.
Usage
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 |
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 |
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
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)