Description Usage Arguments Details Author(s)
Function to generate lagged variables in a panel.
1 2 | lagPanel(idvar, timevar, value)
|
idvar |
vector of panel identifiers. |
timevar |
vector of time identifiers. |
value |
variable vector to be lagged. |
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.
Gabriele Rovigatti
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.