Announcement

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

  • #16
    I'm trying to identify the impact of government policy to market shares liquidity

    Comment


    • #17
      I'm trying to identify the impact of government policy on market shares liquidity

      Comment


      • #18
        Akhzan:
        1) -testparm- (that returns -chi2- instead of -F-) was conceived to test the joint statistical signbiifcance of categorical variables (e.g., -i.year-);
        2) see the hopefully helpful following toy-example:
        Code:
        . use "https://www.stata-press.com/data/r17/grunfeld.dta"
        
        . xtset company year
        
        Panel variable: company (strongly balanced)
         Time variable: year, 1935 to 1954
                 Delta: 1 year
        
        . xtgls invest i.year i.company mvalue kstock
        
        Cross-sectional time-series FGLS regression
        
        Coefficients:  generalized least squares
        Panels:        homoskedastic
        Correlation:   no autocorrelation
        
        Estimated covariances      =         1          Number of obs     =        200
        Estimated autocorrelations =         0          Number of groups  =         10
        Estimated coefficients     =        31          Time periods      =         20
                                                        Wald chi2(30)     =    3940.22
        Log likelihood             = -1056.132          Prob > chi2       =     0.0000
        
        ------------------------------------------------------------------------------
              invest | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
        -------------+----------------------------------------------------------------
                year |
               1936  |  -19.19741   21.76377    -0.88   0.378    -61.85361     23.4588
               1937  |  -40.69001   22.70098    -1.79   0.073    -85.18311    3.803096
               1938  |   -39.2264   21.35937    -1.84   0.066    -81.09001      2.6372
               1939  |  -69.47029   21.74558    -3.19   0.001    -112.0908   -26.84973
               1940  |  -44.23507   21.88689    -2.02   0.043    -87.13258   -1.337565
               1941  |  -18.80446   21.78044    -0.86   0.388    -61.49335    23.88442
               1942  |  -21.13979    21.4933    -0.98   0.325    -63.26589     20.9863
               1943  |  -42.97762   21.65071    -1.99   0.047    -85.41223   -.5430099
               1944  |  -43.09876   21.70341    -1.99   0.047    -85.63666   -.5608657
               1945  |  -55.68303   21.96578    -2.53   0.011    -98.73516    -12.6309
               1946  |  -31.16928   22.16835    -1.41   0.160    -74.61845    12.27988
               1947  |  -39.39223   21.86288    -1.80   0.072     -82.2427    3.458228
               1948  |  -43.71651   22.03384    -1.98   0.047    -86.90204   -.5309879
               1949  |   -73.4951   22.22988    -3.31   0.001    -117.0649   -29.92534
               1950  |  -75.89611   22.37935    -3.39   0.001    -119.7588   -32.03338
               1951  |   -62.4809   22.85619    -2.73   0.006    -107.2782    -17.6836
               1952  |  -64.63233   23.30225    -2.77   0.006    -110.3039   -18.96077
               1953  |  -67.71796   24.46194    -2.77   0.006    -115.6625   -19.77343
               1954  |  -93.52622    24.9186    -3.75   0.000    -142.3658   -44.68666
                     |
             company |
                  2  |   207.0542   32.33215     6.40   0.000     143.6844    270.4241
                  3  |  -135.2308   32.82507    -4.12   0.000    -199.5668   -70.89486
                  4  |    95.3538   46.62574     2.05   0.041     3.969043    186.7386
                  5  |  -5.438636   53.16006    -0.10   0.919    -109.6304    98.75316
                  6  |   102.8886   49.79873     2.07   0.039     5.284886    200.4923
                  7  |   51.46657    53.4806     0.96   0.336    -53.35347    156.2866
                  8  |   67.49048   46.85445     1.44   0.150    -24.34256    159.3235
                  9  |   30.21752   51.22281     0.59   0.555    -70.17734    130.6124
                 10  |   126.8371   53.79886     2.36   0.018     21.39324    232.2809
                     |
              mvalue |   .1177158   .0126407     9.31   0.000     .0929405    .1424912
              kstock |   .3579163   .0208842    17.14   0.000      .316984    .3988485
               _cons |  -86.90019   51.52024    -1.69   0.092     -187.878    14.07762
        ------------------------------------------------------------------------------
        
        
        . testparm i.year
        
         ( 1)  1936.year = 0
         ( 2)  1937.year = 0
         ( 3)  1938.year = 0
         ( 4)  1939.year = 0
         ( 5)  1940.year = 0
         ( 6)  1941.year = 0
         ( 7)  1942.year = 0
         ( 8)  1943.year = 0
         ( 9)  1944.year = 0
         (10)  1945.year = 0
         (11)  1946.year = 0
         (12)  1947.year = 0
         (13)  1948.year = 0
         (14)  1949.year = 0
         (15)  1950.year = 0
         (16)  1951.year = 0
         (17)  1952.year = 0
         (18)  1953.year = 0
         (19)  1954.year = 0
        
                   chi2( 19) =   31.55
                 Prob > chi2 =    0.0351
        
        . testparm i.company
        
         ( 1)  2.company = 0
         ( 2)  3.company = 0
         ( 3)  4.company = 0
         ( 4)  5.company = 0
         ( 5)  6.company = 0
         ( 6)  7.company = 0
         ( 7)  8.company = 0
         ( 8)  9.company = 0
         ( 9)  10.company = 0
        
                   chi2(  9) =  557.71
                 Prob > chi2 =    0.0000
        
        .
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #19
          I think the case is different with mine

          Comment


          • #20
            Kindly need your help..
            can I have step by step procedure to running my data in stata please? mine is panel data set, T>N, predictors were denoted dummies.
            after -xtset- command, I thought I should determine which estimation model best for my data (common effect, fixed effect, or random effect), so I need to perform hausman test
            since I'm dealing with T>N dataset, so I have to use -xtregar- or -xtgls- right?
            xtregar y x, fe
            xtregar y x, re
            estimates store fe
            estimates store fe
            hausman fe re

            is that right? because the result of hausman test was kind of strange:

            ---- Coefficients ----
            | (b) (B) (b-B) sqrt(diag(V_b-V_B))
            | fe re Difference Std. err.
            -------------+----------------------------------------------------------------
            psbb | .0180501 .0180501 0 0
            psbbt | .1706298 .1706298 0 0
            ppkm | .2054497 .2054497 0 0
            ppkmm | .042229 .042229 0 0
            vaccine | .0501037 .0501037 0 0
            c1 | 2.299816 2.299816 0 0
            c2 | .2397661 .2397661 0 0
            c3 | 2.595502 2.595502 0 0
            c4 | 1.249913 1.249913 0 0
            c5_ | 9.49e-06 9.49e-06 0 0
            ------------------------------------------------------------------------------
            b = Consistent under H0 and Ha; obtained from xtregar.
            B = Inconsistent under Ha, efficient under H0; obtained from xtregar.

            Test of H0: Difference in coefficients not systematic

            chi2(0) = (b-B)'[(V_b-V_B)^(-1)](b-B)
            = 0.00
            Prob > chi2 = .
            (V_b-V_B is not positive definite)

            I've tried using hausman fe re, sigmamore but the result is just the same
            when I used stata 17, its work by using sigmamore..

            help me please

            Best regards,
            Akhzan

            Comment


            • #21
              Oh I'm really sorry.. the sequence of my command was wrong.. I think that's why the output is kind of strange
              I just realized that I have to -est store fe- right after running the -xtreg , fe- command (what I did before: -xtreg,fe- -xtreg,re- -est store fe- -est store re- )

              but because my data is T>N so I have to use -xtregar- right?

              now: -xtregar,fe- -est store fe- -xtregar,re- -est store re- -hasuman fe re-

              the result of hausman test: used random effect

              so can I use the output from -xtregar,re- instead of -xtgls- ?
              but the value of coef and P > |z| is different to the previously suggestion you gave: -xtgls i.firm i.time, panels(hetero)


              Kindly need your help

              Thank you
              Best regards,
              Akhzan

              Comment


              • #22
                duplicate posting
                Last edited by akhzan fasti; 19 Jun 2023, 17:52.

                Comment


                • #23
                  here is the output from stata:
                  Code:
                   . xtregar turn psbb psbbt ppkm ppkmm ppkmd vaccine c1 c2 c3 c4 c5_, re
                  note: ppkmd omitted because of collinearity.
                  
                  RE GLS regression with AR(1) disturbances       Number of obs     =     12,274
                  Group variable: shares_                         Number of groups  =         38
                  
                  R-squared:                                      Obs per group:
                       Within  = 0.1819                                         min =        323
                       Between = 0.3049                                         avg =      323.0
                       Overall = 0.1609                                         max =        323
                  
                                                                  Wald chi2(11)     =    1977.13
                  corr(u_i, Xb) = 0 (assumed)                     Prob > chi2       =     0.0000
                  
                  ------------------------------------------------------------------------------
                          turn | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                  -------------+----------------------------------------------------------------
                          psbb |   .0180501     .05001     0.36   0.718    -.0799677    .1160678
                         psbbt |   .1706298   .0449321     3.80   0.000     .0825645    .2586952
                          ppkm |   .2054497   .0300301     6.84   0.000     .1465918    .2643075
                         ppkmm |    .042229   .0218882     1.93   0.054     -.000671     .085129
                         ppkmd |          0  (omitted)
                       vaccine |   .0501037   .0402013     1.25   0.213    -.0286895    .1288968
                            c1 |   2.299816   .0588494    39.08   0.000     2.184474    2.415159
                            c2 |   .2397661   .0410236     5.84   0.000     .1593614    .3201709
                            c3 |   2.595502   .0637002    40.75   0.000     2.470651    2.720352
                            c4 |   1.249913   .1782048     7.01   0.000      .900638    1.599188
                           c5_ |   9.49e-06   4.30e-06     2.21   0.027     1.07e-06    .0000179
                         _cons |   .0451632    .059782     0.76   0.450    -.0720075    .1623338
                  -------------+----------------------------------------------------------------
                        rho_ar |  .59212034   (estimated autocorrelation coefficient)
                       sigma_u |  .23459185
                       sigma_e |  .28530424
                       rho_fov |  .40337602   (fraction of variance due to u_i)
                         theta |  .83704245
                  ------------------------------------------------------------------------------

                  Comment


                  • #24
                    and below is the output of your previous suggestion: -xtgls i.firm i.time, panels(hetero)
                    Code:
                     . xtgls turn psbb psbbt ppkm ppkmm ppkmd vaccine c1 c2 c3 c4 c5_ i.shares_ i.index, panels(
                    > hetero)
                    note: ppkmd omitted because of collinearity.
                    note: 177.index omitted because of collinearity.
                    note: 179.index omitted because of collinearity.
                    note: 198.index omitted because of collinearity.
                    note: 294.index omitted because of collinearity.
                    note: 323.index omitted because of collinearity.
                    
                    Cross-sectional time-series FGLS regression
                    
                    Coefficients: generalized least squares
                    Panels: heteroskedastic
                    Correlation: no autocorrelation
                    
                    Estimated covariances = 38 Number of obs = 12,274
                    Estimated autocorrelations = 0 Number of groups = 38
                    Estimated coefficients = 365 Time periods = 323
                    Wald chi2(364) = 9245.41
                    Prob > chi2 = 0.0000
                    
                    ------------------------------------------------------------------------------
                    turn | Coefficient Std. err. z P>|z| [95% conf. interval]
                    -------------+----------------------------------------------------------------
                    psbb | -.2479266 .0594537 -4.17 0.000 -.3644537 -.1313995
                    psbbt | -.026166 .0592532 -0.44 0.659 -.1423001 .089968
                    ppkm | .0214051 .0418949 0.51 0.609 -.0607074 .1035177
                    ppkmm | -.0101935 .0418732 -0.24 0.808 -.0922634 .0718764
                    ppkmd | 0 (omitted)
                    vaccine | -.1386944 .0418823 -3.31 0.001 -.2207823 -.0566065
                    c1 | .7095683 .0819241 8.66 0.000 .5489999 .8701366
                    c2 | .4140268 .0778993 5.31 0.000 .2613469 .5667066
                    c3 | 3.519221 .107323 32.79 0.000 3.308872 3.72957
                    c4 | 3.276047 .1968756 16.64 0.000 2.890178 3.661916
                    c5_ | 3.99e-06 1.62e-06 2.47 0.014 8.19e-07 7.17e-06
                    |
                    shares_ |
                    ADRO | .1567459 .0161576 9.70 0.000 .1250775 .1884142
                    AKRA | .3456302 .0207402 16.66 0.000 .3049801 .3862802
                    ANTM | 1.012777 .0671048 15.09 0.000 .8812538 1.1443
                    ASII | .0214949 .0151069 1.42 0.155 -.0081141 .0511039
                    BBCA | -.0099883 .015475 -0.65 0.519 -.0403187 .0203422
                    BBNI | .138481 .01464 9.46 0.000 .1097872 .1671749
                    BBRI | .0198876 .0154591 1.29 0.198 -.0104117 .050187
                    BBTN | .5195307 .0317877 16.34 0.000 .4572279 .5818336
                    BMRI | .0077437 .0150455 0.51 0.607 -.0217449 .0372323
                    BSDE | .0653923 .017743 3.69 0.000 .0306166 .100168
                    CPIN | -.0736912 .0158706 -4.64 0.000 -.1047971 -.0425853
                    ERAA | .5936801 .0293711 20.21 0.000 .5361138 .6512463
                    EXCL | .1669658 .0195904 8.52 0.000 .1285692 .2053623
                    GGRM | -.0015971 .0153077 -0.10 0.917 -.0315997 .0284055
                    HMSP | -.0428279 .0149413 -2.87 0.004 -.0721122 -.0135435
                    ICBP | .0125827 .0149878 0.84 0.401 -.0167928 .0419583
                    INCO | .0824822 .0159414 5.17 0.000 .0512376 .1137268
                    INDF | .0415381 .0145644 2.85 0.004 .0129924 .0700837
                    INKP | -.0123269 .0171191 -0.72 0.471 -.0458797 .0212259
                    INTP | -.0282624 .0157945 -1.79 0.074 -.0592191 .0026943
                    ITMG | .2074761 .0165942 12.50 0.000 .174952 .2400002
                    JPFA | .1200102 .0171412 7.00 0.000 .0864141 .1536062
                    JSMR | .0193347 .0158455 1.22 0.222 -.0117219 .0503914
                    KLBF | -.0007882 .0154051 -0.05 0.959 -.0309818 .0294053
                    MNCN | .3866137 .0227472 17.00 0.000 .3420299 .4311974
                    PGAS | .5244284 .0269931 19.43 0.000 .471523 .5773338
                    PTBA | .2784275 .0197414 14.10 0.000 .239735 .3171199
                    PTPP | .6950868 .0370324 18.77 0.000 .6225047 .7676689
                    PWON | .07405 .0176472 4.20 0.000 .0394622 .1086379
                    SMGR | -.0403054 .0163978 -2.46 0.014 -.0724446 -.0081662
                    TBIG | .0778167 .0194161 4.01 0.000 .0397619 .1158716
                    TKIM | .1496146 .0237221 6.31 0.000 .1031202 .196109
                    TLKM | .0368024 .0145671 2.53 0.012 .0082514 .0653534
                    TOWR | .1452118 .0222461 6.53 0.000 .1016101 .1888134
                    UNTR | -.0072614 .015832 -0.46 0.646 -.0382916 .0237687
                    UNVR | -.0277639 .0145281 -1.91 0.056 -.0562384 .0007107
                    WIKA | .2838796 .0193459 14.67 0.000 .2459623 .321797
                    |
                    index |
                    2 | -.0164333 .041973 -0.39 0.695 -.0986989 .0658323
                    3 | .0633641 .0420069 1.51 0.131 -.0189678 .1456961
                    4 | .0228136 .0423114 0.54 0.590 -.0601152 .1057424
                    5 | .0029267 .0422616 0.07 0.945 -.0799046 .0857579
                    6 | .0438443 .0419733 1.04 0.296 -.0384218 .1261104
                    7 | .0296989 .0419618 0.71 0.479 -.0525448 .1119425
                    8 | .0472212 .0419696 1.13 0.261 -.0350377 .1294801
                    9 | -2.656188 .1568928 -16.93 0.000 -2.963692 -2.348684
                    10 | -.1643386 .0984125 -1.67 0.095 -.3572236 .0285465
                    11 | -.5695717 .0552253 -10.31 0.000 -.6778112 -.4613322
                    12 | -.5849775 .0548904 -10.66 0.000 -.6925608 -.4773942
                    13 | -.5823649 .0550013 -10.59 0.000 -.6901655 -.4745644
                    14 | -.595255 .0547715 -10.87 0.000 -.7026052 -.4879049
                    15 | .0110335 .0421765 0.26 0.794 -.0716309 .0936979
                    16 | .0724809 .0420019 1.73 0.084 -.0098413 .1548031
                    17 | .0729441 .0418997 1.74 0.082 -.0091777 .155066
                    18 | .09392 .0419133 2.24 0.025 .0117714 .1760687
                    19 | .0760558 .0419323 1.81 0.070 -.0061301 .1582416
                    20 | .1235203 .0420207 2.94 0.003 .0411613 .2058794
                    21 | .1401788 .0420485 3.33 0.001 .0577653 .2225923
                    22 | .1050693 .0420561 2.50 0.012 .0226409 .1874976
                    23 | .1136693 .0419927 2.71 0.007 .0313651 .1959734
                    24 | .1105857 .0420062 2.63 0.008 .0282551 .1929163
                    25 | .098762 .0420021 2.35 0.019 .0164395 .1810846
                    26 | -.1472308 .0419516 -3.51 0.000 -.2294545 -.0650072
                    27 | -.157334 .0419635 -3.75 0.000 -.239581 -.075087
                    28 | -.1041594 .041906 -2.49 0.013 -.1862937 -.0220251
                    29 | .0591943 .0419252 1.41 0.158 -.0229776 .1413662
                    30 | .2734219 .041944 6.52 0.000 .1912131 .3556307
                    31 | -.0537195 .0420002 -1.28 0.201 -.1360384 .0285994
                    32 | -.013009 .0420081 -0.31 0.757 -.0953433 .0693253
                    33 | .0386777 .0420278 0.92 0.357 -.0436953 .1210507
                    34 | -.063126 .0419885 -1.50 0.133 -.145422 .01917
                    35 | -.0431907 .0419465 -1.03 0.303 -.1254043 .039023
                    36 | -.0128416 .0419842 -0.31 0.760 -.095129 .0694458
                    37 | -.0236805 .0422163 -0.56 0.575 -.106423 .0590619
                    38 | -.001103 .0421604 -0.03 0.979 -.0837359 .0815299
                    39 | -.0214524 .0419831 -0.51 0.609 -.1037377 .0608329
                    40 | -.0806652 .0419789 -1.92 0.055 -.1629424 .001612
                    41 | -.1842535 .0420627 -4.38 0.000 -.2666948 -.1018121
                    42 | -.0964181 .0420157 -2.29 0.022 -.1787674 -.0140688
                    43 | -.0974299 .0420053 -2.32 0.020 -.1797588 -.0151009
                    44 | -.0625694 .0419785 -1.49 0.136 -.1448458 .0197071
                    45 | -.1058322 .0419389 -2.52 0.012 -.188031 -.0236334
                    46 | -.1148346 .0419739 -2.74 0.006 -.1971019 -.0325674
                    47 | -.0721072 .0419132 -1.72 0.085 -.1542557 .0100412
                    48 | -.0957255 .0419697 -2.28 0.023 -.1779846 -.0134665
                    49 | -.0897628 .0419552 -2.14 0.032 -.1719934 -.0075321
                    50 | -.0937705 .0418992 -2.24 0.025 -.1758915 -.0116495
                    51 | -.0335735 .0419112 -0.80 0.423 -.115718 .0485711
                    52 | -.0715093 .0419032 -1.71 0.088 -.1536381 .0106194
                    53 | -.0275196 .0418832 -0.66 0.511 -.1096091 .05457
                    54 | -.062584 .0418893 -1.49 0.135 -.1446856 .0195176
                    55 | -.0767096 .0418908 -1.83 0.067 -.1588139 .0053948
                    56 | -.0465572 .0418962 -1.11 0.266 -.1286722 .0355578
                    57 | -.0578834 .0418828 -1.38 0.167 -.1399722 .0242053
                    58 | -.0069819 .0419019 -0.17 0.868 -.0891082 .0751444
                    59 | -.0790195 .0419516 -1.88 0.060 -.1612432 .0032042
                    60 | -.0875552 .0419091 -2.09 0.037 -.1696956 -.0054149
                    61 | -.0641905 .0418816 -1.53 0.125 -.1462769 .0178959
                    62 | -.0528815 .0419001 -1.26 0.207 -.1350041 .0292411
                    63 | -.0732292 .0418884 -1.75 0.080 -.155329 .0088706
                    64 | -.0427773 .0419005 -1.02 0.307 -.1249007 .039346
                    65 | -.0551976 .0419481 -1.32 0.188 -.1374144 .0270193
                    66 | -.0304658 .0419181 -0.73 0.467 -.1126238 .0516922
                    67 | -.0334437 .0418881 -0.80 0.425 -.1155428 .0486555
                    68 | -.0110376 .0418861 -0.26 0.792 -.0931327 .0710576
                    69 | -.0706151 .0420228 -1.68 0.093 -.1529783 .011748
                    70 | -.1089259 .0419647 -2.60 0.009 -.1911752 -.0266765
                    71 | -.0710949 .0418905 -1.70 0.090 -.1531988 .0110089
                    72 | -.0755867 .041902 -1.80 0.071 -.157713 .0065396
                    73 | -.0560151 .0418882 -1.34 0.181 -.1381146 .0260843
                    74 | -.0352306 .0421378 -0.84 0.403 -.1178191 .0473579
                    75 | -.0757311 .042017 -1.80 0.071 -.1580828 .0066206
                    76 | -.0864983 .0418674 -2.07 0.039 -.1685568 -.0044397
                    77 | -.0901936 .0418708 -2.15 0.031 -.1722589 -.0081283
                    78 | -.0791766 .0419196 -1.89 0.059 -.1613374 .0029843
                    79 | -.1001405 .0419225 -2.39 0.017 -.182307 -.0179739
                    80 | -.0511012 .0418736 -1.22 0.222 -.1331719 .0309695
                    81 | -.0152267 .0418722 -0.36 0.716 -.0972948 .0668413
                    82 | -.0537655 .0418808 -1.28 0.199 -.1358503 .0283192
                    83 | -.0667456 .0418947 -1.59 0.111 -.1488577 .0153666
                    84 | -.02529 .0418799 -0.60 0.546 -.1073731 .0567932
                    85 | -.0372755 .0419051 -0.89 0.374 -.1194081 .044857
                    86 | -.0693989 .0419156 -1.66 0.098 -.151552 .0127542
                    87 | -.0612697 .0418854 -1.46 0.144 -.1433636 .0208241
                    88 | -.0544867 .0419005 -1.30 0.193 -.1366102 .0276367
                    89 | -.0737331 .0419092 -1.76 0.079 -.1558736 .0084075
                    90 | -.0467486 .041924 -1.12 0.265 -.1289181 .0354208
                    91 | .0436884 .0420435 1.04 0.299 -.0387154 .1260921
                    92 | -.0866189 .0419462 -2.07 0.039 -.168832 -.0044059
                    93 | -.0684753 .0418809 -1.64 0.102 -.1505603 .0136098
                    94 | -.0452769 .0419311 -1.08 0.280 -.1274604 .0369066
                    95 | -.0683159 .041947 -1.63 0.103 -.1505306 .0138987
                    96 | -.1022735 .0419097 -2.44 0.015 -.184415 -.0201321
                    97 | -.1051805 .0419028 -2.51 0.012 -.1873084 -.0230526
                    98 | -.0725066 .0420605 -1.72 0.085 -.1549437 .0099305
                    99 | -.0764249 .0428824 -1.78 0.075 -.1604728 .007623
                    100 | -.0786326 .0423296 -1.86 0.063 -.161597 .0043318
                    101 | -.2144803 .0419781 -5.11 0.000 -.2967559 -.1322048
                    102 | -.1736878 .042075 -4.13 0.000 -.2561533 -.0912223
                    103 | -.1702422 .0421189 -4.04 0.000 -.2527937 -.0876908
                    104 | -.1693562 .042099 -4.02 0.000 -.2518687 -.0868438
                    105 | -.1058084 .0419614 -2.52 0.012 -.1880513 -.0235655
                    106 | -.1256957 .0419555 -3.00 0.003 -.207927 -.0434643
                    107 | -.0978526 .0420026 -2.33 0.020 -.1801762 -.015529
                    108 | -.1035955 .0419531 -2.47 0.014 -.1858221 -.021369
                    109 | -.109248 .0420112 -2.60 0.009 -.1915885 -.0269074
                    110 | -.1577856 .0419571 -3.76 0.000 -.2400201 -.0755512
                    111 | -.1560831 .041927 -3.72 0.000 -.2382585 -.0739078
                    112 | -.1051881 .0419476 -2.51 0.012 -.187404 -.0229723
                    113 | -.1233976 .0419237 -2.94 0.003 -.2055666 -.0412287
                    114 | -.1904016 .0418887 -4.55 0.000 -.272502 -.1083012
                    115 | -.1407843 .0419375 -3.36 0.001 -.2229802 -.0585883
                    116 | -.147007 .0419286 -3.51 0.000 -.2291855 -.0648285
                    117 | -.112981 .0418741 -2.70 0.007 -.1950528 -.0309092
                    118 | -.1244386 .0418828 -2.97 0.003 -.2065273 -.0423498
                    119 | -.1237437 .0418804 -2.95 0.003 -.2058277 -.0416596
                    120 | -.108163 .0418937 -2.58 0.010 -.1902731 -.0260529
                    121 | -.0844072 .0418977 -2.01 0.044 -.1665252 -.0022891
                    122 | -.0725625 .0418953 -1.73 0.083 -.1546758 .0095509
                    123 | -.057659 .041892 -1.38 0.169 -.1397657 .0244478
                    124 | -.078867 .0419859 -1.88 0.060 -.1611578 .0034239
                    125 | -.0909237 .0419566 -2.17 0.030 -.1731571 -.0086904
                    126 | -.1044352 .0418834 -2.49 0.013 -.1865251 -.0223454
                    127 | -.0778422 .0419274 -1.86 0.063 -.1600183 .0043339
                    128 | -.0729473 .0419187 -1.74 0.082 -.1551065 .0092118
                    129 | -.0554659 .0419057 -1.32 0.186 -.1375996 .0266679
                    130 | -.0934868 .0419063 -2.23 0.026 -.1756216 -.0113519
                    131 | -.0879338 .0418973 -2.10 0.036 -.170051 -.0058165
                    132 | -.0467324 .0419296 -1.11 0.265 -.1289129 .0354481
                    133 | -.0353897 .0419467 -0.84 0.399 -.1176037 .0468243
                    134 | -.0949368 .0419025 -2.27 0.023 -.1770643 -.0128093
                    135 | -.0857403 .0419461 -2.04 0.041 -.1679532 -.0035274
                    136 | -.1305437 .0419692 -3.11 0.002 -.2128018 -.0482855
                    137 | -.0606797 .0418933 -1.45 0.147 -.1427891 .0214298
                    138 | -.0551393 .0418795 -1.32 0.188 -.1372217 .0269431
                    139 | -.0147265 .0418928 -0.35 0.725 -.096835 .0673819
                    140 | -.0032358 .0418892 -0.08 0.938 -.0853371 .0788654
                    141 | -.0942705 .0419328 -2.25 0.025 -.1764574 -.0120837
                    142 | -.0967276 .0419253 -2.31 0.021 -.1788997 -.0145555
                    143 | -.0566018 .0418788 -1.35 0.177 -.1386828 .0254792
                    144 | -.0026263 .0418689 -0.06 0.950 -.0846878 .0794353
                    145 | -.0415024 .0418814 -0.99 0.322 -.1235884 .0405836
                    146 | -.0070832 .0418777 -0.17 0.866 -.0891621 .0749957
                    147 | -.02324 .0419094 -0.55 0.579 -.1053809 .0589009
                    148 | -.0536985 .0418961 -1.28 0.200 -.1358135 .0284164
                    149 | -.0052582 .0418744 -0.13 0.900 -.0873306 .0768141
                    150 | .0593268 .0419178 1.42 0.157 -.0228307 .1414843
                    151 | -.0466227 .0418904 -1.11 0.266 -.1287263 .035481
                    152 | -.0063223 .0418726 -0.15 0.880 -.0883911 .0757466
                    153 | .3580109 .0422643 8.47 0.000 .2751745 .4408474
                    154 | .0080674 .0420679 0.19 0.848 -.0743841 .0905189
                    155 | -.0464124 .041886 -1.11 0.268 -.1285075 .0356827
                    156 | .022564 .0419205 0.54 0.590 -.0595985 .1047266
                    157 | -.0234302 .0419261 -0.56 0.576 -.105604 .0587435
                    158 | -.0283203 .0418944 -0.68 0.499 -.1104319 .0537912
                    159 | .0300951 .0418911 0.72 0.473 -.05201 .1122003
                    160 | .075892 .0419196 1.81 0.070 -.006269 .1580529
                    161 | .0297002 .0419407 0.71 0.479 -.052502 .1119024
                    162 | -.0047615 .0419008 -0.11 0.910 -.0868855 .0773626
                    163 | .0097359 .0418918 0.23 0.816 -.0723706 .0918423
                    164 | .0440606 .0418812 1.05 0.293 -.038025 .1261462
                    165 | .0681217 .0418948 1.63 0.104 -.0139906 .150234
                    166 | .0215041 .0419117 0.51 0.608 -.0606414 .1036496
                    167 | .0231248 .0418856 0.55 0.581 -.0589696 .1052191
                    168 | -.0111945 .0421831 -0.27 0.791 -.0938718 .0714828
                    169 | .0212062 .0420808 0.50 0.614 -.0612705 .103683
                    170 | -.0870085 .0418849 -2.08 0.038 -.1691014 -.0049155
                    171 | -.0695344 .0419218 -1.66 0.097 -.1516996 .0126309
                    172 | -.0522748 .0419756 -1.25 0.213 -.1345454 .0299958
                    173 | -.0896137 .0419115 -2.14 0.033 -.1717586 -.0074687
                    174 | -.0445208 .0418837 -1.06 0.288 -.1266114 .0375697
                    175 | -.009809 .0419639 -0.23 0.815 -.0920568 .0724387
                    176 | .0144284 .0419262 0.34 0.731 -.0677455 .0966022
                    177 | 0 (omitted)
                    178 | -.0242775 .0418936 -0.58 0.562 -.1063875 .0578324
                    179 | 0 (omitted)
                    180 | .1025392 .0418776 2.45 0.014 .0204607 .1846177
                    181 | .1400611 .0418705 3.35 0.001 .0579964 .2221257
                    182 | .0974539 .0418949 2.33 0.020 .0153414 .1795665
                    183 | .0898329 .0419066 2.14 0.032 .0076974 .1719684
                    184 | .1125255 .0419024 2.69 0.007 .0303983 .1946527
                    185 | .0372201 .0419052 0.89 0.374 -.0449126 .1193528
                    186 | .0210987 .0418801 0.50 0.614 -.0609847 .1031821
                    187 | .0720775 .0419616 1.72 0.086 -.0101658 .1543207
                    188 | .0644457 .0419464 1.54 0.124 -.0177678 .1466592
                    189 | .0824377 .0419696 1.96 0.050 .0001788 .1646966
                    190 | .1047058 .0419403 2.50 0.013 .0225044 .1869073
                    191 | .0661451 .0420532 1.57 0.116 -.0162777 .1485679
                    192 | .0989915 .0420901 2.35 0.019 .0164964 .1814866
                    193 | -.017851 .0420711 -0.42 0.671 -.1003088 .0646068
                    194 | .0104409 .0419772 0.25 0.804 -.0718328 .0927146
                    195 | .0221938 .0418977 0.53 0.596 -.0599243 .1043119
                    196 | .0179339 .0418788 0.43 0.668 -.064147 .1000148
                    197 | -.0365727 .0418653 -0.87 0.382 -.1186272 .0454817
                    198 | 0 (omitted)
                    199 | .0866803 .0419125 2.07 0.039 .0045333 .1688272
                    200 | .0518996 .0419081 1.24 0.216 -.0302387 .134038
                    201 | .0239796 .0418706 0.57 0.567 -.0580853 .1060445
                    202 | .0445982 .0418699 1.07 0.287 -.0374653 .1266616
                    203 | .0651609 .0418823 1.56 0.120 -.016927 .1472487
                    204 | .0543501 .0419306 1.30 0.195 -.0278324 .1365326
                    205 | .0562568 .0419379 1.34 0.180 -.0259399 .1384536
                    206 | .0427244 .0418928 1.02 0.308 -.0393839 .1248328
                    207 | .0751548 .0418802 1.79 0.073 -.0069289 .1572385
                    208 | .0603296 .0418853 1.44 0.150 -.021764 .1424232
                    209 | .0683732 .0418963 1.63 0.103 -.0137421 .1504885
                    210 | .0755286 .0418925 1.80 0.071 -.0065791 .1576364
                    211 | .1804372 .0419253 4.30 0.000 .0982652 .2626093
                    212 | .0464614 .0419109 1.11 0.268 -.0356824 .1286052
                    213 | .0661302 .04187 1.58 0.114 -.0159335 .148194
                    214 | .0362647 .0418762 0.87 0.386 -.0458112 .1183406
                    215 | .0666084 .0419163 1.59 0.112 -.015546 .1487628
                    216 | .088113 .0419244 2.10 0.036 .0059427 .1702832
                    217 | .0539127 .0418908 1.29 0.198 -.0281918 .1360172
                    218 | .0983371 .0418947 2.35 0.019 .0162251 .1804492
                    219 | .0346133 .0418852 0.83 0.409 -.0474802 .1167067
                    220 | .0768319 .0418643 1.84 0.066 -.0052206 .1588845
                    221 | .0484425 .0418801 1.16 0.247 -.0336411 .1305261
                    222 | .0491285 .0418943 1.17 0.241 -.0329828 .1312398
                    223 | .0400261 .0418976 0.96 0.339 -.0420917 .122144
                    224 | .0290873 .041888 0.69 0.487 -.0530117 .1111864
                    225 | .0930057 .0418821 2.22 0.026 .0109183 .1750932
                    226 | .0396439 .0418992 0.95 0.344 -.042477 .1217648
                    227 | .0452561 .0419151 1.08 0.280 -.036896 .1274082
                    228 | .0300219 .04197 0.72 0.474 -.0522378 .1122816
                    229 | .036662 .0419363 0.87 0.382 -.0455316 .1188556
                    230 | .0011623 .041871 0.03 0.978 -.0809035 .083228
                    231 | .0179641 .0418751 0.43 0.668 -.0641096 .1000378
                    232 | .0230041 .0419396 0.55 0.583 -.059196 .1052042
                    233 | .0682549 .0419579 1.63 0.104 -.013981 .1504908
                    234 | .0163022 .0419021 0.39 0.697 -.0658243 .0984288
                    235 | .0070781 .0418812 0.17 0.866 -.0750077 .0891638
                    236 | .0116296 .041882 0.28 0.781 -.0704577 .0937168
                    237 | .0153569 .0418768 0.37 0.714 -.0667202 .0974339
                    238 | .023513 .0418826 0.56 0.575 -.0585754 .1056014
                    239 | .0257337 .0418966 0.61 0.539 -.0563821 .1078496
                    240 | .0018914 .0420634 0.04 0.964 -.0805513 .0843341
                    241 | .0438219 .0419765 1.04 0.297 -.0384504 .1260943
                    242 | -.0237597 .0418795 -0.57 0.570 -.1058419 .0583226
                    243 | -.0222752 .0418727 -0.53 0.595 -.1043442 .0597939
                    244 | .0132449 .0418785 0.32 0.752 -.0688355 .0953254
                    245 | .0138551 .0418818 0.33 0.741 -.0682317 .0959418
                    246 | -.0000438 .041886 -0.00 0.999 -.0821388 .0820511
                    247 | .0014465 .0419097 0.03 0.972 -.080695 .083588
                    248 | .0155764 .0419192 0.37 0.710 -.0665837 .0977364
                    249 | .0086722 .0418977 0.21 0.836 -.0734457 .0907902
                    250 | .015513 .0419034 0.37 0.711 -.0666161 .0976421
                    251 | .0270016 .0419222 0.64 0.520 -.0551644 .1091676
                    252 | .0005892 .0418909 0.01 0.989 -.0815155 .0826939
                    253 | .0031225 .0418747 0.07 0.941 -.0789504 .0851953
                    254 | .0245735 .0418852 0.59 0.557 -.0575201 .106667
                    255 | .0058144 .0419141 0.14 0.890 -.0763358 .0879645
                    256 | .0001227 .0418978 0.00 0.998 -.0819955 .0822409
                    257 | .0170224 .04188 0.41 0.684 -.0650609 .0991057
                    258 | .026147 .0418909 0.62 0.533 -.0559577 .1082516
                    259 | .0289003 .0419096 0.69 0.490 -.053241 .1110416
                    260 | .0112715 .041896 0.27 0.788 -.0708431 .093386
                    261 | .0363236 .0418955 0.87 0.386 -.04579 .1184373
                    262 | .054349 .0419777 1.29 0.195 -.0279258 .1366237
                    263 | .0180416 .0419304 0.43 0.667 -.0641405 .1002236
                    264 | -.0058617 .0419473 -0.14 0.889 -.0880768 .0763534
                    265 | .0270426 .0419181 0.65 0.519 -.0551155 .1092006
                    266 | .0136172 .0418818 0.33 0.745 -.0684696 .0957039
                    267 | .0045238 .0418943 0.11 0.914 -.0775875 .0866351
                    268 | .0451515 .0418814 1.08 0.281 -.0369346 .1272375
                    269 | .1805777 .0418757 4.31 0.000 .0985029 .2626526
                    270 | .0170443 .0418726 0.41 0.684 -.0650244 .0991131
                    271 | -.0044497 .041873 -0.11 0.915 -.0865194 .0776199
                    272 | .0396456 .0418871 0.95 0.344 -.0424516 .1217428
                    273 | -.0114067 .0418797 -0.27 0.785 -.0934893 .070676
                    274 | -.0000905 .0419024 -0.00 0.998 -.0822177 .0820368
                    275 | .0081059 .0419125 0.19 0.847 -.074041 .0902528
                    276 | -.0007304 .0419417 -0.02 0.986 -.0829346 .0814739
                    277 | -.0033815 .0419224 -0.08 0.936 -.085548 .0787849
                    278 | .0202164 .0418766 0.48 0.629 -.0618602 .102293
                    279 | .0662818 .0418744 1.58 0.113 -.0157905 .148354
                    280 | .0087798 .0418946 0.21 0.834 -.0733321 .0908918
                    281 | .0325791 .0418971 0.78 0.437 -.0495377 .1146958
                    282 | .0384978 .041893 0.92 0.358 -.043611 .1206067
                    283 | .0285684 .0419215 0.68 0.496 -.0535962 .110733
                    284 | .1492889 .0420233 3.55 0.000 .0669248 .2316531
                    285 | .0368382 .0419595 0.88 0.380 -.045401 .1190774
                    286 | .0000329 .04187 0.00 0.999 -.0820308 .0820966
                    287 | -.0110209 .0418984 -0.26 0.793 -.0931403 .0710985
                    288 | -.0072949 .0419116 -0.17 0.862 -.0894401 .0748504
                    289 | .009366 .0418821 0.22 0.823 -.0727215 .0914534
                    290 | -.013423 .0419674 -0.32 0.749 -.0956777 .0688316
                    291 | .0356 .0419128 0.85 0.396 -.0465476 .1177475
                    292 | .029179 .0418617 0.70 0.486 -.0528684 .1112265
                    293 | .0132373 .0418632 0.32 0.752 -.0688131 .0952876
                    294 | 0 (omitted)
                    295 | -.048144 .0419257 -1.15 0.251 -.130317 .0340289
                    296 | -.0065541 .0419043 -0.16 0.876 -.088685 .0755768
                    297 | -.0069575 .0418704 -0.17 0.868 -.089022 .075107
                    298 | .0117328 .041876 0.28 0.779 -.0703427 .0938083
                    299 | -.0177803 .0418729 -0.42 0.671 -.0998496 .064289
                    300 | -.0137047 .0418677 -0.33 0.743 -.0957638 .0683544
                    301 | .008139 .0418691 0.19 0.846 -.073923 .0902009
                    302 | .0070844 .0418872 0.17 0.866 -.075013 .0891819
                    303 | -.0072377 .0418795 -0.17 0.863 -.08932 .0748446
                    304 | -.0106439 .0418699 -0.25 0.799 -.0927074 .0714197
                    305 | -.0237013 .0418777 -0.57 0.571 -.1057801 .0583775
                    306 | .013088 .0418759 0.31 0.755 -.0689873 .0951634
                    307 | -.01947 .041898 -0.46 0.642 -.1015886 .0626485
                    308 | -.001902 .0419079 -0.05 0.964 -.08404 .080236
                    309 | -.0145088 .0418959 -0.35 0.729 -.0966232 .0676057
                    310 | -.0079722 .0418816 -0.19 0.849 -.0900586 .0741142
                    311 | -.0170733 .0418874 -0.41 0.684 -.0991711 .0650244
                    312 | .0056752 .0418828 0.14 0.892 -.0764137 .0877641
                    313 | .0471059 .0419564 1.12 0.262 -.0351271 .1293389
                    314 | -.0151724 .0419225 -0.36 0.717 -.097339 .0669942
                    315 | -.0201353 .0418741 -0.48 0.631 -.1022071 .0619365
                    316 | -.0223106 .0418662 -0.53 0.594 -.1043667 .0597456
                    317 | .0043264 .041867 0.10 0.918 -.0777313 .0863842
                    318 | -.0161106 .0418681 -0.38 0.700 -.0981706 .0659495
                    319 | -.0033681 .0418827 -0.08 0.936 -.0854567 .0787205
                    320 | .003445 .0418784 0.08 0.934 -.0786351 .0855252
                    321 | -.0021673 .0418831 -0.05 0.959 -.0842567 .0799221
                    322 | -.0130658 .0418758 -0.31 0.755 -.0951408 .0690092
                    323 | 0 (omitted)
                    |
                    _cons | .0835242 .0529788 1.58 0.115 -.0203123 .1873606
                    ------------------------------------------------------------------------------

                    Comment


                    • #25
                      better display (predictors variables only)
                      Code:
                      Cross-sectional time-series FGLS regression
                      
                      Coefficients:  generalized least squares
                      Panels:        heteroskedastic
                      Correlation:   no autocorrelation
                      
                      Estimated covariances      =        38          Number of obs     =     12,274
                      Estimated autocorrelations =         0          Number of groups  =         38
                      Estimated coefficients     =       365          Time periods      =        323
                                                                      Wald chi2(364)    =    9245.41
                                                                      Prob > chi2       =     0.0000
                      
                      ------------------------------------------------------------------------------
                              turn | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                      -------------+----------------------------------------------------------------
                              psbb |  -.2479266   .0594537    -4.17   0.000    -.3644537   -.1313995
                             psbbt |   -.026166   .0592532    -0.44   0.659    -.1423001     .089968
                              ppkm |   .0214051   .0418949     0.51   0.609    -.0607074    .1035177
                             ppkmm |  -.0101935   .0418732    -0.24   0.808    -.0922634    .0718764
                             ppkmd |          0  (omitted)
                           vaccine |  -.1386944   .0418823    -3.31   0.001    -.2207823   -.0566065
                                c1 |   .7095683   .0819241     8.66   0.000     .5489999    .8701366
                                c2 |   .4140268   .0778993     5.31   0.000     .2613469    .5667066
                                c3 |   3.519221    .107323    32.79   0.000     3.308872     3.72957
                                c4 |   3.276047   .1968756    16.64   0.000     2.890178    3.661916
                               c5_ |   3.99e-06   1.62e-06     2.47   0.014     8.19e-07    7.17e-06

                      Comment


                      • #26
                        for my dataset, which command is the proper one?

                        kindly need your help

                        Thank you very much
                        Best Regards,
                        Akhzan

                        Comment


                        • #27
                          Originally posted by akhzan fasti View Post
                          I think the case is different with mine
                          Oh I'm sorry.. I just realized.
                          So, the -testparm- (that returns -chi2- instead of -F-) was conceived to test the joint statistical significance of categorical variables (e.g., -i.year-)
                          so the command -i.firm- and -i.time- are used for categorical variables, right?
                          may I know the purpose of this command, please?

                          my dataset consisted of: 38 shares and 323 trading days
                          I'm trying to analyze the impact of government policies (X) on these shares (Y).
                          during 323 trading days, there were 6 policies were issued by the government.
                          these government policies was denoted dummies. 1 when issued and 0 when stopped/expired/replaced by the new one.


                          for my case, do I need the -i.firm- and -i.time- in my command?

                          Really need your help..

                          Thank you
                          Best Regards,
                          Akhzan

                          Comment


                          • #28
                            here is the illustration of my dataset:
                            Attached Files

                            Comment


                            • #29
                              Oh I see..
                              I need i.time to inform stata that the time value is dummy
                              so, for my case, it should be i.x1,ix2, i.x3, i.x4 and so on right?
                              but all of my predictors were omitted

                              Code:
                              . xtregar turn psbb psbbt ppkm ppkmm ppkmd vaccine c1 c2 c3 c4 c5_ i.psbb i.psbbt i.ppkm i.ppkmm i.ppkmd i.vaccine, re
                              note: ppkmd omitted because of collinearity.
                              note: 1.psbb omitted because of collinearity.
                              note: 1.psbbt omitted because of collinearity.
                              note: 1.ppkm omitted because of collinearity.
                              note: 1.ppkmm omitted because of collinearity.
                              note: 1.ppkmd omitted because of collinearity.
                              note: 1.vaccine omitted because of collinearity.
                              
                              RE GLS regression with AR(1) disturbances       Number of obs     =     12,274
                              Group variable: shares_                         Number of groups  =         38
                              
                              R-squared:                                      Obs per group:
                                   Within  = 0.1819                                         min =        323
                                   Between = 0.3049                                         avg =      323.0
                                   Overall = 0.1609                                         max =        323
                              
                                                                              Wald chi2(11)     =    1977.13
                              corr(u_i, Xb) = 0 (assumed)                     Prob > chi2       =     0.0000
                              
                              ------------------------------------------------------------------------------
                                      turn | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                              -------------+----------------------------------------------------------------
                                      psbb |   .0180501     .05001     0.36   0.718    -.0799677    .1160678
                                     psbbt |   .1706298   .0449321     3.80   0.000     .0825645    .2586952
                                      ppkm |   .2054497   .0300301     6.84   0.000     .1465918    .2643075
                                     ppkmm |    .042229   .0218882     1.93   0.054     -.000671     .085129
                                     ppkmd |          0  (omitted)
                                   vaccine |   .0501037   .0402013     1.25   0.213    -.0286895    .1288968
                                        c1 |   2.299816   .0588494    39.08   0.000     2.184474    2.415159
                                        c2 |   .2397661   .0410236     5.84   0.000     .1593614    .3201709
                                        c3 |   2.595502   .0637002    40.75   0.000     2.470651    2.720352
                                        c4 |   1.249913   .1782048     7.01   0.000      .900638    1.599188
                                       c5_ |   9.49e-06   4.30e-06     2.21   0.027     1.07e-06    .0000179
                                    1.psbb |          0  (omitted)
                                   1.psbbt |          0  (omitted)
                                    1.ppkm |          0  (omitted)
                                   1.ppkmm |          0  (omitted)
                                   1.ppkmd |          0  (omitted)
                                 1.vaccine |          0  (omitted)
                                     _cons |   .0451632    .059782     0.76   0.450    -.0720075    .1623338
                              -------------+----------------------------------------------------------------
                                    rho_ar |  .59212034   (estimated autocorrelation coefficient)
                                   sigma_u |  .23459185
                                   sigma_e |  .28530424
                                   rho_fov |  .40337602   (fraction of variance due to u_i)
                                     theta |  .83704245
                              ------------------------------------------------------------------------------

                              Comment


                              • #30
                                Oh I think I understand..
                                i.firm and i.time were performed to tell stata that this is panel data right? because we used -xtgls- not -xtregar-
                                if I used -xtregar- there is no need to add i.firm and i.time
                                Am I right?
                                or i.firm and i.time are used to tell stata that the value is dummy?

                                kindly need your guidance, please..

                                Thank You
                                Best Regards,
                                Akhzan

                                Comment

                                Working...
                                X