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)

    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 

Thank you,

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index