0
votes

My panel dataset consists of three identifiers:

  1. Country
  2. Industry
  3. Year

I would like to calculate the effects of a variable X across different industries.

I am confused how I should treat in Stata the panel dimension (identifier) since standard panel data techniques treats are two dimensional (i, t).

For example, if I want to run a fixed effects and random effects model to check the effects of a variable X across industries, what is the correct approach in this case?

Should i go with:

xtset country 

or:

xtset country industry
1
You should always include a minimal reproducible example with your question. - user8682794

1 Answers

2
votes

You can do the following:

egen id = group(country industry)
xtset id year