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: Grouping firmid or not to tsset data ?
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Grouping firmid or not to tsset data ?
Date
Mon, 20 Jan 2014 21:20:17 +0000
In other words,
-group()- is used with -generate- is emphatically _NOT_ the -group()-
as used with -egen-.
Nick
[email protected]
On 20 January 2014 21:16, Nick Cox <[email protected]> wrote:
> If you really are typing
>
> gen firmid = group(permid)
>
> then that triggers the undocumented Stata function -group()-. That's
> going to be very wrong for you. With
>
> egen firmid = group(permid)
>
> you might try
>
> egen double firmid = group(permid)
>
> instead.
>
> Nick
> [email protected]
>
>
> On 20 January 2014 19:03, Abdalla, Ahmed <[email protected]> wrote:
>> Dear Statalist
>> I have a panel id (permno) and two time variables (yr) and (mth) and want to tsset my panel based on permno yr mth
>> I run:
>> gen timeid = ym(yr, mth)
>> gen firmid=group(permno)
>>
>> tsset firmid timeid
>> //I get the error message -repeated time values within panel
>>
>> when I run tsset permno timeid
>> //it works properly.
>>
>> I changed my data set, and used another data set to rule out any problems with my data, however still get the same results !
>>
>> Can I tsset when only the time variables are grouped in one timeid and the firmid is not grouped ? Is it correct?
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>>
>> *
>> * 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/
*
* 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/