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: Generating new lines/record for groups of data


From   Navid Asgari <[email protected]>
To   [email protected]
Subject   Re: st: Generating new lines/record for groups of data
Date   Wed, 23 May 2012 00:36:26 +0800

Thanks Brendan!  It worked :)

On Wed, May 23, 2012 at 12:12 AM, Brendan Halpin <[email protected]> wrote:
> On Tue, May 22 2012, Navid Asgari wrote:
>
>> Hi all,
>>
>> I would like to add new records to my data by groups. My longitudinal
>> data-set looks like this (the maximum length of a panel is 4
>> years[from 1990 to  1993, but some Firms have less observations, so I
>> have an unbalanced panel data])
>>
>> Firm_ID      Year     var1   Var2
>> -------------------------------------------
>> G33            1990      2       2.5
>> G33            1991      3.4    1.2
>> G33            1992      5.6    2.8
>> G33            1993      8.1    9.2
>> KL1            1992      3       2.22
>>
>>
>> As you can see "G33" has three records from 1990 to 1993... Now I want
>> to make it look like a balanced panel data:
>>
>> Firm_ID      Year     var1   Var2
>> -------------------------------------------
>> G33            1990      2       2.5
>> G33            1991      3.4    1.2
>> G33            1992      5.6    2.8
>> G33            1993      8.1    9.2
>> KL1            1992      3       2.22
>> KL1             1990     .         .
>> KL1             1991     .         .
>> KL1             1993     .         .
>
> I think you need
>
> . fillin Firm_ID Year
>
> Brendan
> --
> Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
> Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
> mailto:[email protected]    ULSociology on Facebook: http://on.fb.me/fjIK9t
> http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology
> *
> *   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/

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