Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: nesting commands


From   "Tunga Kantarci" <tungakantarci@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: nesting commands
Date   Tue, 6 May 2008 20:36:36 +0200

Hello,

I would like to take a simple example for my quest:

Suppose I generate a variable and then have a histogram on the generated
variable:

gen ab=1-b
hist ab, disc freq


Is it possible to nest the gen command in the hist command:

hist (gen ab=a-b), disc freq

This is, by command, not possible but what would be the syntax for this
purpose?
I searched for nesting in stata but could not find really what I want to do.



*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index