Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: How to generate a cumulative sum


From   "Scott Merryman" <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How to generate a cumulative sum
Date   Fri, 26 Oct 2007 06:17:59 -0500

On 10/26/07, west--@libero.it <west--@libero.it> wrote:
> Dear Austin,
>
> this is the result (for the first firm only) of the short program you kindly wrote to me:
>
> . webuse grunfeld, clear
>
> . g k0=int(uniform()*1000) if year==1935
> (190 missing values generated)
>
> . g k=.
> (200 missing values generated)
>
> . bys c(y): replace k=cond(l.k<.,l.k*(1-`d'),k0)+i
> time-series operators not allowed
> r(101);
>

There needs to be a space between c and (y) and d has not been defined.

Scott
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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