Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • declare disaggregated import data

    Hi
    I have a data set that contains imports from the US disaggregated by year, country and product. It looks more or less like this:

    country_code year hts8 importvalue
    2010 1990 01011100 2500
    2010 1990 01011900 3100
    .
    .
    .
    2010 2001 01011100 789
    3010 1990 01011100 650
    .
    .
    I am trying to declare it as a panel like this
    xtset country_code year
    but I get the error: repeated time values within panel

    Should I generate a new panel identifier? (egen panelid = group(country_code hts8)
    Thank you!

    Dana Chahin

  • #2
    I would reverse the question. A reason for using xtset is that you want to use some command that requires a prior xtset. What you propose makes sense if you can justify (country, product) pairs as defining distinct panels for whatever you want to do.

    Comment


    • #3
      Thank you for your answer.
      I want to run a regression where the dependent variable corresponds to the imports from country c, product p and year t. On the right hand side I have a triple interaction dummy and interactive fixed effects (country/product, country/year and product/year). I wanted to use xtreg for that.
      The specification is like the one in Frazer, & Biesebroeck. (2010, February). Trade growth under the African Growth and Opportunity Act. Review of Economics and Statistics(92(1)), pp. 128-144.

      Comment

      Working...
      X