lagPanel {prodest} | R Documentation |
Function to generate lagged variables in a panel.
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