Description Usage Arguments Value Examples
Function to compute lagged n variables in ESM data and add it to data
1 2 3 4 5 6 7 8 |
data |
data frame |
subjnr |
variable, indicating subjects |
level2 |
variable, indicating level 2 variable, e.g. days. Can be left empty. |
level1 |
variable, indicating level 1 variable, e.g. beeps. Must be specified. |
lagn |
number of lags |
varnames |
vector with the names of the variables for which lagged versions are computed |
data frame with lagged variables added, with suffix L1, L2, L3, respectively
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.