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
Change last 4 digits in String type How can I change last 4 digits of co_end_variable to finyear ? For the data below, for example, 01…
Mismathing data when summarizing a variableWhen I try to summarize data the information that the functio returns to me doesn't match with what …
How to create a variable representing the max length of consecutively same numbers in a row?I am trying to find a way to caculate the max length of consectively same numbers in each row . For …
In a loop, strtrim() won't work in some of my variablesHello everyone! I'm facing a little difficulty using the strtrim() command here. As always, I looked…
How can I multiply two category variables by another category variable to create a new variable? Hi All, I want to create a new variable which is (Age * Education levels). But the problem is that…
Subscribe to:
Post Comments (Atom)
0 Response to Lag of variable with condition of not being misssing
Post a Comment