For that matter, something like this should work
too.
. xtile groups = yhat3, nq(`= round(e(N)/100,1)')
If you feel you want to proceed step by step
instead, that is undoubtedly very sensible.
Nick
[email protected]
Ulrich Kohler
> in additon to what Friedrich Huebler said, also note that in
> Stata 8, the
> command sequence in question can be rewritten to
>
> . local groups = round(e(N)/100,1)
> . xtile groups = yhat3, nq(`groups')
>
> in Stata 8 upwards. Hence, you don't need the -pctile- line.
Friedrich Huebler
> > Try this:
> >
> > pctile quant = hut1, n(`groups')
> >
> > Note that the left and right single quotes are not the same.
> >
> > Friedrich Huebler
> >
> > --- Christian Beck <[email protected]> wrote:
> > > the above mentioned command line in a book by Kohler and Kreuter
> > > (written 2001) "Datenanalyse mit Stata" does not work in our
> > > Stata/SE 8.0.
> > >
> > > On our screen Stata says:
> > > --
> > > -> . pctile quant = hut1, n('groups')
> > > 1==0&1==0&`"'groups'"' invalid name
> > > r(198);
*
* 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/