<< carryover Tools for NSI data contrichution >>

Grocer >> Tools for NSI data > chained_laspeyres

chained_laspeyres

Calculates Laspeyred chained indexes

CALLING SEQUENCE

ind_agreg=chained_Laspeyres(indexes,weights,base)

PARAMETERS

Input

* indexes = a string matrix, collecting the names of the ts that will be aggregated, with high frequency

* weights = a string matrix, collecting the names of the ts of the corresponding weights, with low frequency

* base = a number, the base year of the series

Output

* ind_agreg = a ts, the result of the aggregation

DESCRIPTION

Performs the aggregation of monthly series that are Laspeyres-type price indices and are computed as annual chain-indices with weights changing each year.

EXAMPLE

// load the data on French CPI 
global GROCERDIR ;
load(GROCERDIR+'data\fra_cpi.dat')
// calculate the food CPI incdes as the aggregate of unprocessed food and processed food
fra_cpi_food2=chained_Laspeyres(['fra_cpi_unprocfood','fra_cpi_procfood'],...
['fra_cpi_w_unprocfood','fra_cpi_w_procfood'],2015)
// compare the result with the true index (note that because Insee pubslishes only rounded figures
// there amy be small differences between the 2 series)
write(%io(2),'error in % between the reconstructed and true food cpi')
disp(100*(fra_cpi_food2/fra_cpi_food-1))

AUTHOR

Éric Dubois 2022

Report an issue
<< carryover Tools for NSI data contrichution >>