Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: carryforward updated


From   David Kantor <kantor.d@att.net>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: carryforward updated
Date   Mon, 18 Mar 2013 15:20:07 -0400

Hi everyone,
Thanks to Kit Baum, a new version of carryforward has been placed in SSC.

carryforward copies values from one observation to the next, replacing missing values with values from earlier observations. It is a simple operation that you can write easily in one line, but this facilitates the process, gives you some additional capability, and could make your code more readable.

As I mentioned once some time ago, it is not for imputation, but for filling in holes where it is expected that values should persist in their sequence, and where the dataset has holes due to the way it was constructed (e.g.,by merging). See the help file for a further explanation.

The new feature is that it accepts multiple variables. Also new is a "strict" option, affecting how it behaves in regards to excluded observations.

Several users, over the past several years, have asked for the multiple-variable capability. I thank them for the suggestion.
--David

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index