Announcement

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

  • Multilevel model: about the decision of levels

    Hi Everybody,
    I'm using a panel data (from year 2013 to 2020) about firms' R&D, sales, region of origin, industry etc.. I'm considering to use multilevel model regression is because there are region and industry, so the data structure is nested. The thing is that I have only three regions, which is too few to be used as a level, otherwise it will lead to large mean square estimation errors (Antonakis et al., 2021). But since I have 8 years, I wonder if it's possible to use yearXregion as one level and industry as the second level. Does it make sense to do that?

    year Company region Industry RD Salesm
    2013 THERMOFISHERSCIENTIFIC America HealthCareEquipment&Services 286.78124 9491.9153
    2013 JDSUNIPHASE America TechnologyHardware&Equipment 214.63274 1215.938
    2013 TWITTER America Software&ComputerServices 448.11255 482.11879
    2013 CA America Software&ComputerServices 454.64434 3273.8743
    2013 CISCOSYSTEMS America TechnologyHardware&Equipment 4563.8461 34183.164
    2013 AGCO America IndustrialEngineering 256.25408 7821.6955
    2013 STJUDEMEDICAL America HealthCareEquipment&Services 501.05142 3988.8334
    2013 EMERSONELECTRIC America Electronic&ElectricalEquipment 417.6637 17887.753
    2013 LOCKHEEDMARTIN America Aerospace&Defence 978.89931 32889.566

  • #2
    I'm considering to use multilevel model regression is because there are region and industry, so the data structure is nested.
    I strongly doubt that. I cannot say for sure because your example data includes only a single region. But unless you have some rather exotic sampling design, it would be astonishing for region to be nested in industry or vice versa. It is far more likely that region and industry are crossed effects.

    That said, with only three regions, it does not make sense to have a region level in your model. I recommend including i.region as a fixed effect in your regression model, and just have years nested in companies nested in industries.

    The basic model would be this:
    Code:
    mixed outcome explanatory_variable(s) i.region || industry: || company:
    Perhaps you want to include i.year as well, robust standard errors, etc.

    In the future, when asking for help with code, please show a fuller data example that enables people to see the relevant structure. With only one year and one region represented, it is left to guesswork what the relationships among these variables might be in the full data. Also, when showing data examples, please use the -dataex- command to do so. If you are running version 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      I strongly doubt that. I cannot say for sure because your example data includes only a single region. But unless you have some rather exotic sampling design, it would be astonishing for region to be nested in industry or vice versa. It is far more likely that region and industry are crossed effects.

      That said, with only three regions, it does not make sense to have a region level in your model. I recommend including i.region as a fixed effect in your regression model, and just have years nested in companies nested in industries.

      The basic model would be this:
      Code:
      mixed outcome explanatory_variable(s) i.region || industry: || company:
      Perhaps you want to include i.year as well, robust standard errors, etc.

      In the future, when asking for help with code, please show a fuller data example that enables people to see the relevant structure. With only one year and one region represented, it is left to guesswork what the relationships among these variables might be in the full data. Also, when showing data examples, please use the -dataex- command to do so. If you are running version 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.
      Thank you very much Clyde! It's really helpful! I will pay attention to the data format next time I post!

      Comment

      Working...
      X