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]

Re: st: fillin not filling in -- Stata 12


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: fillin not filling in -- Stata 12
Date   Sun, 24 Jun 2012 07:36:38 +0100

-search fillin- points to

SJ-5-1  dm0011  . . . . . . . . . . . . . .  Stata tip 17: Filling in the gaps
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        Q1/05   SJ 5(1):135--136                                 (no commands)
        tips for using fillin to fill in gaps in a rectangular
        data structure

which is accessible at

http://www.stata-journal.com/sjpdf.html?articlenum=dm0011

See especially the second half.

Nick

On Sun, Jun 24, 2012 at 4:42 AM, Dorothy Bridges <[email protected]> wrote:
> Right, that's what I understood -- I just had a typo in my query (not
> helpful, I know).  My understanding is that, in my example, fillin
> would give me ten observations for each municipality, or twenty total.
>  This does not occur in my larger data set.  Any thoughts would be
> most appreciated.
>
> On Sat, Jun 23, 2012 at 7:41 PM, Steve Samuels <[email protected]> wrote:
>>
>>
>>
>> You are mistaken about what -fillin- does.  It only creates enough new observations to give you every combination of municipality, year, and month that are *currently* in the data.  In your example:
>>
>> 2 municipalities x 2 years x 5 months = 20
>>
>>
>> Steve
>> [email protected]
>>
>>
>> On Jun 23, 2012, at 10:16 PM, Dorothy Bridges wrote:
>>
>> My data are as follows:
>>
>> municipality     year     month
>> muni1             1990    1
>> muni1             1990    2
>> muni1             1991    5
>> muni2             1991    6
>> muni2             1991    7
>>
>> According to the documentation and to my prior experience with fillin,
>> "fillin municipality year month" should give me 50 observations (ten
>> for each municipality -- i.e., muni1 1990 1 / muni1 1990 2 / muni1
>> 1990 3 ... muni1 1991 6 muni1 1991 7).
>>
>> Unfortunately, this does not happen.  Some of the desired 50
>> observations appear, but many do not.
>>
>> (Of course, my actual data have close to one million observations, but
>> the structure is the same).
>>
>> The closest archive thread I can find is this one
>> http://www.stata.com/statalist/archive/2007-01/msg00891.html, which is
>> unresolved (as far as I can tell).

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