Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | David Torres <torresd@umich.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | RE: st: Right to Left Column Cascade or Adjustment |
Date | Tue, 24 May 2011 14:10:07 -0400 |
Thanks. -- David Diego Torres, MA(Sociology) PhD Candidate in Sociology 2044 Population Studies Center University of Michigan Institute for Social Research Ann Arbor MI 48106-1248 Tel 734.763.4098 Fax 734.763.1428 torresd at umich dot edu Quoting Nick Cox <n.j.cox@durham.ac.uk>:
There is a fairly systematic discussion inSJ-9-1 pr0046 . . . . . . . . . . . . . . . . . . . Speaking Stata: Rowwise (help rowsort, rowranks if installed) . . . . . . . . . . . N. J. CoxQ1/09 SJ 9(1):137--157 shows how to exploit functions, egen functions, and Mata for working rowwise; rowsort and rowranks are introducedThere is (now) not much difference in effect between my -rowsort- and Jeff Arnold's -sortrows-; note that there is also -rowranks- as well.Nick n.j.cox@durham.ac.uk Scott Merryman You could use Jeffrey Arnold's -sortrows- (use -findit- to locate download). input col1 col2 col3 col4 col5 101 101 . . . . 111 333 . . . . . . 935 . . . 23 16 405 .295 . . end l sortrows, replace l On Tue, May 24, 2011 at 10:08 AM, David Torres <torresd@umich.edu> wrote:There's probably a proper name for the process I'd like to carry out.Say I have five columns of information with staggard cell inputs. How do I go about moving all the information in a subsequent column back through to the first column for which no information is missing on the row?I'd like to go from something like this: Col1 Col2 Col3 Col4 Col5 101 101 111 333 935 023 016 405 295 to something like this Col1 Col2 Col3 Col4 Col5 101 101 111 333 935 023 016 405 295* * 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/
* * 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/