Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: egen(cut)


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: egen(cut)
Date   Thu, 23 Oct 2008 13:29:38 +0200

-egen, cut()- takes a numlist for the -at()- option, so it must respect -h limits- for -nulist: 1,600 elements.

Try this (and observe where Stata`s complaints start):


************
sysuse auto, clear

egen newmpg=cut(mpg), at(12/41)
drop newmpg
egen newmpg=cut(mpg), at(12(0.1)41)
drop newmpg
egen newmpg=cut(mpg), at(12(0.01)41)
drop newmpg
************


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Katia Bobulova
Sent: Thursday, October 23, 2008 1:11 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: egen(cut)

Dear all,

I am using egen with cut to divide my time in intervals:

egen newtime=cut(time), at(17000,170500....)

I there a limit for at?

Because I have many intervals and it doesn't work, so I treid to split
in two and it works.

However, now I have a problem. How to add the observation of the two
variables(because I generate two newtime for different intervals) into
one variable?

Thanks a lot

Katia
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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