tscslag: Lag a time-series cross-sectional variables

Description Usage Arguments Value Author(s)

Description

Lags (or leads) a variable in a time-series corss-sectional dataset.

Usage

1
	tscslag(dat, x, id, time, lagLength=1)

Arguments

dat

A data frame.

x

A string identifying variable to be lagged.

id

A string identifying the name of the cross-sectional identifier.

time

A string identifying the name of the time variable.

lagLength

The length of the lag, use negative values for leading variables.

Value

A vector giving the lagged values of x.

Author(s)

Dave Armstrong


davidaarmstrong/damisc_nodep documentation built on May 15, 2019, 6:25 p.m.