Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ANNUAL

Annual Time Series (Dis)Aggregation


Description

This function returns a yearly aggregated time series, by using as input a semiannual, quarterly, monthly or daily time series.

Usage

ANNUAL(x = NULL, fun = NULL, avoidCompliance = FALSE, ...)
YEARLY(x = NULL, fun = NULL, avoidCompliance = FALSE, ...)

Arguments

x

Input time series, that must satisfy the compliance control check defined in is.bimets.

fun

STOCK: the output value of a year is equal to the value of the input time series in the last period of the same year
NSTOCK: the output value of a year is equal to the value of the input time series in the last non-missing NA period of the same year
SUM: the output value of a year is equal to the sum of all the observations of the input time series in the same year
NSUM: the output value of a year is equal to the sum of all the non-missing NA observations of the input time series in the same year
AVE: the output value of a year is equal to the average of all the observations of the input time series in the same year
NAVE: the output value of a year is equal to the average of all the non-missing NA observations of the input time series in the same year

avoidCompliance

If TRUE, compliance control check of input time series will be skipped. See is.bimets

...

Backward compatibility.

Value

This function returns a yearly BIMETS time series.

See Also

Examples

#TS DAILY TO ANNUAL
	n=366
	ts1=TIMESERIES(0:n,START=c(2000,1),FREQ='D')
	ts1[10]=NA
	TABIT(ANNUAL(ts1,fun='NAVE'))
	
	#TS DAILY TO ANNUAL
	n=36
	ts1=TIMESERIES(0:n,START=c(2000,1),FREQ='M')
	ts1[10]=NA
	TABIT(YEARLY(ts1,fun='SUM'))

bimets

Time Series and Econometric Modeling

v1.5.3
GPL-3
Authors
Andrea Luciani [aut, cre], Roberto Stok [aut], Bank of Italy [cph]
Initial release
2021-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.