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: Setting panel data when you have more than two id variables
From
Stefan Nikolic <[email protected]>
To
statalist <[email protected]>
Subject
Re: st: Setting panel data when you have more than two id variables
Date
Tue, 19 Nov 2013 20:01:13 +0000
Thanks Nick! I think this should work.
Best,
Stefan
On 19 November 2013 17:20, Nick Cox <[email protected]> wrote:
> The key is what do you consider to be a panel. You could, for example, go
>
> egen panelid = group(country industry), label
> xtset panelid year
>
> but that should match your research questions.
>
> It seems unlikely that you would want -year- to be part of a panel identifier.
>
> Naturally -xtset- just defines panels to Stata and has no implications
> otherwise.
>
> Nick
> [email protected]
>
>
> On 19 November 2013 17:11, Stefan Nikolic <[email protected]> wrote:
>
>> I am new to Statalist and would like to know if I can use xtset
>> with my data.
>> I am using Stata 12.0 for Windows.
>>
>> To run wanted estimations I first need to set my data to panel data.
>> If my data set would contain only the country(i) and year(t) dimension
>> (i.e. two id variables), I would use the command xtset country year.
>> But, since I have the industry(j) dimension as well, I am puzzled as
>> to how to get Stata to recognise this in my data set, and set it is as
>> panel.
> *
> * 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/