Package: piar 0.9.0.9002

piar: Price Index Aggregation

Most price indexes are made with a two-step procedure, where period-over-period elementary indexes are first calculated for a collection of elementary aggregates at each point in time, and then aggregated according to a price index aggregation structure. These indexes can then be chained together to form a time series that gives the evolution of prices with respect to a fixed base period. This package contains a collection of functions that revolve around this work flow, making it easy to build standard price indexes, and implement the methods described by Balk (2008, <doi:10.1017/CBO9780511720758>), von der Lippe (2007, <doi:10.3726/978-3-653-01120-3>), and the CPI manual (2020, <doi:10.5089/9781484354841.069>) for bilateral price indexes.

Authors:Steve Martin [aut, cre, cph]

piar_0.9.0.9002.tar.gz
piar_0.9.0.9002.zip(r-4.7)piar_0.9.0.9002.zip(r-4.6)piar_0.9.0.9002.zip(r-4.5)
piar_0.9.0.9002.tgz(r-4.6-any)piar_0.9.0.9002.tgz(r-4.5-any)
piar_0.9.0.9002.tar.gz(r-4.7-any)piar_0.9.0.9002.tar.gz(r-4.6-any)
piar_0.9.0.9002.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
piar/json (API)
NEWS

# Install 'piar' in R:
install.packages('piar', repos = c('https://marberts.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/marberts/piar/issues

Pkgdown/docs site:https://marberts.github.io

Datasets:

On CRAN:

Conda:

economicsinflationofficial-statisticsstatistics

7.38 score 5 stars 40 scripts 455 downloads 32 exports 3 dependencies

Last updated from:69acb6782c. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK134
source / vignettesOK181
linux-release-x86_64OK132
macos-release-arm64OK149
macos-oldrel-arm64OK169
windows-develOK95
windows-releaseOK88
windows-oldrelOK95
wasm-releaseOK108

Exports:aggregation_structureas_aggregation_structureas_indexcarry_backwardcarry_forwardchaincombine_classificationscontribcontrib<-contrib2DFelemental_indexelementary_indexexpand_classificationimpute_pricesinteract_classificationsis_aggregation_structureis_chainable_indexis_direct_indexis_indexntimeprice_relativerebaseset_contribset_contrib_from_indexset_levelsset_timeset_weightsshadow_pricesplit_classificationtime<-unchainweights<-

Dependencies:gpindexlatticeMatrix

Adjusting annual weights

Rendered fromadjust-weights.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2024-11-09

Aggregating across baskets

Rendered frommultiple-baskets.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-02-06
Started: 2024-10-27

Aggregating across dimensions

Rendered frommultiple-dimensions.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2024-10-27

Aggregating over subperiods

Rendered fromsubperiods.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-02-06
Started: 2025-01-11

Contributions

Rendered fromcontributions.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2024-10-27

Imputation

Rendered fromimputation.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-05-06
Started: 2024-10-27

Index-number formulas

Rendered fromindex-number-formulas.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2024-10-27

Making price indexes

Rendered frompiar.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2023-06-29

Matrix aggregation

Rendered frommatrix-aggregation.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2024-10-27

Multiple sources of data

Rendered frommultiple-data-sources.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2026-02-06
Started: 2024-10-27

Spatial price indexes

Rendered fromspatial-price-index.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2024-12-29
Started: 2024-12-29

Superlative aggregation

Rendered fromsuperlative-aggregation.Rmdusingknitr::rmarkdownon Jun 01 2026.

Last update: 2025-09-11
Started: 2024-10-27

Readme and manuals

Help Manual

Help pageTopics
Extract index values[.piar_index [<-.piar_index
Aggregate elementary price indexesaggregate.chainable_piar_index aggregate.direct_piar_index aggregate.piar_index
Make a price index aggregation structureaggregation_structure piar_aggregation_structure
Coerce to an aggregation structureas_aggregation_structure as_aggregation_structure.data.frame as_aggregation_structure.default as_aggregation_structure.matrix
Coerce to a price indexas_index as_index.chainable_piar_index as_index.data.frame as_index.default as_index.direct_piar_index as_index.matrix as_index.mts
Coerce an index into a tabular formas.data.frame.piar_index as.matrix.piar_index
Coerce an aggregation structure into a tabular formas.data.frame.piar_aggregation_structure as.matrix.piar_aggregation_structure
Coerce an index into a time seriesas.ts.piar_index
Chain and rebase a price indexchain chain.chainable_piar_index chain.default rebase rebase.default rebase.direct_piar_index unchain unchain.default unchain.direct_piar_index
Combine hierarchical classificationscombine_classifications
Extract percent-change contributionscontrib contrib2DF contrib<- set_contrib set_contrib_from_index
Cut an aggregation structurecut.piar_aggregation_structure
Make elementary/elemental price indexeselemental_index elementary_index elementary_index.data.frame elementary_index.default elementary_index.numeric
Expand a hierarchical classificationexpand_classification interact_classifications
Return the first/last parts of an indexhead.piar_index tail.piar_index
Impute missing pricescarry_backward carry_forward impute_prices impute_prices.data.frame impute_prices.default impute_prices.matrix impute_prices.numeric shadow_price
Test if an object is an aggregation structureis_aggregation_structure
Test if an object is a price indexis_chainable_index is_direct_index is_index
Missing values in a price indexanyNA.piar_index is.na.piar_index
Get the levels for an aggregation structurelevels.piar_aggregation_structure
Get the levels for a price indexlevels.piar_index levels<-.piar_index set_levels
Aggregate a price index over subperiodsmean.chainable_piar_index mean.direct_piar_index mean.piar_index
Merge price indexesmerge.chainable_piar_index merge.direct_piar_index merge.piar_index
Price index objectschainable_piar_index direct_piar_index piar_index
Price datafs_prices fs_weights ms_prices ms_weights price_data
Calculate period-over-period price relativesprice_relative price_relative.data.frame price_relative.default
Split a hierarchical classificationsplit_classification
Split an index into groupssplit.piar_index split<-.piar_index
Stack price indexesstack.chainable_piar_index stack.direct_piar_index stack.piar_index unstack.chainable_piar_index unstack.direct_piar_index
Get the time periods for a price indexend.piar_index ntime set_time start.piar_index time.piar_index time<- time<-.piar_index
Update an aggregation structureupdate.piar_aggregation_structure
Get the weights for an aggregation structureset_weights weights.piar_aggregation_structure weights<- weights<-.piar_aggregation_structure
Window a price indexwindow.piar_index window<-.piar_index