Announcement

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

  • Regression among two groups of a panel data

    Hi

    I have a dataset of 250 panels , 20 years each. The panels are further categorised into two main groups A and B. There are three variables for each group as Var1A, Var2A, Var3A and Var1B, Var2B, Var3B.

    Now I want to see the cross-interactions among the two groups. In other words, I want to run few regressions as:1: regress Var1A Var2B Var3B; 2: regress Var1B Var2A Var3A

    The stata simple says no observation. As the variables of group A belong to one set of panels and that ob B are a different set of variables. This means that while we regress Var1A with Var2B, these are two different panel sets, so the panels having data for Var1A are not same as the panels having the data for Var2B.

    I also want ot run the same cross group analysis with VAR (vector auto regression) where I want to try:
    pvar Var1A Var2B Var3B

    but the result is again no observation.

    Is there any way I can find the relationship among the variables that belong to different group of panels.which i call cross-group estimations. Also in a way I want to see the effect of varA belonging to one set of panels on varB belonging to a different set of panels. Not sure how this can be achieved. Or is there any other way to find the relationship among variables belonging to different set of panels?


  • #2
    Well, it sounds like you are asking to do the impossible. If Var1A, Var2A, and Var3A are only defined in observations belong to group A (and have missing values in observations belong to group B), and Var1B, Var2B, and Var3B are only defined in observations belonging to group B (and have missing values in observations belong to group A), then there will never be any observations for which, ay, Var1A, Var2B, and Var3B are all non-missing. It will always be the case that Var1A is missing or Var2B and Var3B are missing. Any regression command works only with observations that have non-missing values for every variable in the command.

    And forgetting even the issues of handling missing values in regressions, it makes no sense to speak of relationships between Var1A and Var2B, Var3B since there is no panel anywhere that has information about all of these.

    If I am missing something and my comments here are incorrect, it is likely because you have not shown example data and I am imagining them to look different from what you have. So if that is the case, please post back with example data created by the -dataex- command. If you are running version 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
      Hi Clyde,

      Here is the example as you required:

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input double FI float Time_period long FIType float(ChCoVaR_CFI Lerner_IFI Lerner_CFI ChCoVaR_IFI)
      1 192 1 .469732         .  .5600026       .
      1 193 1 .322932         .  .7250005       .
      1 194 1 .296189         .  .7572047       .
      1 195 1 .461481         . -.4595115       .
      1 196 1 .565234         .  1.161469       .
      1 197 1 .827582         .  1.550027       .
      1 198 1 .792921         .  1.160688       .
      1 199 1 .755505         .  1.222017       .
      1 200 1  .72158         .  .4549142       .
      1 201 1 .690429         .  .4564876       .
      1 202 1 .670155         .  .7862613       .
      1 203 1 .358876         .  .8436369       .
      2 188 2       . -.0529198         .    .615
      2 189 2       .  .0903033         . .513833
      2 190 2       . -.2701828         . .593933
      2 191 2       . -.2670278         .   .6461
      2 192 2       . -.1000975         .   .4415
      2 193 2       .  .1512618         . .498367
      2 194 2       . -.3566274         . .581433
      2 195 2       . -1.280371         . .910433
      2 196 2       . -2.255835         .    .741
      2 197 2       . -1.795534         .   .4954
      2 198 2       . -1.170866         . .491533
      2 199 2       . -1.319637         . .750833
      2 200 2       . -.8966602         . .473767
      2 201 2       . -.4856316         .   .6259
      2 202 2       . -.5233102         . .517733
      2 203 2       . -1.342722         . .503867
      2 204 2       . -.5834476         . .582167
      2 205 2       . -.5265879         . .613433
      2 206 2       . -.5784472         .   .7207
      2 207 2       . -1.442999         .   .5579
      2 208 2       . -.6726439         . .505267
      2 209 2       .  .8797587         .  .56535
      2 210 2       . -.6541831         .       .
      2 211 2       . -1.176164         .       .
      2 212 2       .   .164744         .       .
      2 213 2       . -.2540273         .       .
      2 214 2       .  .2702398         .       .
      2 215 2       .  .9904854         .       .
      2 216 2       .  .0235139         .       .
      2 217 2       .  .3699678         .       .
      2 218 2       . -.0221689         .       .
      2 219 2       .  .1596223         .       .
      2 220 2       .  .2323379         .       .
      2 221 2       .  .3036623         .       .
      2 222 2       .  .0090199         .       .
      2 223 2       .  .1794158         .       .
      2 224 2       .  .0717469         .       .
      2 225 2       .  .0647158         .       .
      2 226 2       .   -.02132         .       .
      2 227 2       .  1.087458         .       .
      2 228 2       .   .960769         .       .
      2 229 2       . -.0889815         .       .
      2 230 2       .  .2185324         .       .
      2 231 2       . -1.339151         .       .
      2 232 2       .  .1126082         .       .
      2 233 2       . -.2231936         .       .
      2 234 2       .  .2827898         .       .
      2 235 2       .   .624326         .       .
      2 236 2       .  .1913897         .       .
      2 237 2       .    .08341         .       .
      2 238 2       .  .1016832         .       .
      3 216 1 .314431         . -.2224325       .
      3 217 1 .315598         . -.2543443       .
      3 218 1 .308799         .  -.250793       .
      3 219 1 .304615         . -.2371327       .
      3 220 1 .333419         . -.3726534       .
      3 221 1 .251515         . -.3167424       .
      3 222 1  .25892         . -.3112296       .
      3 223 1 .311937         . -.3812201       .
      3 224 1 .328793         . -.4241071       .
      3 225 1 .312979         . -.3042421       .
      3 226 1 .385194         . -.5449238       .
      3 227 1 .382867         . -.7489787       .
      3 228 1 .420307         . -.7236686       .
      3 229 1 .441735         . -.7980504       .
      3 230 1 .418861         . -.7343644       .
      3 231 1 .419443         . -.3501186       .
      3 232 1 .514411         .  -.440003       .
      end
      format %tq Time_period
      label values FI FI
      label def FI 1 "786 PA Equity", modify
      label def FI 2 "AAYAN KK Equity", modify
      label def FI 3 "ABANK MK Equity", modify
      label values FIType FIType
      label def FIType 1 "CFI", modify
      label def FIType 2 "IFI", modify

      In the above data the syntax I want to run is:
      xtreg ChCoVaR_CFI Lerner_CFI Lerner_IFI

      and ChCoVaR_IFI Lerner_IFI Lerner_IFI

      (more precisely I intend to run pvar (panel var) with syntax pvar ChCoVaR_CFI Lerner_CFI Lerner_IFI)

      Where the ChCoVaR_CFIand Lerner_CFI belong to one group i.e. FIType==1 and Lerner_IFI belong to the other group i.e. FI Type==2.

      The grouping variable is thus FI Type (1 and 2), FI=panel IDs

      In these estimations I basically want to see how ChCoVaR_CFI of FI Type==1 is affected by Lerner_IFI of FI Type==2. So in a way it is to test how the market power of one sub-sector (FI Type==1) in a financial sector affects the riskiness of the other sub-sector (FI Type-==2) in that financial sector. since both the groups (sub-sectors) are a part one large financial sector, it is logical to see how is the spillover riskiness transferred to one sector due to increasing or decreasing market power in the other sector.

      I hope I tried to explain it now in a bit detail.

      Please feel free to ask if anything is further unclear.

      Comment


      • #4
        The data are, in fact, as I imagined them to be, which implies that a direct comparison of these variables is impossible.

        But from what you say in #3, I have the sense that your research question has not been fully explained. Perhaps what you mean to do is calculate some kind of aggregate values of these variables in each of the two sub-sectors (maybe the mean across FI's, or the median, or something like that? If so, what?) and have sector-wide values of these variables in each time period, and then do the comparisons that way. If I'm on the right track, you need to tell me how you would calculate each time period's sector-wide values of the *_CFI and *_IFI variables from the individual observations you have for separate FI's.

        Comment


        • #5
          Hi Clyde

          You are right in a sense that I want to do cross sector analysis, so my research ques follows as : what is the impact of market power (Indep.variable) of sector 1 (CFI) on the riskiness (dep var) of sector 2 (IFI). But I am not sure whether doing any panel wise mean/median would get me to this. You are also true that probably ignoring the panels (FI) and having an aggregate analysis (sector wise i.e. for CFI and IFI) could help me get around this. Could you further show how I can ignore the panels in this analysis and get some aggregate analysis between the two sectors?

          Comment


          • #6
            I am extremely reluctant to do this. That's because this content matter is well outside my expertise and I don't even have a clue what any of these variables mean. But the kind of thing I have in mind is something like this:

            Code:
            collapse (mean) *FI, by(Time_period)
            regress ChCoVaR_CFI Lerner_CFI ChCoVaR_IFI
            But I don't want you to do this unless you consult with somebody in your discipline who can tell you if this even makes any sense at all. I don't know if averaging these variables across firms within time period makes any sense. I don't know if using -regress- as shown makes any sense. Even if those things make sense, there may be issues in analyzing these time series that require refinements that I'm not able to discuss. But this is the general type of approach that might work, if it makes any sense.

            Comment

            Working...
            X