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

st: The replace function


From   Leny Mathew <[email protected]>
To   [email protected]
Subject   st: The replace function
Date   Mon, 11 Jul 2005 08:27:59 -0400 (EDT)

Hi,
    I have a vector variable in which I want to replace the first three 
values by the fourth value; the fifth, sixth, seventh by the eight 
value; and so on till the end- the 960th value. This could be done with 
a loop, but the replace function in stata does not allow me to replace 
a specific observation in the vector. It allows me to replace the 
vector as a whole. Does any body know of a way in which the function 
can be made to replace specific values? Is there any other way of doing 
this?

Thank you,

Leny
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index