Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Cummulative sum & dealing with time

From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: Cummulative sum & dealing with time
Date   Thu, 05 May 2005 09:18:35 -0400

for your first question, sound like you want the -sum- function (NOT the egen version); see -functions- in the manual or the help


kelly johnson wrote:


how do i genrate a cummulative sum for a variable. eg. my data looks like this

date time Var1

i want to create a new variable that is a running sum of Var1 (eg. the first obs is the same, the second obs= the first obs + the second obs, etc.).

also, what is the best way to deal with time? i have a date in the mm/dd/yy formate and the minites of the date in hh:mm format. what is the best way to format and use my time variable.


*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index