I am using asdoc to create a crosstab for different variables within a loop. What I observe is that the result of the last combination gYear19 and gYear20 replaces all previous tables result. Am I doing something wrong? See code below
Thank you.
Code:
clear set obs 10000 forval a=1/20{ gen Year`a'=runiform()*100 egen gYear`a'=cut(Year`a'), at(0(10)100) label } forval a=2/20{ local b =`a'-1 asdoc tab gYear`b' gYear`a', row nofreq nokey label append }
Comment