STATA commad "by V1: egen newvar=count(V1)": how to do it in SPSS?

furga

New Member
#1
Hello to all. On STATA the command by V1: egen V2 = count (V1) generates a new variable that contains the frequency of the different values of V1. To show you the result I'm attaching two images:

Img 1: frequency table of V1
stata_1.png

Img 2: Stata command and results
stata.png


What command should I use in SPSS to get the same result?
Thanks everyone for the help.
Andrea