[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Replacing the value of a variable

From   Antoine Terracol <[email protected]>
To   [email protected]
Subject   Re: st: Replacing the value of a variable
Date   Thu, 14 Jan 2010 16:35:47 +0100

bysort subject (period) : gen firstcon=con[1]

[email protected] wrote:

for each given "subject" and for all 20 "period"s associated with the respective subject- I would like to fill the variable called "firstcon" with the value of another variable "con" from "period" 1 of the respective subject.

For example: if subject 3's "con" variable in "period" 1 is "17" then this subject's "firstcon" variable should be filled with "17", for all periods from 1 to 20, i.e., for all 20 rows.

How can I do this? Thank you very much for your help!

*   For searches and help try:

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