I want to create the lag of a variable with one caveat. If it is missing, I want to use the previous period's value etc. So it is the most frequent non-missing lag. Any ideas?
Related Posts with Lag of variable with condition of not being misssing
Sum observations in different lines into one (by ID)Hello everyone, I'm trying to add observations in different lines into one line by ID. Below is t…
Shifting all the points down in a graph, to include main effect for interaction termsHi All, My dataset resembles the following: -------------------- copy starting from the next line …
Matching cases and controls 1:5Hi, I would like to match cases and controls. I have got a variable saved as case where 1=case and …
Use local macro and mkdir to create multiple foldersHi all, I'm trying to run the following code to create a loop of creating multiple folders at once.…
Comparing data at two time pointsHi, I have asked participants a question at Time 1 and Time 2. Is there any coding that could tell m…
Subscribe to:
Post Comments (Atom)
0 Response to Lag of variable with condition of not being misssing
Post a Comment