Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Forvalues [was cut function]


From   Katia Bobulova <[email protected]>
To   [email protected]
Subject   st: Forvalues [was cut function]
Date   Tue, 3 Aug 2010 16:27:26 +0100

Dear all,

I am still trying to solve my problem to have equal time intervals for
each data.

This is what I have:

   Data            Time
03jan2000       93157
03jan2000       93201
03jan2000       93248
03jan2000       93305
03jan2000       93602
03jan2000       93805
03jan2000       94000

And this is what I want to obtain:

   Data            Time
03jan2000       93000
03jan2000       93100
03jan2000       93200
03jan2000       93200
03jan2000       93300
03jan2000       93400
03jan2000       93500
03jan2000       93600
03jan2000       93700
03jan2000       93800
03jan2000       93900
03jan2000       94000

I thought that a possibler solution would be to construct a variable
with all the time intervals for each data.

I tried to give Stata this command:

forval data: 03jan2000/24feb2000{
gen time2=93000 (1) 94000
}

The command doesn't work.

Do you know if this could a possible solution to my problem and if
yes, how to write the right code?

Thank you very much.

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index