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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: Adding observations to the beginning of a time-series or panel dataset


From   "Dimitriy V. Masterov" <dvmaster@gmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Adding observations to the beginning of a time-series or panel dataset
Date   Thu, 12 Aug 2010 16:02:37 -0400

I am trying to add additional time observations to the beginning of a
panel data set. I am really trying to replicate what -tsappend,
first()- would do if it existed.

Using tsappend works if you want to add data at the end, but not at
the beginning. To simplify things, tsappend1.dta is a time-series data
set that spans 1960m2 to 2000m1. The first tsappend works, while the
second does not:

#delimit;
set more off;
webuse tsappend1, clear;
tsset;

tsappend, last(2005m2) tsfmt(tm);
tsset;

tsappend, last(1955m2) tsfmt(tm);
tsset;

Any suggestions?

Dimitriy
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index