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: Re: Lag variables


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Re: Lag variables
Date   Wed, 6 Mar 2013 10:28:37 +0000

Your variable -SIZE- is necessarily missing whenever -year- is not
1991. It may be that you want instead something more like

egen SIZE1991 = total(employment / (year == 1991)), by(firmid)

See

SJ-11-2 dm0055  . . . . . . . . . . . . . .  Speaking Stata: Compared with ...
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        Q2/11   SJ 11(2):305--314                                (no commands)
        reviews techniques for relating values to values in other
        observations

for a review of related technique.

Nick

On Wed, Mar 6, 2013 at 4:32 AM, Alice Jones <[email protected]> wrote:

> I am analysing firm performance on a balanced panel over a period of 9
> years. I create a variable SIZE which measures firm size in the first
> year of the sample period and regress this against firm performance
> over the 9 year period.
>
> I run the following command to create the size variable:
>
> gen SIZE = employment if year==1991
>
> However, when I run the regression:
>
> reg GROWTH SIZE
>
> I get the error message, No observations.
>
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index