Say that I have this code:
Is it possible to speed up either of the final two lines using something like ftools or gtools? I know that ftools and gtools can speed up many things, but I couldn't figure out it it was possible to use them with "bys: gen" or "bys: keep" (or if there is some other solution).
Code:
sysuse auto2, clear expand 1000000 gen n = _n bys make (n): gen weight1 = weight[1] bys make: keep if _n==1
Comment