Welcome to the forum for MLwiN users. Feel free to post your question about MLwiN software here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!
As with other software you would just need to create a second, lagged version, of the variable of interest and enter this into the model. MLwiN provides a command (MLLAG - also available via Data Manipulation->Multilevel Data Manipulations) to help with the creation of this within each cluster, although you will still need to ensure that variable is sorted, all time occasions are present, etc.
What exactly do you mean with sorted? I sometimes have only 3 measurement occasions for a person and sometimes 5, is that problematic?
So if I understand correctly, I have to do the following:
Multilevel Data Manipulations
-> operation: lags
-> on blocks defined by: person identifier
-> add to action lost
-> execute
Or am I missing something here, because I did not sort the variables? I assumed they were because the day variable is coded as 1, 2, 3, 4, 5 for al participants.
Yes, that looks like the correct use of the dialogue box.
The thing that you need to watch out for is that the command is just using the value from the previous row within the cluster, so if the rows were in the order occasions 3, 2, 1, 4, 5 for example then it would not pick up the correct values to lag as it would be assuming 1, 2, 3, 4, 5. Because of this you would need to ensure that the data was sorted by occasions within person.
If you were missing a measurement, e.g. 1,2,4,5 then the third lagged value would be based on occasion 2 instead of 3 (which doesn't exist and should perhaps be missing). In that case you might consider expanding the data so that there were rows for each possible occasion with person. If you had 1, 2, 3 and were missing 4, 5 then the problem shouldn't occur.
I would suggest examining the new lagged variable after it is created to ensure that it matches your expectations.