Description Usage Arguments Value Examples
The function turns long data into a list of data frames that can be used as input for the command gimmeSEM
.
1 | gimme_list(data, state_vars, id_var, min_Ti)
|
data |
The data in long format |
state_vars |
The state_variables (level 1) that should be extracted from the data set and kept for the list. Must not contain the ID-variable |
id_var |
The ID/group variable that identifies participants on level-2 |
min_Ti |
The minimum number of measurement occasions required for each participant Participants with less measurement occasions will be dropped |
Returns a list of data frames as required by gimmeSEM
. Each entry in the list is a data frame for one participant/group.
1 2 3 4 5 | ## simulate data
data_long <- data.frame(ID = sort(rep(letters[1:10], 3)),
var1 = sort(rep(1:10, 3)),
var2 = sort(rep(11:20, 3)))
gimme_list(data_long, state_vars = c("var1", "var2"), id_var = "ID", min_Ti = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.