I would like to know how to split a local that is too long (for some purpose) into a couple of shorter locals? I guess there is some macro extended function, but the help of the macro extended functions is a bit opaque, I read it for more than half an hour, and still could not figure out how to do this.
The motivation for the question is from the task in this thread here:
https://www.statalist.org/forums/for...other-variable
I want to check whether any value of var1 appears anywhere in var2. So my solution is to :
Code:
. levelsof var2, local(second) separate(,) 28,41,42,547 . gen coincide = inlist(var1,`second')
So what are the macro extended functions relevant here, and how do I use them?
In short imagine that I have a local constituting of 5000 elements, and I want to split it in a couple of locals all shorter than 254 elements?
0 Response to How to split a local, into shorter locals?
Post a Comment