In Mata, I need to do a series of operations on each of many groups within my dataset, ending with the creation of a variable that is constant within each group. From what I have read in the documentation I think this should be done with a series of st_subviews. As far as I can see, the 'selectvar' element of st_data/view/subview picks all non-zero elements. I suppose I could create a dummy for each group, and then loop over those columns for selectvar. But I'm wondering if there's any way to just move down group by group without creating all those dummies.
-
Login or Register
- Log in with
Comment