Statalist The Stata Listserver


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

Re: st: Accumulation function


From   "Victor M. Zammit" <vmz@vol.net.mt>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Accumulation function
Date   Sat, 17 Mar 2007 08:47:27 +0100

I have just got into the list however i have sorted out the issue with the
following code
set more off

drop _all

set obs 100

gen x = invnorm(uniform())

replace x = 0 in 1

gen orig = x

local i = 1

while `i'<= 99 {

local e = `i'+1

replace x = x[`e']+x[`i'] in `e'

local i = `i'+1

}

I will go back to recent records to get that approach

thanks

Victor Zammit

----- Original Message ----- 
From: "Gary Longton" <glongton@fhcrc.org>
To: <statalist@hsphsun2.harvard.edu>
Sent: Saturday, March 17, 2007 12:46 AM
Subject: Re: st: Accumulation function


> Take a look at Michael Blasnik's reply earlier today  - in response to
your
> initial post of the same question.
>
> - GL
>
>
> Victor M. Zammit wrote:
> > Dear subscribers,
> >
> > I have variable A with the given observations and I would like to create
> > code to get variable Accum.I tried
> >
>
>   - snip -
>
> > Can I get any suggestions please
> >
> > Victor M. Zammit
> *
> *   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/
>

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