Hi guys,
I am trying to tabulate the frequencies (top 5) of a variable 'edate' for each value of another variable 'userid'. The following command:
would work if I added an if-clause, naming each observation of variable 'userid' manually. I have tried combining the groups command with a foreach loop:
but the output is total, while I need the output for each observation of 'userid'.
Simply using
does not help, as there are too many observations for this.
I would gladly appreciate any help.
Kind regards,
Petar
I am trying to tabulate the frequencies (top 5) of a variable 'edate' for each value of another variable 'userid'. The following command:
Code:
groups edate, order(h) select(5)
Code:
foreach x in userid{
groups edate, order(h) select(5)
}
Simply using
Code:
tab userid edate
I would gladly appreciate any help.
Kind regards,
Petar

Comment