| ![]() |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: Segmenting a dataset
From
"Nick Cox" <[email protected]>
To
<[email protected]>
Subject
RE: st: Segmenting a dataset
Date
Thu, 17 May 2007 22:27:30 +0100
Look up at the stars! This is easier with -ceil()-:
gen int group = ceil(_n / 30)
Nick
[email protected]
David Kantor
> In my response to "Segmenting a dataset", I wrote,
>
> gen int group = floor(_n / 30)
>
> That is just a bit off. It really ought to be
>
> gen int group = floor((_n-1) / 30)
*
* 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–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |