Skip to contents

Calculate price indexes

Functions to make elemental and aggregated price indexes

elemental_index()
Make elemental price indexes
as_index()
Coerce to a price index
aggregate(<chainable_piar_index>) aggregate(<direct_piar_index>)
Aggregate elemental price indexes
mean(<chainable_piar_index>) mean(<direct_piar_index>)
Aggregate a price index over subperiods

Manipulate price indexes

Helpful functions for working with price indexes

chain() unchain() rebase()
Chain and rebase a price index
merge(<chainable_piar_index>) merge(<direct_piar_index>)
Merge price indexes
stack(<chainable_piar_index>) stack(<direct_piar_index>) unstack(<chainable_piar_index>) unstack(<direct_piar_index>)
Stack price indexes
`[`(<piar_index>) `[<-`(<piar_index>)
Extract and replace index values
window(<piar_index>) `window<-`(<piar_index>)
Index window
head(<piar_index>) tail(<piar_index>)
Return the first/last parts of an index
contrib()
Extract percent-change contributions
split(<piar_index>) `split<-`(<piar_index>)
Split an index into groups
levels(<piar_index>) `levels<-`(<piar_index>)
Get the levels for a price index
time(<piar_index>) `time<-`() start(<piar_index>) end(<piar_index>) ntime()
Get the time periods for a price index
as.data.frame(<piar_index>) as.matrix(<piar_index>)
Coerce an index into a tabular form
is.na(<piar_index>) anyNA(<piar_index>)
Missing values in a price index

Manipulate prices

Helpful functions for working with prices

shadow_price() carry_forward() carry_backwards()
Impute missing prices
price_relative()
Calculate period-over-period price relatives

Aggregation structure

Functions to make and work with price-index aggregation structures

aggregation_structure()
Make a price index aggregation structure
expand_classification() interact_classifications()
Expand a hierarchical classification
as_aggregation_structure()
Coerce to an aggregation structure
as.matrix(<piar_aggregation_structure>) as.data.frame(<piar_aggregation_structure>)
Coerce an aggregation structure into a tabular form
weights(<piar_aggregation_structure>) `weights<-`()
Get the weights for an aggregation structure
levels(<piar_aggregation_structure>)
Get the levels for an aggregation structure
update(<piar_aggregation_structure>)
Update an aggregation structure
is_aggregation_structure()
Test if an object is an aggregation structure

Index objects

The model used to represent price indexes

Sample data