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]
st: recoding missing value on variable with nonmissing value on variable within groups
From
Erik Aadland <[email protected]>
To
<[email protected]>
Subject
st: recoding missing value on variable with nonmissing value on variable within groups
Date
Wed, 20 Jun 2012 10:45:51 +0000
Dear statalist.
I am trying to recode the missing values on "jury_id" in example below with the nonmissing values for jury_id by yearmonth.
Unfortunately, the "by" command is not allowed with the recode command.
yearmonth jury_id WANTED RESULT
1 1 1
1 1 1
1 1 1
1 . 1
2 2 2
2 2 2
2 2 2
2 2 2
3 2 2
3 . 2
3 . 2
4 3 3
4 3 3
Any input on this problem would be very much appreciated.
Regards,
Erik.
*
* 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/