Dear Statalist members:
Suppose I have generated a dummy variable and then tabulated it using some sample weights,. I have a question: How do then store the results for the tabulated dummy variable in stata?
So suppose I ran this set of commands:
gen ALFL=0
replace ALFL=1 if origin==01 & destination==12
tab ALFL [iw=CORE09]
and wanted to retrieve the number generated by the tab command as a new variable, in the same file. Is there perhaps a way of accomplishing that, quickly? The reason I am asking is that I am generating a very large number of dummy variables, and I need to be very efficient at retrieving the results of my commands.
Any help would be greatly appreciated. Thank you very much.
Suppose I have generated a dummy variable and then tabulated it using some sample weights,. I have a question: How do then store the results for the tabulated dummy variable in stata?
So suppose I ran this set of commands:
gen ALFL=0
replace ALFL=1 if origin==01 & destination==12
tab ALFL [iw=CORE09]
and wanted to retrieve the number generated by the tab command as a new variable, in the same file. Is there perhaps a way of accomplishing that, quickly? The reason I am asking is that I am generating a very large number of dummy variables, and I need to be very efficient at retrieving the results of my commands.
Any help would be greatly appreciated. Thank you very much.
Comment