Statalist


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

st: RE: egen(cut)


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
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: [email protected] [mailto:[email protected]] On Behalf Of Katia Bobulova
Sent: Thursday, October 23, 2008 1:11 PM
To: [email protected]
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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index