Now I want to create a variable Y which has the same frequency structure
as "vname". The below piece of code works fine...
generate x=uniform()*100
.generate y=-8 if x<6.49
.replace y=1 if (x>6.49 & x<34.45)
.replace y=2 if (x>34.45 & x<64.73)
.replace y=3 if (x>64.73 & x<100)
...though I am convinced that it could be done more efficient than I
have done it. But that's not the point: my problem is that I have
inputted the cumulative frequencies of the TABULATE (i.e., 6.49, 34.45,
64.73) directly into the above commands. This is no good, for any change
of the cumulative frequencies would require changing of the whole code
by hand.
So, how does one bring the cumulative frequencies of a TABULATE in a
local macro, analogous to r(mean) or r(p50) in SUMMARY?
Many thanks!
Gijs
--
dr. Gijs Dekkers
Attach� Federal Planning Bureau
Kunstlaan 47-49
1000 Brussels, Belgium
++32/(0)2/5077413
fax 7373 [email protected], [email protected]
**********************************************************************
Disclaimer: This e-mail may contain confidential information
which is intended only for the use of the recipient(s) named above.
If you have received this communication in error, please
notify the sender immediately and delete this e-mail from
your system.
Please note that e-mail messages cannot be considered as official
information from the Federal Planning Bureau.
**********************************************************************
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/