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]

st: Coding Question


From   john metcalfe <[email protected]>
To   statalist <[email protected]>
Subject   st: Coding Question
Date   Sun, 14 Aug 2011 15:00:08 +0200

Dear Statalist,
I have a matrix of serial measurements with some missing values as
below. I would like to write a simple code that counted each
individual as a ‘conversion’ (going from 0 to 1), a reversion (going
from 1 to 0), or both. Any ideas appreciated.
Best,
John



138. | 11020189         0         1         0         1         . |
163. | 11030107         0         1         1         1         . |
181. | 11030206         1         1         1         .         . |
182. | 11030207         0         0         0         .         . |
189. | 11030265         1         1         0         0         0 |
     |------------------------------------------------------------|
192. | 11040003         0         1         1         1         . |
202. | 11040079         1         0         1         0         . |
217. | 11040225         1         0         0         .         . |
226. | 11050079         0         1         1         1         . |
243. | 11050203         1         0         1         1         . |
     |------------------------------------------------------------|
282. | 11060278         1         0         1         0         . |
310. | 11070069         1         0         0         .         . |
325. | 11070195         1         0         0         0         . |
327. | 11070229         0         1         0         1         . |
329. | 11070245         1         0         0         0         . |

*
*   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/


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