IndexNumberTools
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.3%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: mserrano-ine
- Language: R
- Default Branch: main
- Homepage: https://mserrano-ine.github.io/IndexNumberTools/
- Size: 1.2 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created almost 2 years ago
· Last pushed over 1 year ago
https://github.com/mserrano-ine/IndexNumberTools/blob/main/
# IndexNumberTools
**IndexNumberTools** intends to ease the everyday work of users and
producers of index numbers by providing functionalities like
chain-linking, base shifting or computing pyp indices.
## Installation
``` r
# Install released version from CRAN
install.packages("IndexNumberTools")
```
## Getting started
Well work through an example using the [Spanish
GDP](https://ine.es/dynt3/inebase/en/index.htm?padre=11371&capsel=11371)
in current prices, which is preloaded as `gdp_current`, and the
chain-linked volume (index), `gdp_volume`.
We can easily re-reference the volume series with
`change_ref_year()`.[^1]
``` r
gdp_volume_2010 <- change_ref_year(gdp_volume, 2010)
```
#> Time Series:
#> Start = 2008
#> End = 2022
#> Frequency = 1
#> 2020 2010
#> 2008 104.90885 103.81798
#> 2009 100.95573 99.90596
#> 2010 101.05075 100.00000
#> 2011 100.40412 99.36010
#> 2012 97.52742 96.51331
#> 2013 96.13535 95.13571
#> 2014 97.59707 96.58224
#> 2015 101.56035 100.50430
#> 2016 104.52100 103.43417
#> 2017 107.54800 106.42969
#> 2018 110.12422 108.97913
#> 2019 112.28397 111.11642
#> 2020 100.00000 98.96018
#> 2021 106.68315 105.57383
#> 2022 113.27545 112.09758
We can also get the series at previous year prices from `gdp_volume`
with `get_pyp()`.[^2]
``` r
gdp_pyp <- get_pyp(gdp_volume)
```

Multiplying the volume series by the mean of the current prices series
at the reference year (2020), we obtain the GDP in (chain-linked)
constant prices.
``` r
ref_year_mean <- window(gdp_current,start = c(2020,1), end = c(2020,4)) |> mean()
gdp_constant <- ref_year_mean * gdp_volume / 100
```
By dividing the GDP in current prices by the GDP in constant prices, we
derive the chain-linked implicit deflator of the GDP.
``` r
gdp_deflator <- gdp_current / gdp_constant * 100
```
Using `get_v_index()` and chain-linking the result with
`get_chain_linked()`, we get the chain-linked value indices.
``` r
gdp_value <- get_v_index(gdp_current) |> get_chain_linked(2020)
```
Then, we can verify the identity $V = P\cdot Q$, that is, the value
index must equal the product of the price and volume indices.
``` r
dplyr::near(gdp_value, gdp_deflator * gdp_volume / 100) |> all()
#> [1] TRUE
```

[^1]: We show only a slice of the output.
[^2]: See the article Annual arguments for a detailed discussion.
Owner
- Login: mserrano-ine
- Kind: user
- Repositories: 1
- Profile: https://github.com/mserrano-ine
GitHub Events
Total
- Push event: 8
- Create event: 2
Last Year
- Push event: 8
- Create event: 2
Packages
- Total packages: 1
-
Total downloads:
- cran 157 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: IndexNumberTools
Working with Index Numbers
- Homepage: https://mserrano-ine.github.io/IndexNumberTools/
- Documentation: http://cran.r-project.org/web/packages/IndexNumberTools/IndexNumberTools.pdf
- License: GPL (≥ 3)
-
Latest release: 1.1
published over 1 year ago
Rankings
Dependent packages count: 27.1%
Dependent repos count: 33.4%
Average: 49.2%
Downloads: 87.0%
Maintainers (1)
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- TimeSeriesTools * imports
- methods * imports
- stats * imports