Description Usage Arguments Value Examples
prepares a panel dataset for lag operations. The lag function in R is simply "lag(var,numlags)". After calling xtset
, this lag function will work on the panel in the way you would expect.
1 | xtset(timevar, obsvar)
|
timevar |
the name of the variable to for the time dimension |
obsvar |
the name of the variable to use for the observation dimension |
returns NULL, invisibly
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.