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

TSLAG

Lag Time Series


Description

This function lags the input time series by the specified number of time periods.

Usage

TSLAG(x = NULL, L = 1, avoidCompliance = FALSE, ...)

Arguments

x

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

L

Lag. Must be an integer, positive or negative.

avoidCompliance

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

...

Backward compatibility.

Value

This function returns a BIMETS time series built by lagging the input time series.

See Also

Examples

#DEFINE TS
	n=10
	ts1=TSERIES(n:1,START=c(2000,1),FREQ=1)
	ts1[5]=NA
	
	#print TSLAG
	TABIT(ts1,TSLAG(ts1,5))
	
	n=10
	ts1=TSERIES(n:1,START=c(2000,1),FREQ='D')
	ts1[5]=NA
	
	#print TSLAG
	TABIT(ts1,TSLAG(ts1,5))

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.