Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: specifying j in Xijt


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: specifying j in Xijt
Date   Thu, 20 Apr 2006 10:31:00 +0100 (BST)

Kremena Platikanova wrote:

> I have panel data of the form Xijt. I use
> iis [varnamei]
> iit [varnamet]
> to specify the variables corresponding to the indeces i and t,
> respectively.

Why, when you can use -tsset- instead (if you have Stata 8 or 9)? For example

. tsset varnamei varnamet

> But how do I specify the variable corresponding to the index j?

You really ought to tell us what exactly i and j are in your dataset.
Given that you're an economist, I might assume that i = firm and j =
country, but you should tell us that _explicitly_!

Assuming this is the case, -tsset- can only accept two dimensions. For
most mere mortals,

. tsset country year

would suffice, but you want to find a way of nesting firms within
countries, and that's quite tricky. The only solution I can think of would
be to

. bysort firm (country) : gen _n

and that doesn't really provide a satisfactory solution, as the index
numbers this would produce won't discriminate between either unit.

Perhaps a better, if not one-shot, solution would be to -tsset- for both i
and j seperately (along with t) and then include the variable left out as
a RHS variable in whatever model you're fitting.

Beyond that, I can't think of anything else, so I hope that helps (a bit).

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index