Announcement

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

  • #31
    Originally posted by Carlo Lazzaro View Post
    Luca:
    1) if you get a coefficient from -i.nationality- under -fe-, some player changed her/his nationality;
    2) using -timevar- as -panelid- is simply wrong, no matter the results.
    1) This is assuming I run the model with series as -panelid-. If I run it with individualplayer as-panelid-, it indeed will be omitted, which makes sense.
    2) I agree with you. I think there is no choice here but to set my panelid as "individualplayer Year". However, when I do it, I get the error of "repeated time values within panel", so I need to group both variables into something like this:
    Code:
    egen player_year = group(individualplayer Year)
    xtset player_year
    Is it correct?
    Last edited by Luca Toni; 08 Jul 2022, 00:26.

    Comment


    • #32
      Luca:
      1) Agreed.
      2) Not quite. If you do not plan to use time-series related commands such as lags and leads, you can simply -xtset- your dataset with -panelid- only.
      Kind regards,
      Carlo
      (Stata 18.0 SE)

      Comment


      • #33
        Originally posted by Carlo Lazzaro View Post
        Luca:
        1) Agreed.
        2) Not quite. If you do not plan to use time-series related commands such as lags and leads, you can simply -xtset- your dataset with -panelid- only.
        Hi Carlo,
        Sorry for the late response. I was quite busy the past month and now I can focus on my project.
        I run the OLS regression with individualplayer as -panelid- along with year fixed effect and series fixed effect (ATP 250, ATP 500, Masters 1000, Grand Slam).
        Here is two examples of regressions I run. The first example refers to the effort of each player, while the second example refers to the aggregate effort of both players in the match as independent variable. Note that in the second example, -panelid- is defined as matchplayers and not as individualplayer since it's measuring both players effort.
        Code:
        . encode Tournament, g(tournament)
        
        . encode Nationality, g(nationality)
        
        . encode IndividualPlayer, g(individualplayer)
        
        . encode Series, g(series)
        
        . encode MatchPlayers, g(matchplayers)
        
        . xtset individualplayer
        
        Panel variable: individualplayer (unbalanced)
        
        . xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 NumOfTourneys SpreadNumOfTourneys Favourite Bestof i.series i.Year, fe vce(cluster individualplayer)
        
        Fixed-effects (within) regression               Number of obs     =     37,060
        Group variable: individual~r                    Number of groups  =        654
        
        R-squared:                                      Obs per group:
             Within  = 0.2690                                         min =          1
             Between = 0.3615                                         avg =       56.7
             Overall = 0.2812                                         max =        509
        
                                                        F(17,653)         =     456.81
        corr(u_i, Xb) = 0.0687                          Prob > F          =     0.0000
        
                                          (Std. err. adjusted for 654 clusters in individualplayer)
        -------------------------------------------------------------------------------------------
                                  |               Robust
        GameswonbyIndividualPla~r | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        --------------------------+----------------------------------------------------------------
          IndividualHeterogeneity |  -.0023609   .0003122    -7.56   0.000    -.0029739   -.0017479
        IndividualPrizeSpread1000 |   .0027939   .0015879     1.76   0.079    -.0003242     .005912
                    NumOfTourneys |   .0184153   .0068828     2.68   0.008     .0049002    .0319303
              SpreadNumOfTourneys |  -.0002235   .0001125    -1.99   0.047    -.0004445   -2.56e-06
                        Favourite |   1.314657    .070442    18.66   0.000     1.176337    1.452977
                           Bestof |  -.0445321   .6416177    -0.07   0.945    -1.304415    1.215351
                                  |
                           series |
                          ATP500  |  -.3337837   .0735048    -4.54   0.000    -.4781179   -.1894495
                      Grand Slam  |   6.214253   1.283044     4.84   0.000     3.694863    8.733643
                    Masters 1000  |  -.4011294   .0631825    -6.35   0.000    -.5251948   -.2770639
                                  |
                             Year |
                            2014  |  -.0935003   .1096476    -0.85   0.394    -.3088047    .1218042
                            2015  |   .0329302   .1046406     0.31   0.753    -.1725424    .2384029
                            2016  |   -.083932   .1156073    -0.73   0.468    -.3109389    .1430748
                            2017  |  -.0665706   .1155386    -0.58   0.565    -.2934427    .1603015
                            2018  |    .067156   .1194761     0.56   0.574    -.1674476    .3017597
                            2019  |  -.0680303   .1239906    -0.55   0.583    -.3114986     .175438
                            2020  |  -.1585247   .1310829    -1.21   0.227    -.4159196    .0988701
                            2021  |  -.3222647   .1276262    -2.53   0.012    -.5728719   -.0716575
                                  |
                            _cons |   10.94864   1.942606     5.64   0.000     7.134134    14.76315
        --------------------------+----------------------------------------------------------------
                          sigma_u |  2.6007465
                          sigma_e |  4.5752669
                              rho |  .24421036   (fraction of variance due to u_i)
        -------------------------------------------------------------------------------------------
        
        . //second regression
        . xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 Favourite Bestof i.series i.Year, fe vce(cluster individualplayer)
        
        Fixed-effects (within) regression               Number of obs     =     37,060
        Group variable: individual~r                    Number of groups  =        654
        
        R-squared:                                      Obs per group:
             Within  = 0.2688                                         min =          1
             Between = 0.3520                                         avg =       56.7
             Overall = 0.2804                                         max =        509
        
                                                        F(15,653)         =     502.67
        corr(u_i, Xb) = 0.0686                          Prob > F          =     0.0000
        
                                          (Std. err. adjusted for 654 clusters in individualplayer)
        -------------------------------------------------------------------------------------------
                                  |               Robust
        GameswonbyIndividualPla~r | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        --------------------------+----------------------------------------------------------------
          IndividualHeterogeneity |  -.0024577   .0003143    -7.82   0.000    -.0030748   -.0018405
        IndividualPrizeSpread1000 |   -.000374   .0006148    -0.61   0.543    -.0015813    .0008333
                        Favourite |   1.336677   .0706779    18.91   0.000     1.197893     1.47546
                           Bestof |  -.0417947    .641297    -0.07   0.948    -1.301048    1.217458
                                  |
                           series |
                          ATP500  |  -.3249413   .0738492    -4.40   0.000    -.4699518   -.1799309
                      Grand Slam  |   6.205432   1.283456     4.83   0.000     3.685233    8.725631
                    Masters 1000  |  -.3854366   .0619527    -6.22   0.000    -.5070871   -.2637862
                                  |
                             Year |
                            2014  |  -.0987801   .1092683    -0.90   0.366    -.3133397    .1157794
                            2015  |   .0354015   .1059005     0.33   0.738     -.172545     .243348
                            2016  |  -.0934448   .1155436    -0.81   0.419    -.3203266    .1334369
                            2017  |  -.0611828   .1166424    -0.52   0.600    -.2902223    .1678567
                            2018  |   .0709728   .1187949     0.60   0.550    -.1622933    .3042389
                            2019  |  -.0558739    .124418    -0.45   0.654    -.3001814    .1884336
                            2020  |  -.2288289   .1252234    -1.83   0.068    -.4747179    .0170602
                            2021  |  -.3277693   .1274498    -2.57   0.010    -.5780302   -.0775084
                                  |
                            _cons |   11.20481   1.925714     5.82   0.000     7.423472    14.98615
        --------------------------+----------------------------------------------------------------
                          sigma_u |  2.6209374
                          sigma_e |  4.5759297
                              rho |  .24702254   (fraction of variance due to u_i)
        -------------------------------------------------------------------------------------------
        
        . table () ( command ) (), command(xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 NumOfTourneys SpreadNumOfTourneys Favourite i.series i.Year, fe vce(cluster individualplayer)) comman
        > d(xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 Favourite Bestof i.series i.Year, fe vce(cluster individualplayer))
        
        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        > --------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                         |  xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 NumOfTourneys SpreadNumOfTourneys Favourite i.series i.Year, fe vce(cluster indiv
        > idualplayer)   xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 Favourite Bestof i.series i.Year, fe vce(cluster individualplayer)
        ---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------
        > --------------------------------------------------------------------------------------------------------------------------------------------------------------------
        Individual Heterogeneity         |                                                                                                                                                                      
        >    -.0023609                                                                                                                                               -.0024577
        Individual Prize Spread ($1,000) |                                                                                                                                                                      
        >     .0027932                                                                                                                                                -.000374
        NumOfTourneys                    |                                                                                                                                                                      
        >     .0184167                                                                                                                                                        
        Spread*NumOfTourneys             |                                                                                                                                                                      
        >    -.0002235                                                                                                                                                        
        Favourite                        |                                                                                                                                                                      
        >     1.314637                                                                                                                                                1.336677
        Series=ATP250                    |                                                                                                                                                                      
        >            0                                                                                                                                                       0
        Series=ATP500                    |                                                                                                                                                                      
        >     -.333793                                                                                                                                               -.3249413
        Series=Grand Slam                |                                                                                                                                                                      
        >     6.125352                                                                                                                                                6.205432
        Series=Masters 1000              |                                                                                                                                                                      
        >    -.4011497                                                                                                                                               -.3854366
        Year=2013                        |                                                                                                                                                                      
        >            0                                                                                                                                                       0
        Year=2014                        |                                                                                                                                                                      
        >    -.0935085                                                                                                                                               -.0987801
        Year=2015                        |                                                                                                                                                                      
        >     .0329139                                                                                                                                                .0354015
        Year=2016                        |                                                                                                                                                                      
        >    -.0839482                                                                                                                                               -.0934448
        Year=2017                        |                                                                                                                                                                      
        >    -.0665916                                                                                                                                               -.0611828
        Year=2018                        |                                                                                                                                                                      
        >      .067136                                                                                                                                                .0709728
        Year=2019                        |                                                                                                                                                                      
        >    -.0680534                                                                                                                                               -.0558739
        Year=2020                        |                                                                                                                                                                      
        >    -.1585733                                                                                                                                               -.2288289
        Year=2021                        |                                                                                                                                                                      
        >    -.3222655                                                                                                                                               -.3277693
        Best of                          |                                                                                                                                                                      
        >                                                                                                                                                            -.0417947
        Intercept                        |                                                                                                                                                                      
        >     10.81506                                                                                                                                                11.20481
        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        > --------------------------------------------------------------------------------------------------------------------------------------------------------------------
        
        . collect label levels command 1 "Model 1" 2 "Model 2", modify
        Second example:
        Code:
        . encode Tournament, g(tournament)
        
        . encode Nationality, g(nationality)
        
        . encode IndividualPlayer, g(individualplayer)
        
        . encode Series, g(series)
        
        . encode MatchPlayers, g(matchplayers)
        
        . xtset matchplayers
        
        Panel variable: matchplayers (unbalanced)
        
        . xtreg Totalsumofgameswonpermatch Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe vce(cluster matchplayers)
        
        Fixed-effects (within) regression               Number of obs     =     18,530
        Group variable: matchplayers                    Number of groups  =     13,560
        
        R-squared:                                      Obs per group:
             Within  = 0.3478                                         min =          1
             Between = 0.3387                                         avg =        1.4
             Overall = 0.3351                                         max =         15
        
                                                        F(14,13559)       =     150.14
        corr(u_i, Xb) = -0.0068                         Prob > F          =     0.0000
        
                                 (Std. err. adjusted for 13,560 clusters in matchplayers)
        ---------------------------------------------------------------------------------
                        |               Robust
        Totalsumofgam~h | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        ----------------+----------------------------------------------------------------
          Heterogeneity |  -.0028484   .0018229    -1.56   0.118    -.0064216    .0007247
        PrizeSpread1000 |   .0012275   .0013695     0.90   0.370    -.0014569    .0039119
                 Bestof |   1.674422   1.186041     1.41   0.158    -.6503836    3.999227
                        |
                 series |
                ATP500  |  -.0047427   .3155812    -0.02   0.988    -.6233256    .6138403
            Grand Slam  |   9.256325   2.374459     3.90   0.000     4.602056    13.91059
          Masters 1000  |   .0492267   .2740786     0.18   0.857    -.4880054    .5864587
                        |
                   Year |
                  2014  |  -.6096555   .4718764    -1.29   0.196    -1.534599    .3152879
                  2015  |  -.6740411   .4421081    -1.52   0.127    -1.540634    .1925523
                  2016  |  -1.154098   .4601262    -2.51   0.012    -2.056009   -.2521869
                  2017  |  -1.317497   .4610066    -2.86   0.004    -2.221133   -.4138597
                  2018  |  -.9895531   .4827993    -2.05   0.040    -1.935907   -.0431994
                  2019  |  -.8223668   .5030608    -1.63   0.102    -1.808436    .1637022
                  2020  |  -1.443851   .6315866    -2.29   0.022    -2.681849   -.2058537
                  2021  |  -1.721374   .6238365    -2.76   0.006     -2.94418   -.4985675
                        |
                  _cons |   19.04583   3.577602     5.32   0.000     12.03324    26.05843
        ----------------+----------------------------------------------------------------
                sigma_u |   7.078819
                sigma_e |  7.3292935
                    rho |  .48262098   (fraction of variance due to u_i)
        ---------------------------------------------------------------------------------
        
        . table () ( command ) (), command(xtreg Totalsumofgameswonpermatch Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe vce(cluster matchplayers))
        
        --------------------------------------------------------------------------------------------------------------------------------------------
                              |  xtreg Totalsumofgameswonpermatch Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe vce(cluster matchplayers)
        ----------------------+---------------------------------------------------------------------------------------------------------------------
        Heterogeneity         |                                                                                                            -.0028484
        Prize Spread ($1,000) |                                                                                                             .0012275
        Best of               |                                                                                                             1.674422
        Series=ATP250         |                                                                                                                    0
        Series=ATP500         |                                                                                                            -.0047427
        Series=Grand Slam     |                                                                                                             9.256325
        Series=Masters 1000   |                                                                                                             .0492267
        Year=2013             |                                                                                                                    0
        Year=2014             |                                                                                                            -.6096555
        Year=2015             |                                                                                                            -.6740411
        Year=2016             |                                                                                                            -1.154098
        Year=2017             |                                                                                                            -1.317497
        Year=2018             |                                                                                                            -.9895531
        Year=2019             |                                                                                                            -.8223668
        Year=2020             |                                                                                                            -1.443851
        Year=2021             |                                                                                                            -1.721374
        Intercept             |                                                                                                             19.04583
        --------------------------------------------------------------------------------------------------------------------------------------------
        
        . collect label levels command 1 "Model 1", modify
        Two questions:
        1) I also want to test in the OLS regression whether there are cultural differences between players, based on the Nationality variable. Note that I don't want to check how a player's country effects his own effort exertion, but generally for all the players from the same country (=nationality). Should I just add Nationality as an explanatory variable to the first example of regression?
        2) Besides testing the effort exertion of the players, I want to estimate the probability of either player to win the match with odds ratio (logistic regression). I argue that the aggregate effort levels of both players in the match, along with prize spread and different nationalities (cultural differences) may impact the probabilities of the favourite/underdog. Is it reasonable to use the explained variable from the second example above as an explanatory variable in this regression? Moreover, how can I check the cultual differences in this case? The explained variable in this regression will be: ln(Pr(FavouriteWins)/Pr(UnderdogWins)), where it gets 1 if favourite won the match and 0 if underdog won the match.
        Thanks in advance!
        Last edited by Luca Toni; 13 Aug 2022, 11:31.

        Comment


        • #34
          Luca:
          the main issue here seems to be that you do not have a panel -wise effect in your regressions.
          That said:
          1) the fixed effect estimator will wipe out all the time-invariant variables, like players' nationality;
          2) I'm not clear with your logistic regression strategy.
          Kind regards,
          Carlo
          (Stata 18.0 SE)

          Comment


          • #35
            Originally posted by Carlo Lazzaro View Post
            Luca:
            the main issue here seems to be that you do not have a panel -wise effect in your regressions.
            That said:
            1) the fixed effect estimator will wipe out all the time-invariant variables, like players' nationality;
            2) I'm not clear with your logistic regression strategy.
            1) This is assuming I use i.nationality, which is not the case. I'm thinking of using nationality as an explanatory variable in the regression.
            2) Basically, my theory is that higher heterogeneity (difference in ATP rankings) between two players will lead to lower total effort in the match. Then I want to check how lower effort from both players will effect the probability that the favourite player will win vs the underdog. This is in addition to prize spread in each match (which I assume that higher prize spread leads to higher effort from both players), and possible cultural differences between the players (nationality).

            Comment


            • #36
              Originally posted by Carlo Lazzaro View Post
              Luca:
              the main issue here seems to be that you do not have a panel -wise effect in your regressions.
              That said:
              1) the fixed effect estimator will wipe out all the time-invariant variables, like players' nationality;
              2) I'm not clear with your logistic regression strategy.
              Also, could you please explain what do you mean by that I don't have panel wise effect?

              Comment


              • #37
                Luca:
                1) I meant exactly what you think that I did not. The -fe- estimator wipes out all time-invariant variables, regardless of their being y or xs. For instance: was Milos Raonic always a Canadian citizen from his very first steps in the ATP tour? If that were the case, the -fe- estimator will give you back no coefficient at all. In addition, if you code -i.nationality-, you clearly mean a predictor. So, I'm unclear with your idea of explanatory variable. That said, why not trying it yourself whenever you think that replies to your questions are off target?
                2) the regressand of logistic regression is made of 1 and 0. In addition, I'm still unclear about the way you're going to model the lower effort made by both players;
                3) sigma_e>sigma_u. This is apparent in the first regression and likely in the second one.
                Kind regards,
                Carlo
                (Stata 18.0 SE)

                Comment


                • #38
                  Originally posted by Carlo Lazzaro View Post
                  Luca:
                  1) I meant exactly what you think that I did not. The -fe- estimator wipes out all time-invariant variables, regardless of their being y or xs. For instance: was Milos Raonic always a Canadian citizen from his very first steps in the ATP tour? If that were the case, the -fe- estimator will give you back no coefficient at all. In addition, if you code -i.nationality-, you clearly mean a predictor. So, I'm unclear with your idea of explanatory variable. That said, why not trying it yourself whenever you think that replies to your questions are off target?
                  2) the regressand of logistic regression is made of 1 and 0. In addition, I'm still unclear about the way you're going to model the lower effort made by both players;
                  3) sigma_e>sigma_u. This is apparent in the first regression and likely in the second one.
                  Thanks.
                  3) What I can do to deal with this porblem?
                  1) I agree that i.nationality is a predictor. How can I check cultural differences, though?
                  2) I want to predict the probability that the Favourite will win, based on both players effort (=total games won in a match), prize spread and cultural differences. What is not clear? I'm very confused.

                  Comment


                  • #39
                    Luca:
                    3) if you do not have a panel-wise effect, you should go pooled OLS ( that is more similar to an -re- estimator);
                    1) if there's no within-panel variation, the -fe- estimator cannot give you back any coefficient about cultural difference;
                    2) if the regressand is coded 1=the favourite player wins; 0=otherwise, I'm fine with that. I do not know whether the number of games won in a match can be considered by a skilled reviewer as a good/acceptable/reasonable proxy for the effort made by both players during the match.
                    Kind regards,
                    Carlo
                    (Stata 18.0 SE)

                    Comment


                    • #40
                      Originally posted by Carlo Lazzaro View Post
                      Luca:
                      3) if you do not have a panel-wise effect, you should go pooled OLS ( that is more similar to an -re- estimator);
                      1) if there's no within-panel variation, the -fe- estimator cannot give you back any coefficient about cultural difference;
                      2) if the regressand is coded 1=the favourite player wins; 0=otherwise, I'm fine with that. I do not know whether the number of games won in a match can be considered by a skilled reviewer as a good/acceptable/reasonable proxy for the effort made by both players during the match.
                      Thanks.
                      3) Okay, so can you give me an example for pooled OLS? I'm not clear with it.
                      1) I mean, how can I check cultural differences without the -fe- estimator?
                      2) In some papers I found the rationaliztion behind number of games won in a match being a proxy for effort. But for now I want to specify the model.

                      Comment


                      • #41
                        Luca:
                        3) pooled OLS is a multivariable OLS with clustered standard errors at -panelid- level;
                        1) you can check them with pooled OLS or -re-;
                        2) fine with that if reported in the literature.
                        Kind regards,
                        Carlo
                        (Stata 18.0 SE)

                        Comment


                        • #42
                          Originally posted by Carlo Lazzaro View Post
                          Luca:
                          3) pooled OLS is a multivariable OLS with clustered standard errors at -panelid- level;
                          1) you can check them with pooled OLS or -re-;
                          2) fine with that if reported in the literature.
                          Hi Carlo,
                          I tested which estimation method is preferred. All regressions point for using pooled OLS, right?
                          Code:
                          . encode Tournament, g(tournament)
                          
                          . encode Nationality, g(nationality)
                          
                          . encode IndividualPlayer, g(individualplayer)
                          
                          . encode Series, g(series)
                          
                          . encode MatchPlayers, g(matchplayers)
                          
                          . xtset individualplayer
                          
                          Panel variable: individualplayer (unbalanced)
                          
                          . xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 NumOfTourneys SpreadNumOfTourneys Favourite Bestof i.series i.Year, fe
                          
                          Fixed-effects (within) regression               Number of obs     =     37,060
                          Group variable: individual~r                    Number of groups  =        654
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.2690                                         min =          1
                               Between = 0.3615                                         avg =       56.7
                               Overall = 0.2812                                         max =        509
                          
                                                                          F(17,36389)       =     787.72
                          corr(u_i, Xb) = 0.0687                          Prob > F          =     0.0000
                          
                          -------------------------------------------------------------------------------------------
                          GameswonbyIndividualPla~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          --------------------------+----------------------------------------------------------------
                            IndividualHeterogeneity |  -.0023609   .0002631    -8.98   0.000    -.0028765   -.0018453
                          IndividualPrizeSpread1000 |   .0027939   .0011984     2.33   0.020      .000445    .0051428
                                      NumOfTourneys |   .0184153   .0064187     2.87   0.004     .0058344    .0309961
                                SpreadNumOfTourneys |  -.0002235   .0000803    -2.78   0.005     -.000381   -.0000661
                                          Favourite |   1.314657   .0620341    21.19   0.000     1.193069    1.436246
                                             Bestof |  -.0445321   .5735238    -0.08   0.938    -1.168656    1.079591
                                                    |
                                             series |
                                            ATP500  |  -.3337837   .0782178    -4.27   0.000     -.487093   -.1804744
                                        Grand Slam  |   6.214253   1.146856     5.42   0.000     3.966382    8.462124
                                      Masters 1000  |  -.4011294   .0663054    -6.05   0.000    -.5310899   -.2711689
                                                    |
                                               Year |
                                              2014  |  -.0935003   .1052767    -0.89   0.374    -.2998458    .1128452
                                              2015  |   .0329302   .1070078     0.31   0.758    -.1768082    .2426687
                                              2016  |   -.083932   .1074253    -0.78   0.435    -.2944888    .1266247
                                              2017  |  -.0665706   .1080118    -0.62   0.538    -.2782768    .1451357
                                              2018  |    .067156   .1100075     0.61   0.542    -.1484619     .282774
                                              2019  |  -.0680303    .112315    -0.61   0.545    -.2881709    .1521103
                                              2020  |  -.1585247   .1405395    -1.13   0.259    -.4339862    .1169367
                                              2021  |  -.3222647   .1225655    -2.63   0.009    -.5624968   -.0820327
                                                    |
                                              _cons |   10.94864   1.725505     6.35   0.000     7.566601    14.33068
                          --------------------------+----------------------------------------------------------------
                                            sigma_u |  2.6007465
                                            sigma_e |  4.5752669
                                                rho |  .24421036   (fraction of variance due to u_i)
                          -------------------------------------------------------------------------------------------
                          F test that all u_i=0: F(653, 36389) = 2.01                  Prob > F = 0.0000
                          
                          . estimates store fixed
                          
                          . xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 NumOfTourneys SpreadNumOfTourneys Favourite Bestof i.series i.Year, re
                          
                          Random-effects GLS regression                   Number of obs     =     37,060
                          Group variable: individual~r                    Number of groups  =        654
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.2675                                         min =          1
                               Between = 0.3931                                         avg =       56.7
                               Overall = 0.2835                                         max =        509
                          
                                                                          Wald chi2(17)     =   14655.63
                          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                          
                          -------------------------------------------------------------------------------------------
                          GameswonbyIndividualPla~r | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                          --------------------------+----------------------------------------------------------------
                            IndividualHeterogeneity |  -.0025504   .0002383   -10.70   0.000    -.0030174   -.0020833
                          IndividualPrizeSpread1000 |   .0036111    .001182     3.05   0.002     .0012943    .0059279
                                      NumOfTourneys |    .027603   .0046801     5.90   0.000     .0184302    .0367759
                                SpreadNumOfTourneys |  -.0001945   .0000797    -2.44   0.015    -.0003507   -.0000383
                                          Favourite |   1.566812   .0574792    27.26   0.000     1.454155    1.679469
                                             Bestof |  -.1760476   .5775278    -0.30   0.760    -1.307981     .955886
                                                    |
                                             series |
                                            ATP500  |  -.2177268   .0769566    -2.83   0.005     -.368559   -.0668946
                                        Grand Slam  |   6.587952   1.154729     5.71   0.000     4.324725    8.851179
                                      Masters 1000  |  -.1322213   .0636915    -2.08   0.038    -.2570543   -.0073883
                                                    |
                                               Year |
                                              2014  |   .0132113   .1024043     0.13   0.897    -.1874973      .21392
                                              2015  |   .1750611   .1020665     1.72   0.086    -.0249856    .3751078
                                              2016  |   .1154712   .1010772     1.14   0.253    -.0826365    .3135789
                                              2017  |   .1550005   .1000298     1.55   0.121    -.0410542    .3510553
                                              2018  |   .3406011    .099737     3.41   0.001     .1451203     .536082
                                              2019  |   .2725252   .0996974     2.73   0.006     .0771218    .4679285
                                              2020  |   .3320167   .1213176     2.74   0.006     .0942384    .5697949
                                              2021  |   .2220665   .1015366     2.19   0.029     .0230585    .4210746
                                                    |
                                              _cons |   10.68619   1.736184     6.15   0.000     7.283333    14.08905
                          --------------------------+----------------------------------------------------------------
                                            sigma_u |          0
                                            sigma_e |  4.5752669
                                                rho |          0   (fraction of variance due to u_i)
                          -------------------------------------------------------------------------------------------
                          
                          . estimates store random
                          
                          . hausman fixed random
                          
                          Note: the rank of the differenced variance matrix (16) does not equal the number of coefficients being tested (17); be sure this is what you expect, or there may be problems computing the test.  Examine the output of
                                  your estimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.
                          
                                           ---- Coefficients ----
                                       |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                                       |     fixed        random       Difference       Std. err.
                          -------------+----------------------------------------------------------------
                          Individual~y |   -.0023609    -.0025504        .0001894        .0001115
                          Individ~1000 |    .0027939     .0036111       -.0008172        .0001972
                          NumOfTourn~s |    .0184153      .027603       -.0091878        .0043927
                          SpreadNumO~s |   -.0002235    -.0001945        -.000029        9.95e-06
                             Favourite |    1.314657     1.566812       -.2521548        .0233317
                                Bestof |   -.0445321    -.1760476        .1315155               .
                                series |
                                    2  |   -.3337837    -.2177268       -.1160569        .0139897
                                    3  |    6.214253     6.587952        -.373699               .
                                    4  |   -.4011294    -.1322213       -.2689081        .0184337
                                  Year |
                                 2014  |   -.0935003     .0132113       -.1067116        .0244246
                                 2015  |    .0329302     .1750611       -.1421308        .0321419
                                 2016  |    -.083932     .1154712       -.1994033        .0363812
                                 2017  |   -.0665706     .1550005       -.2215711        .0407504
                                 2018  |     .067156     .3406011       -.2734451        .0464132
                                 2019  |   -.0680303     .2725252       -.3405555        .0517211
                                 2020  |   -.1585247     .3320167       -.4905414        .0709462
                                 2021  |   -.3222647     .2220665       -.5443312        .0686486
                          ------------------------------------------------------------------------------
                                                    b = Consistent under H0 and Ha; obtained from xtreg.
                                     B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
                          
                          Test of H0: Difference in coefficients not systematic
                          
                             chi2(16) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                      = 350.08
                          Prob > chi2 = 0.0000
                          (V_b-V_B is not positive definite)
                          
                          . hausman fixed random, sigmamore
                          
                          Note: the rank of the differenced variance matrix (16) does not equal the number of coefficients being tested (17); be sure this is what you expect, or there may be problems computing the test.  Examine the output of
                                  your estimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.
                          
                                           ---- Coefficients ----
                                       |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                                       |     fixed        random       Difference       Std. err.
                          -------------+----------------------------------------------------------------
                          Individual~y |   -.0023609    -.0025504        .0001894        .0001168
                          Individ~1000 |    .0027939     .0036111       -.0008172        .0002536
                          NumOfTourn~s |    .0184153      .027603       -.0091878        .0044751
                          SpreadNumO~s |   -.0002235    -.0001945        -.000029        .0000146
                             Favourite |    1.314657     1.566812       -.2521548        .0247497
                                Bestof |   -.0445321    -.1760476        .1315155        .0349149
                                series |
                                    2  |   -.3337837    -.2177268       -.1160569        .0174387
                                    3  |    6.214253     6.587952        -.373699        .0719913
                                    4  |   -.4011294    -.1322213       -.2689081        .0204376
                                  Year |
                                 2014  |   -.0935003     .0132113       -.1067116         .028159
                                 2015  |    .0329302     .1750611       -.1421308        .0351565
                                 2016  |    -.083932     .1154712       -.1994033        .0390904
                                 2017  |   -.0665706     .1550005       -.2215711        .0432122
                                 2018  |     .067156     .3406011       -.2734451        .0486683
                                 2019  |   -.0680303     .2725252       -.3405555        .0538384
                                 2020  |   -.1585247     .3320167       -.4905414        .0733711
                                 2021  |   -.3222647     .2220665       -.5443312        .0705606
                          ------------------------------------------------------------------------------
                                                    b = Consistent under H0 and Ha; obtained from xtreg.
                                     B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
                          
                          Test of H0: Difference in coefficients not systematic
                          
                             chi2(16) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                      = 296.78
                          Prob > chi2 = 0.0000
                          
                          . xttest0
                          
                          Breusch and Pagan Lagrangian multiplier test for random effects
                          
                                  GameswonbyIndividualPlayer[individualplayer,t] = Xb + u[individualplayer] + e[individualplayer,t]
                          
                                  Estimated results:
                                                   |       Var     SD = sqrt(Var)
                                          ---------+-----------------------------
                                         Games~yer |    29.7192       5.451532
                                                 e |   20.93307       4.575267
                                                 u |          0              0
                          
                                  Test: Var(u) = 0
                                                       chibar2(01) =     0.00
                                                    Prob > chibar2 =   1.0000
                          
                          . ssc install xttest3
                          checking xttest3 consistency and verifying not already installed...
                          all files already exist and are up to date.
                          
                          . xtreg GameswonbyIndividualPlayer IndividualHeterogeneity IndividualPrizeSpread1000 NumOfTourneys SpreadNumOfTourneys Favourite Bestof i.series i.Year, fe
                          
                          Fixed-effects (within) regression               Number of obs     =     37,060
                          Group variable: individual~r                    Number of groups  =        654
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.2690                                         min =          1
                               Between = 0.3615                                         avg =       56.7
                               Overall = 0.2812                                         max =        509
                          
                                                                          F(17,36389)       =     787.72
                          corr(u_i, Xb) = 0.0687                          Prob > F          =     0.0000
                          
                          -------------------------------------------------------------------------------------------
                          GameswonbyIndividualPla~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          --------------------------+----------------------------------------------------------------
                            IndividualHeterogeneity |  -.0023609   .0002631    -8.98   0.000    -.0028765   -.0018453
                          IndividualPrizeSpread1000 |   .0027939   .0011984     2.33   0.020      .000445    .0051428
                                      NumOfTourneys |   .0184153   .0064187     2.87   0.004     .0058344    .0309961
                                SpreadNumOfTourneys |  -.0002235   .0000803    -2.78   0.005     -.000381   -.0000661
                                          Favourite |   1.314657   .0620341    21.19   0.000     1.193069    1.436246
                                             Bestof |  -.0445321   .5735238    -0.08   0.938    -1.168656    1.079591
                                                    |
                                             series |
                                            ATP500  |  -.3337837   .0782178    -4.27   0.000     -.487093   -.1804744
                                        Grand Slam  |   6.214253   1.146856     5.42   0.000     3.966382    8.462124
                                      Masters 1000  |  -.4011294   .0663054    -6.05   0.000    -.5310899   -.2711689
                                                    |
                                               Year |
                                              2014  |  -.0935003   .1052767    -0.89   0.374    -.2998458    .1128452
                                              2015  |   .0329302   .1070078     0.31   0.758    -.1768082    .2426687
                                              2016  |   -.083932   .1074253    -0.78   0.435    -.2944888    .1266247
                                              2017  |  -.0665706   .1080118    -0.62   0.538    -.2782768    .1451357
                                              2018  |    .067156   .1100075     0.61   0.542    -.1484619     .282774
                                              2019  |  -.0680303    .112315    -0.61   0.545    -.2881709    .1521103
                                              2020  |  -.1585247   .1405395    -1.13   0.259    -.4339862    .1169367
                                              2021  |  -.3222647   .1225655    -2.63   0.009    -.5624968   -.0820327
                                                    |
                                              _cons |   10.94864   1.725505     6.35   0.000     7.566601    14.33068
                          --------------------------+----------------------------------------------------------------
                                            sigma_u |  2.6007465
                                            sigma_e |  4.5752669
                                                rho |  .24421036   (fraction of variance due to u_i)
                          -------------------------------------------------------------------------------------------
                          F test that all u_i=0: F(653, 36389) = 2.01                  Prob > F = 0.0000
                          
                          . xttest3
                          
                          Modified Wald test for groupwise heteroskedasticity
                          in fixed effect regression model
                          
                          H0: sigma(i)^2 = sigma^2 for all i
                          
                          chi2 (654)  =   6.5e+34
                          Prob>chi2 =      0.0000
                          Code:
                           encode Tournament, g(tournament)
                          
                          . encode Nationality, g(nationality)
                          
                          . encode IndividualPlayer, g(individualplayer)
                          
                          . encode Series, g(series)
                          
                          . encode MatchPlayers, g(matchplayers)
                          
                          . xtset matchplayers
                          
                          Panel variable: matchplayers (unbalanced)
                          
                          . xtreg Totalsumofgameswonpermatch Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe
                          
                          Fixed-effects (within) regression               Number of obs     =     18,530
                          Group variable: matchplayers                    Number of groups  =     13,560
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.3478                                         min =          1
                               Between = 0.3387                                         avg =        1.4
                               Overall = 0.3351                                         max =         15
                          
                                                                          F(14,4956)        =     188.79
                          corr(u_i, Xb) = -0.0068                         Prob > F          =     0.0000
                          
                          ---------------------------------------------------------------------------------
                          Totalsumofgam~h | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          ----------------+----------------------------------------------------------------
                            Heterogeneity |  -.0028484   .0018288    -1.56   0.119    -.0064337    .0007369
                          PrizeSpread1000 |   .0012275    .001061     1.16   0.247    -.0008525    .0033075
                                   Bestof |   1.674422   1.914941     0.87   0.382     -2.07971    5.428553
                                          |
                                   series |
                                  ATP500  |  -.0047427   .3388821    -0.01   0.989    -.6691017    .6596163
                              Grand Slam  |   9.256325   3.829819     2.42   0.016     1.748185    16.76446
                            Masters 1000  |   .0492267   .2919567     0.17   0.866    -.5231377     .621591
                                          |
                                     Year |
                                    2014  |  -.6096555    .461218    -1.32   0.186    -1.513847     .294536
                                    2015  |  -.6740411   .4579201    -1.47   0.141    -1.571767     .223685
                                    2016  |  -1.154098   .4687471    -2.46   0.014     -2.07305   -.2351462
                                    2017  |  -1.317497   .4729697    -2.79   0.005    -2.244727   -.3902666
                                    2018  |  -.9895531    .498714    -1.98   0.047    -1.967253   -.0118529
                                    2019  |  -.8223668    .512864    -1.60   0.109    -1.827807    .1830737
                                    2020  |  -1.443851   .6389287    -2.26   0.024    -2.696434    -.191268
                                    2021  |  -1.721374   .6231108    -2.76   0.006    -2.942947   -.4998006
                                          |
                                    _cons |   19.04583   5.757251     3.31   0.001     7.759072     30.3326
                          ----------------+----------------------------------------------------------------
                                  sigma_u |   7.078819
                                  sigma_e |  7.3292935
                                      rho |  .48262098   (fraction of variance due to u_i)
                          ---------------------------------------------------------------------------------
                          F test that all u_i=0: F(13559, 4956) = 1.08                 Prob > F = 0.0003
                          
                          . estimates store fixed
                          
                          . xtreg Totalsumofgameswonpermatch Heterogeneity PrizeSpread1000 Bestof i.series i.Year, re
                          
                          Random-effects GLS regression                   Number of obs     =     18,530
                          Group variable: matchplayers                    Number of groups  =     13,560
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.3450                                         min =          1
                               Between = 0.3456                                         avg =        1.4
                               Overall = 0.3400                                         max =         15
                          
                                                                          Wald chi2(14)     =    9578.12
                          corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                          
                          ---------------------------------------------------------------------------------
                          Totalsumofgam~h | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                          ----------------+----------------------------------------------------------------
                            Heterogeneity |  -.0029592   .0005384    -5.50   0.000    -.0040144   -.0019041
                          PrizeSpread1000 |   .0013567   .0008093     1.68   0.094    -.0002296    .0029429
                                   Bestof |  -.3231794   1.331626    -0.24   0.808    -2.933119    2.286761
                                          |
                                   series |
                                  ATP500  |  -.3779085    .177292    -2.13   0.033    -.7253944   -.0304226
                              Grand Slam  |   13.13855   2.662544     4.93   0.000     7.920055    18.35704
                            Masters 1000  |  -.2238654   .1468021    -1.52   0.127    -.5115923    .0638615
                                          |
                                     Year |
                                    2014  |   .0180459     .23667     0.08   0.939    -.4458188    .4819106
                                    2015  |   .3838133   .2358749     1.63   0.104     -.078493    .8461197
                                    2016  |   .2445954   .2339697     1.05   0.296    -.2139768    .7031676
                                    2017  |   .3665561   .2313251     1.58   0.113    -.0868329     .819945
                                    2018  |   .7213323   .2306617     3.13   0.002     .2692437    1.173421
                                    2019  |    .598253    .229887     2.60   0.009     .1476827    1.048823
                                    2020  |   .3789206   .2746955     1.38   0.168    -.1594728    .9173139
                                    2021  |   .4050027   .2353402     1.72   0.085    -.0562556    .8662611
                                          |
                                    _cons |    23.8909   3.998841     5.97   0.000     16.05332    31.72849
                          ----------------+----------------------------------------------------------------
                                  sigma_u |  1.7279101
                                  sigma_e |  7.3292935
                                      rho |  .05265346   (fraction of variance due to u_i)
                          ---------------------------------------------------------------------------------
                          
                          . estimates store random
                          
                          . hausman fixed random
                          
                                           ---- Coefficients ----
                                       |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                                       |     fixed        random       Difference       Std. err.
                          -------------+----------------------------------------------------------------
                          Heterogene~y |   -.0028484    -.0029592        .0001108        .0017478
                          PrizeSp~1000 |    .0012275     .0013567       -.0001291        .0006861
                                Bestof |    1.674422    -.3231794        1.997601        1.376143
                                series |
                                    2  |   -.0047427    -.3779085        .3731658        .2888056
                                    3  |    9.256325     13.13855       -3.882221        2.752883
                                    4  |    .0492267    -.2238654        .2730921        .2523645
                                  Year |
                                 2014  |   -.6096555     .0180459       -.6277014        .3958653
                                 2015  |   -.6740411     .3838133       -1.057854        .3924969
                                 2016  |   -1.154098     .2445954       -1.398694        .4061798
                                 2017  |   -1.317497     .3665561       -1.684053        .4125397
                                 2018  |   -.9895531     .7213323       -1.710885        .4421661
                                 2019  |   -.8223668      .598253        -1.42062        .4584555
                                 2020  |   -1.443851     .3789206       -1.822772        .5768642
                                 2021  |   -1.721374     .4050027       -2.126376        .5769593
                          ------------------------------------------------------------------------------
                                                    b = Consistent under H0 and Ha; obtained from xtreg.
                                     B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
                          
                          Test of H0: Difference in coefficients not systematic
                          
                             chi2(14) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                      =  28.18
                          Prob > chi2 = 0.0135
                          
                          . hausman fixed random, sigmamore
                          
                                           ---- Coefficients ----
                                       |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                                       |     fixed        random       Difference       Std. err.
                          -------------+----------------------------------------------------------------
                          Heterogene~y |   -.0028484    -.0029592        .0001108        .0017517
                          PrizeSp~1000 |    .0012275     .0013567       -.0001291        .0006894
                                Bestof |    1.674422    -.3231794        1.997601        1.381579
                                series |
                                    2  |   -.0047427    -.3779085        .3731658        .2896172
                                    3  |    9.256325     13.13855       -3.882221        2.763753
                                    4  |    .0492267    -.2238654        .2730921         .253054
                                  Year |
                                 2014  |   -.6096555     .0180459       -.6277014        .3969622
                                 2015  |   -.6740411     .3838133       -1.057854        .3935874
                                 2016  |   -1.154098     .2445954       -1.398694         .407284
                                 2017  |   -1.317497     .3665561       -1.684053        .4136466
                                 2018  |   -.9895531     .7213323       -1.710885        .4433143
                                 2019  |   -.8223668      .598253        -1.42062        .4596267
                                 2020  |   -1.443851     .3789206       -1.822772        .5783089
                                 2021  |   -1.721374     .4050027       -2.126376        .5783332
                          ------------------------------------------------------------------------------
                                                    b = Consistent under H0 and Ha; obtained from xtreg.
                                     B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
                          
                          Test of H0: Difference in coefficients not systematic
                          
                             chi2(14) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                      =  28.03
                          Prob > chi2 = 0.0141
                          
                          . xttest0
                          
                          Breusch and Pagan Lagrangian multiplier test for random effects
                          
                                  Totalsumofgameswonpermatch[matchplayers,t] = Xb + u[matchplayers] + e[matchplayers,t]
                          
                                  Estimated results:
                                                   |       Var     SD = sqrt(Var)
                                          ---------+-----------------------------
                                         Totalsu~h |   86.30302       9.289942
                                                 e |   53.71854       7.329293
                                                 u |   2.985673        1.72791
                          
                                  Test: Var(u) = 0
                                                       chibar2(01) =    60.78
                                                    Prob > chibar2 =   0.0000
                          
                          . ssc install xttest3
                          checking xttest3 consistency and verifying not already installed...
                          all files already exist and are up to date.
                          
                          . xtreg Totalsumofgameswonpermatch Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe
                          
                          Fixed-effects (within) regression               Number of obs     =     18,530
                          Group variable: matchplayers                    Number of groups  =     13,560
                          
                          R-squared:                                      Obs per group:
                               Within  = 0.3478                                         min =          1
                               Between = 0.3387                                         avg =        1.4
                               Overall = 0.3351                                         max =         15
                          
                                                                          F(14,4956)        =     188.79
                          corr(u_i, Xb) = -0.0068                         Prob > F          =     0.0000
                          
                          ---------------------------------------------------------------------------------
                          Totalsumofgam~h | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                          ----------------+----------------------------------------------------------------
                            Heterogeneity |  -.0028484   .0018288    -1.56   0.119    -.0064337    .0007369
                          PrizeSpread1000 |   .0012275    .001061     1.16   0.247    -.0008525    .0033075
                                   Bestof |   1.674422   1.914941     0.87   0.382     -2.07971    5.428553
                                          |
                                   series |
                                  ATP500  |  -.0047427   .3388821    -0.01   0.989    -.6691017    .6596163
                              Grand Slam  |   9.256325   3.829819     2.42   0.016     1.748185    16.76446
                            Masters 1000  |   .0492267   .2919567     0.17   0.866    -.5231377     .621591
                                          |
                                     Year |
                                    2014  |  -.6096555    .461218    -1.32   0.186    -1.513847     .294536
                                    2015  |  -.6740411   .4579201    -1.47   0.141    -1.571767     .223685
                                    2016  |  -1.154098   .4687471    -2.46   0.014     -2.07305   -.2351462
                                    2017  |  -1.317497   .4729697    -2.79   0.005    -2.244727   -.3902666
                                    2018  |  -.9895531    .498714    -1.98   0.047    -1.967253   -.0118529
                                    2019  |  -.8223668    .512864    -1.60   0.109    -1.827807    .1830737
                                    2020  |  -1.443851   .6389287    -2.26   0.024    -2.696434    -.191268
                                    2021  |  -1.721374   .6231108    -2.76   0.006    -2.942947   -.4998006
                                          |
                                    _cons |   19.04583   5.757251     3.31   0.001     7.759072     30.3326
                          ----------------+----------------------------------------------------------------
                                  sigma_u |   7.078819
                                  sigma_e |  7.3292935
                                      rho |  .48262098   (fraction of variance due to u_i)
                          ---------------------------------------------------------------------------------
                          F test that all u_i=0: F(13559, 4956) = 1.08                 Prob > F = 0.0003
                          
                          . xttest3
                          
                          Modified Wald test for groupwise heteroskedasticity
                          in fixed effect regression model
                          
                          H0: sigma(i)^2 = sigma^2 for all i
                          
                          chi2 (13560)  = 1.1e+36
                          Prob>chi2 =      0.0000

                          Comment


                          • #43
                            Originally posted by Carlo Lazzaro View Post
                            Luca:
                            3) pooled OLS is a multivariable OLS with clustered standard errors at -panelid- level;
                            1) you can check them with pooled OLS or -re-;
                            2) fine with that if reported in the literature.
                            One more code:

                            Code:
                            . encode Tournament, g(tournament)
                            
                            . encode Nationality, g(nationality)
                            
                            . encode IndividualPlayer, g(individualplayer)
                            
                            . encode Series, g(series)
                            
                            . encode MatchPlayers, g(matchplayers)
                            
                            . xtset individualplayer
                            
                            Panel variable: individualplayer (unbalanced)
                            
                            . xtreg DiffIngameswonbyFavandUnd Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe
                            
                            Fixed-effects (within) regression               Number of obs     =     18,530
                            Group variable: individual~r                    Number of groups  =        367
                            
                            R-squared:                                      Obs per group:
                                 Within  = 0.0477                                         min =          1
                                 Between = 0.0004                                         avg =       50.5
                                 Overall = 0.0339                                         max =        493
                            
                                                                            F(14,18149)       =      64.98
                            corr(u_i, Xb) = -0.0969                         Prob > F          =     0.0000
                            
                            ---------------------------------------------------------------------------------
                            DiffIngameswo~d | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                            ----------------+----------------------------------------------------------------
                              Heterogeneity |   .0067286    .000366    18.38   0.000     .0060112     .007446
                            PrizeSpread1000 |  -.0044263   .0005463    -8.10   0.000    -.0054971   -.0033554
                                     Bestof |   1.351407   .8916107     1.52   0.130    -.3962348    3.099048
                                            |
                                     series |
                                    ATP500  |  -.3775258   .1219053    -3.10   0.002    -.6164718   -.1385798
                                Grand Slam  |  -.9808101     1.7831    -0.55   0.582    -4.475855    2.514234
                              Masters 1000  |  -.3395359   .1031708    -3.29   0.001    -.5417604   -.1373114
                                            |
                                       Year |
                                      2014  |  -.0525744   .1638633    -0.32   0.748    -.3737621    .2686133
                                      2015  |   .1385333   .1671947     0.83   0.407    -.1891841    .4662508
                                      2016  |  -.1340997   .1684127    -0.80   0.426    -.4642046    .1960053
                                      2017  |  -.4425871   .1690888    -2.62   0.009    -.7740171   -.1111572
                                      2018  |  -.4306342   .1730089    -2.49   0.013    -.7697481   -.0915204
                                      2019  |  -.7240737   .1765527    -4.10   0.000    -1.070134   -.3780138
                                      2020  |  -.6243809   .2112932    -2.96   0.003    -1.038536   -.2102262
                                      2021  |  -.6980748   .1933546    -3.61   0.000    -1.077068   -.3190813
                                            |
                                      _cons |  -2.341599    2.67739    -0.87   0.382    -7.589538     2.90634
                            ----------------+----------------------------------------------------------------
                                    sigma_u |  3.2101967
                                    sigma_e |  5.0243405
                                        rho |  .28988884   (fraction of variance due to u_i)
                            ---------------------------------------------------------------------------------
                            F test that all u_i=0: F(366, 18149) = 5.14                  Prob > F = 0.0000
                            
                            . estimates store fixed
                            
                            . xtreg DiffIngameswonbyFavandUnd Heterogeneity PrizeSpread1000 Bestof i.series i.Year, re
                            
                            Random-effects GLS regression                   Number of obs     =     18,530
                            Group variable: individual~r                    Number of groups  =        367
                            
                            R-squared:                                      Obs per group:
                                 Within  = 0.0476                                         min =          1
                                 Between = 0.0009                                         avg =       50.5
                                 Overall = 0.0353                                         max =        493
                            
                                                                            Wald chi2(14)     =     881.04
                            corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
                            
                            ---------------------------------------------------------------------------------
                            DiffIngameswo~d | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                            ----------------+----------------------------------------------------------------
                              Heterogeneity |   .0065557   .0003609    18.16   0.000     .0058483    .0072631
                            PrizeSpread1000 |  -.0041721   .0005455    -7.65   0.000    -.0052412   -.0031029
                                     Bestof |   1.296934   .8915097     1.45   0.146    -.4503932     3.04426
                                            |
                                     series |
                                    ATP500  |  -.2971972   .1211109    -2.45   0.014    -.5345703   -.0598242
                                Grand Slam  |   -.828509   1.782848    -0.46   0.642    -4.322826    2.665808
                              Masters 1000  |  -.2362592   .1022965    -2.31   0.021    -.4367565   -.0357618
                                            |
                                       Year |
                                      2014  |  -.0181109   .1615341    -0.11   0.911    -.3347118      .29849
                                      2015  |   .2027717   .1637222     1.24   0.216     -.118118    .5236613
                                      2016  |  -.0812475   .1640359    -0.50   0.620     -.402752    .2402569
                                      2017  |  -.3550785   .1641142    -2.16   0.030    -.6767363   -.0334206
                                      2018  |   -.347249   .1667316    -2.08   0.037     -.674037   -.0204611
                                      2019  |  -.6084672    .169118    -3.60   0.000    -.9399324   -.2770021
                                      2020  |  -.4684134   .2016972    -2.32   0.020    -.8637327    -.073094
                                      2021  |  -.5058561   .1801663    -2.81   0.005    -.8589756   -.1527367
                                            |
                                      _cons |  -3.276753   2.678904    -1.22   0.221    -8.527307    1.973802
                            ----------------+----------------------------------------------------------------
                                    sigma_u |  1.4537897
                                    sigma_e |  5.0243405
                                        rho |  .07725503   (fraction of variance due to u_i)
                            ---------------------------------------------------------------------------------
                            
                            . estimates store random
                            
                            . hausman fixed random
                            
                                             ---- Coefficients ----
                                         |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                                         |     fixed        random       Difference       Std. err.
                            -------------+----------------------------------------------------------------
                            Heterogene~y |    .0067286     .0065557        .0001729        .0000606
                            PrizeSp~1000 |   -.0044263    -.0041721       -.0002542        .0000303
                                  Bestof |    1.351407     1.296934         .054473         .013424
                                  series |
                                      2  |   -.3775258    -.2971972       -.0803286        .0138944
                                      3  |   -.9808101     -.828509       -.1523011         .029979
                                      4  |   -.3395359    -.2362592       -.1032767        .0134032
                                    Year |
                                   2014  |   -.0525744    -.0181109       -.0344635        .0275308
                                   2015  |    .1385333     .2027717       -.0642383        .0338985
                                   2016  |   -.1340997    -.0812475       -.0528521        .0381455
                                   2017  |   -.4425871    -.3550785       -.0875087         .040713
                                   2018  |   -.4306342     -.347249       -.0833852        .0461808
                                   2019  |   -.7240737    -.6084672       -.1156065        .0506946
                                   2020  |   -.6243809    -.4684134       -.1559675        .0629527
                                   2021  |   -.6980748    -.5058561       -.1922186        .0701864
                            ------------------------------------------------------------------------------
                                                      b = Consistent under H0 and Ha; obtained from xtreg.
                                       B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
                            
                            Test of H0: Difference in coefficients not systematic
                            
                               chi2(14) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                        = 125.42
                            Prob > chi2 = 0.0000
                            
                            . hausman fixed random, sigmamore
                            
                                             ---- Coefficients ----
                                         |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                                         |     fixed        random       Difference       Std. err.
                            -------------+----------------------------------------------------------------
                            Heterogene~y |    .0067286     .0065557        .0001729         .000061
                            PrizeSp~1000 |   -.0044263    -.0041721       -.0002542        .0000321
                                  Bestof |    1.351407     1.296934         .054473        .0221359
                                  series |
                                      2  |   -.3775258    -.2971972       -.0803286        .0141012
                                      3  |   -.9808101     -.828509       -.1523011        .0462358
                                      4  |   -.3395359    -.2362592       -.1032767         .013557
                                    Year |
                                   2014  |   -.0525744    -.0181109       -.0344635        .0277202
                                   2015  |    .1385333     .2027717       -.0642383        .0340588
                                   2016  |   -.1340997    -.0812475       -.0528521        .0382901
                                   2017  |   -.4425871    -.3550785       -.0875087        .0408496
                                   2018  |   -.4306342     -.347249       -.0833852        .0463069
                                   2019  |   -.7240737    -.6084672       -.1156065        .0508143
                                   2020  |   -.6243809    -.4684134       -.1559675        .0630908
                                   2021  |   -.6980748    -.5058561       -.1922186        .0702901
                            ------------------------------------------------------------------------------
                                                      b = Consistent under H0 and Ha; obtained from xtreg.
                                       B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
                            
                            Test of H0: Difference in coefficients not systematic
                            
                               chi2(14) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                        = 118.87
                            Prob > chi2 = 0.0000
                            
                            . xttest0
                            
                            Breusch and Pagan Lagrangian multiplier test for random effects
                            
                                    DiffIngameswonbyFavandUnd[individualplayer,t] = Xb + u[individualplayer] + e[individualplayer,t]
                            
                                    Estimated results:
                                                     |       Var     SD = sqrt(Var)
                                            ---------+-----------------------------
                                           DiffIng~d |   28.57526       5.345583
                                                   e |     25.244        5.02434
                                                   u |   2.113505        1.45379
                            
                                    Test: Var(u) = 0
                                                         chibar2(01) = 11938.58
                                                      Prob > chibar2 =   0.0000
                            
                            . ssc install xttest3
                            checking xttest3 consistency and verifying not already installed...
                            all files already exist and are up to date.
                            
                            . xtreg DiffIngameswonbyFavandUnd Heterogeneity PrizeSpread1000 Bestof i.series i.Year, fe
                            
                            Fixed-effects (within) regression               Number of obs     =     18,530
                            Group variable: individual~r                    Number of groups  =        367
                            
                            R-squared:                                      Obs per group:
                                 Within  = 0.0477                                         min =          1
                                 Between = 0.0004                                         avg =       50.5
                                 Overall = 0.0339                                         max =        493
                            
                                                                            F(14,18149)       =      64.98
                            corr(u_i, Xb) = -0.0969                         Prob > F          =     0.0000
                            
                            ---------------------------------------------------------------------------------
                            DiffIngameswo~d | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                            ----------------+----------------------------------------------------------------
                              Heterogeneity |   .0067286    .000366    18.38   0.000     .0060112     .007446
                            PrizeSpread1000 |  -.0044263   .0005463    -8.10   0.000    -.0054971   -.0033554
                                     Bestof |   1.351407   .8916107     1.52   0.130    -.3962348    3.099048
                                            |
                                     series |
                                    ATP500  |  -.3775258   .1219053    -3.10   0.002    -.6164718   -.1385798
                                Grand Slam  |  -.9808101     1.7831    -0.55   0.582    -4.475855    2.514234
                              Masters 1000  |  -.3395359   .1031708    -3.29   0.001    -.5417604   -.1373114
                                            |
                                       Year |
                                      2014  |  -.0525744   .1638633    -0.32   0.748    -.3737621    .2686133
                                      2015  |   .1385333   .1671947     0.83   0.407    -.1891841    .4662508
                                      2016  |  -.1340997   .1684127    -0.80   0.426    -.4642046    .1960053
                                      2017  |  -.4425871   .1690888    -2.62   0.009    -.7740171   -.1111572
                                      2018  |  -.4306342   .1730089    -2.49   0.013    -.7697481   -.0915204
                                      2019  |  -.7240737   .1765527    -4.10   0.000    -1.070134   -.3780138
                                      2020  |  -.6243809   .2112932    -2.96   0.003    -1.038536   -.2102262
                                      2021  |  -.6980748   .1933546    -3.61   0.000    -1.077068   -.3190813
                                            |
                                      _cons |  -2.341599    2.67739    -0.87   0.382    -7.589538     2.90634
                            ----------------+----------------------------------------------------------------
                                    sigma_u |  3.2101967
                                    sigma_e |  5.0243405
                                        rho |  .28988884   (fraction of variance due to u_i)
                            ---------------------------------------------------------------------------------
                            F test that all u_i=0: F(366, 18149) = 5.14                  Prob > F = 0.0000
                            
                            . xttest3
                            
                            Modified Wald test for groupwise heteroskedasticity
                            in fixed effect regression model
                            
                            H0: sigma(i)^2 = sigma^2 for all i
                            
                            chi2 (367)  =   4.2e+34
                            Prob>chi2 =      0.0000
                            Pooled OLS should be used, right?

                            Comment


                            • #44
                              Luca:
                              what does make you think that pooled OLS is the way to go?
                              In addition, generating codes over codes won't take you anywhere far.
                              Try to focus on a data generating process and expand on it.
                              An an aside, your staying with default standard errord it too optimistic and probably misleading.
                              Kind regards,
                              Carlo
                              (Stata 18.0 SE)

                              Comment


                              • #45
                                Originally posted by Carlo Lazzaro View Post
                                Luca:
                                what does make you think that pooled OLS is the way to go?
                                In addition, generating codes over codes won't take you anywhere far.
                                Try to focus on a data generating process and expand on it.
                                An an aside, your staying with default standard errord it too optimistic and probably misleading.
                                sigma e>sigma u
                                Those codes are different regressions I SHOULD run to research different things in my project.
                                those codes are testing whether I should use FE or POLS. I might use different std erros as we did before.

                                Comment

                                Working...
                                X