Is there an alternative to egen, fill that can be used with if/in ?
I need to generate a pattern of repeating 1's and 0's with blocks of different size. I can do this by using egen, fill and providing an example of the pattern:
However, I need the sequence to start when a certain condition is met -if qualifier- which egen fill does not support.
I need to generate a pattern of repeating 1's and 0's with blocks of different size. I can do this by using egen, fill and providing an example of the pattern:
Code:
egen is_e1, fill(0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1)
Comment