Statalist


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

st: how to add 23 in each row of a variable


From   "Fabian Brenner" <[email protected]>
To   [email protected]
Subject   st: how to add 23 in each row of a variable
Date   Mon, 15 Sep 2008 19:59:30 +0200

Hello,

how can I tell Stata to add 23 in each row of a variable in the dataset?

I do not know what I am doing wrong because it does not work like this:

local i=1
while `i'<_N {
  2. replace number[i]= number[`i'] + 23
  3. }

Thanks for your help.
Fabian

P.S. Thanks a lot to Neil for the help.



-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal f�r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
*
*   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