Skip to contents

The function returns a vector of lagged difference values using diff with initial padding

Usage

lag_diff(x, lag)

Arguments

x

vector or matrix of numeric values. In the case of a matrix, the rows indicate the time-varying observations.

lag

the lag value (numeric)