Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Steven Archambault <archstevej@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: tsfill |
Date | Fri, 12 Apr 2013 20:37:30 -0600 |
Okay, I got it to work doing the -tsset- correctly. Sorry for wasting time and space on this list. On Fri, Apr 12, 2013 at 7:07 PM, Steven Archambault <archstevej@gmail.com> wrote: > I've noticed the tsset is interchangeable, at times. Anyhow, I thought > tfill would fill in the dates between 11sep2009 and 15sep2009 > (12sept2009, 13sep2009, and 14sep2009). I thought that is what the > help says, but maybe I read it wrong. How would I fill in those > missing dates? I need to do this to more easily merge another data set > (so I can generate an average of another variable, over the time > period). > > On Fri, Apr 12, 2013 at 5:12 PM, Nick Cox <njcoxstata@gmail.com> wrote: >> Your -tsset- is the wrong way round. You should specify the panel >> identifier first. >> >> But why did your command work even though it was the wrong way round? >> Going through your example, there was no expansion as far as -tsfill- >> is concerned you had nothing to fill in. That is, you specified >> >> 1. Four distinct numeric identifiers (that's fine). >> >> 2. For each panel, a panel of length one starting on day 1, namely 2 >> January 1960 (that's fine too). >> >> So, no gaps, and thus no expansion. >> >> -tsset- doesn't check the formats of the variables specified. That's >> at choice and not fundamental. >> >> Odd, but true. >> Nick >> njcoxstata@gmail.com >> >> >> On 12 April 2013 23:57, Steven Archambault <archstevej@gmail.com> wrote: >>> Hi all, >>> >>> I am unsure why the tsfill command is not working for me. >>> >>> tsset date id_sei >>> >>> list date id_sei >>> >>> date id_sei >>> 09sep2009 1 >>> 10sep2009 1 >>> 11sep2009 1 >>> 15sep2009 1 >>> >>> tsfill >>> >>> date id_sei >>> 09sep2009 1 >>> 10sep2009 1 >>> 11sep2009 1 >>> 15sep2009 1 >>> >>> Any advice would be appreciated! >>> * >>> * 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/ >> * >> * 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/ * * 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/