panel_lag {estprod} | R Documentation |
Panel data lag function
Description
This function aims create the lags of a specified variable from panel data.
Usage
panel_lag(x, id, time, lag = 1, verify = TRUE)
Arguments
x |
A vector, data.frame, tibble or matrix. |
id |
A character with the name of the indicator variable. |
time |
A character with the name of the time variable. |
lag |
Number of lags. |
verify |
Check if panel is sorted by id and time variables. |
Note
Based on Paul Schrimpf's lag function.
[Package estprod version 1.2 Index]