Statalist


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

st: RE: Cut command


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Cut command
Date   Mon, 17 Nov 2008 15:11:34 -0000

I guess this refers to the -cut()- function of -egen-. 

If so, I wouldn't use that for this purpose at all. I would use -floor()- or -ceil()- or -round()-, all of which are functions (not -egen- functions). 

Then I imagine that the problem you have would not arise at all. 

Nick 
[email protected] 

Katia Bobulova

I used the cut command to divide my time in 5-minute intervals.

Since there were too many intervals, I created  two new variables.
Newtime for the intervals of time since 14.30 and newtime2 for the rest.

Now I would like to have just one variable with the two newtime
For example:

Newtime                 mewtime2
14:00:00                 14:35:00
14:05:00                 14:40:00
14:10:00                       .
14:15:00                       .
14:20:00
14:25:00
14:30:00

now I would like to create a new variable with both times, in this way:

newtime3
14:00:00
14:05:00
14:10:00
14:15:00
14:20:00
14:25:00
14:30:00
14:35:00
14:40:00

How could I do this?

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