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]

Re: st: Loop to replace values of a variable


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Loop to replace values of a variable
Date   Wed, 18 Dec 2013 14:47:59 +0100

On Wed, Dec 18, 2013 at 2:44 PM, emanuele mazzini
<[email protected]> wrote:
> What if the values I want to replace go from -2.5 to 2.15, still with
> a 0.1 interval? In this case I'd still need a loop, right?

Nope:
gen x = -2.6 + _n*.1

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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