Stata: Using egen, anycount() when values vary for each observation
问题 Each observation in my data presents a player who follows some random pattern. Variables move1 up represent on which moves each player was active. I need to count the number of times each player was active: The data look as follows (with _count representing a variable that I would like to generate). The number of moves can also be different depending on simulation. +------------+------------+-------+-------+-------+-------+-------+-------+--------+ | simulation | playerlist | move1 | move2 |