Correct. Thanks for the catch.
My guess is also that a -fillin- approach at most needs
some extra observations being added. This is explained in
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
Nick
[email protected]
Carole J. Wilson
> Fabrizio,
>
> I think the replace commands should read:
>
> replace countryn = `x' in l
> replace year = `y' in l
>
> (no double ==) in Nick's post.
>
> --Carole
>
> On 6/15/07, Nick Cox <[email protected]> wrote:
> > qui forval x = 1/28 {
> > forval y = 1975/2002 {
> > count if countryn == `x' & year == `y'
> > if r(N) == 0 {
> > set obs `= _N + 1'
> > replace countryn == `x' in l
> > replace year == `y' in l
> > }
> > }
> > }
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/