lagPanel: Generate lagged input variables

Description Usage Arguments Details Author(s)

View source: R/auxFun.R

Description

Function to generate lagged variables in a panel.

Usage

1
2
    lagPanel(idvar, timevar, value)
  

Arguments

idvar

vector of panel identifiers.

timevar

vector of time identifiers.

value

variable vector to be lagged.

Details

lagPanel() accepts three inputs (the ID, the time and the variable to be lagged) and returns the vector of lagged variable. Lagged inputs with no correspondence - i.e., X_-1 - are returned as NA.

Author(s)

Gabriele Rovigatti


prodest documentation built on May 2, 2019, 8:34 a.m.