Announcement

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

  • Three level cross-nested linear model

    Dear Stata users,

    This question have probably been already asked, but I still struggle to find the answer.

    I have a nested structure of the (longitudinal) data on company performance. Company performance is observed over years over several companies. Companies are nested both within industries and within states. Industries and states are not nested within each other. In sum, I have

    Level 1: Year (Residual)
    Level 2: Company
    Level 3: Industry
    Level 3: State

    How do I properly specify this structure with the mixed command? By relating to existing examples on the web, I assume the command should be like this, but I am not sure whether it is correct
    Code:
    mixed performance || _all: R.industry || state: || company:
    I would be grateful for your help.
    Last edited by giorgioconti; 13 Apr 2017, 10:18.

  • #2
    That looks right to me.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      That looks right to me.
      Dear Clyde,

      Thank you for your reply. I much appreciate it!

      Comment


      • #4
        Originally posted by Clyde Schechter View Post
        That looks right to me.
        Dear Clyde,

        If it is fine with you, I would like to ask you an additional question.

        When I was running regressions, I found that differently specified nesting structure provides different results (also in terms of significance). For example, I also tried
        Code:
        mixed performance || _all: R.state || industry: || company:
        mixed performance || _all: R.industry || _all: R.state || company:
        If I understand correctly, the cross-nesting logic holds for all three models, i.e.
        Code:
        mixed performance || _all: R.industry || state: || company:
        mixed performance || _all: R.state || industry: || company:
        mixed performance || _all: R.industry || _all: R.state || company:
        But what would be the difference between them? I would be grateful for your help.
        Last edited by giorgioconti; 14 Apr 2017, 03:00.

        Comment


        • #5
          I'm wondering whether your data actually exhibit the pattern of nesting within crossed effects you are trying to model. I have run a model like this, and I get the same results from all three (analogous) commands: the order in which the variance components are shown in the output differs, and there is certainly a difference in speed, but the results are completely equivalent.

          One thought: do you have a situation where two different companies have the same identifying number and are separated only by virtue of being in different state or industry? That might get Stata confused. Make sure that the series of company id numbers is distinct in each industry X state combination. I know that in purely nested models, Stata is supposed to figure out that lower level unit 1 in nesting unit A is different from lower level unit 1 in nesting unit B even though they are both called 1. But I think in the context of the _all: syntax that may not work.

          Comment


          • #6
            Originally posted by Clyde Schechter View Post
            One thought: do you have a situation where two different companies have the same identifying number and are separated only by virtue of being in different state or industry?
            I see your point. In my data, all companies have unique IDs. However, sometimes companies change their industry, such that, for company 1, industry ID is 1 in years 1999-2001 and industry ID is 2 in years 2002-2007. State IDs are constant over years. Will this require rewriting a syntax in some other way?

            Comment


            • #7
              If companies change industry, then they are not nested in firm X year. It sounds like perhaps companies are nested in states, and then the states are crossed with industries. (I'm assuming companies never change states.) So then, I think it's:

              Code:
              mixed ... || _all:R.industry || state: || company:

              Comment


              • #8
                Thank you!

                Comment

                Working...
                X