Thanks a lot Philippe. That was the problem.
Jean Salvati
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: Thursday, August 19, 2004 4:49 AM
> To: [email protected]
> Subject: Re: st: Issue with xtivreg and unbalanced panel
>
>
>
>
>
>
> Good morning,
>
>
> >We estimated a panel data model using the two following procedures:
> >
> >(1)
> >
> >xtivreg y x1 x2 ( x3 = l.x3 )
> >
> >(2)
> >
> >by panelvar: generate x3lag=x3[_n-1]
> >xtivreg y x1 x2 ( x3 = x3lag )
> >
> >
> >The difference between (1) and (2) is that in (2) we generate a new
> >series for the lag of x3. We expected (1) and (2) to always
> produce the
> >same results, but that's the case only when the panel is balanced.
>
>
> I suspect the answer is quite simple.
>
> x3[_n-1] is conceputally different from l.x3.
>
> x3[_n-1] refers to the previous value of variable x3 *in your
> data*. no more no less. l.x3 refers to the value of x3 *at time t-1*.
>
> If you have panel data, sorted by group id and time, and use
>
> >by panelvar: generate x3lag=x3[_n-1]
>
> x3lag will contain the previous observation of x3.
>
> With unbalanced panel data, and if you have "holes" in the
> time-series of observations for some groups (use -xtdes- to
> check that), l.x3 will only be equal to x3lag if "year[_n-1]
> == year - 1" (here I assume year is your time variable), ie.
> if data in the previous year is not missing (in which case
> l.x3 is missing).
>
> For the same reason, l.x3 will not be identified as often as
> x3lag, so you must expect to have less observations in your
> regressions.
>
> >When the panel is unabalanced, it seems that (1) drops
> entire groups,
> >while (2) doesn't. (2) reports much higher numbers for groups and
> >observations than (1). In addition, we can find a number n such that
> >the following command (which explictly excludes several
> groups) gives
> >the same results as (1):
> >
> >(3)
> >xtivreg y x1 x2 ( x3 = l.x3 ) if freq>=n
>
>
> What you describe is consistent with the above explanation,
> but it is hard to ascertain that without knowing the pattern
> of missingness/holes in your specific data. That's somethying
> you need to check by yourself (again
> -xtdes- will help there).
>
> Hope this helps.
>
> Best wishes
>
> Philippe
>
>
>
>
>
> <<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>>
> Dr. Philippe Van Kerm
> IRISS - Integrated Research Infrastructure in the
> Socio-Economic Sciences CEPS/INSTEAD BP48, L-4501
> Differdange, Luxembourg
> >> http://www.ceps.lu/iriss <<
> >> http://econpapers.hhs.se/RAS/pva19.htm <<
> <<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>><<<>>>
>
>
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity
> to whom they are addressed. If you have received this email
> in error please notify the system manager.
>
> This footnote also confirms that this email message has been
> swept for the presence of computer viruses.
>
> **********************************************************************
>
> *
> * 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/
>
>
*
* 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/