Announcement

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

  • what is wrong with the model?Main variable omitted n xtivreg

    Hi,

    Code:
    xtivreg Y (L.X1=L.Z1) L.X2 L.X3 ,,,,L.Xn i.qdate, fe vce(cluster id)
    I want to study the impact of X1 on Y (X2...Xn) are the control variables. However,Z1 is omitted in the first stage and X1 has a coefficient of zero in the second stage. What went wrong? what should I target to change in the model to study the effect of L.X1 on Y (Note that X1 and Z1 are dummy variables)
    Thanks

  • #2
    Are Z1 and X1 time-varying variables?

    Comment


    • #3
      yes they are

      Comment


      • #4
        The force is not so strong with us, Danielle. Without a sample of data provided using -dataex-, it is next to impossible to guess what a problem you have in your data.

        Comment


        • #5
          Thanks. I have uploaded the dataset (attached). My codes are as follows:
          Code:
          xtset rssd9001 qdate
          xtivreg  ChgLCon (L.Underperformance_Peer=L2.Financial_Crisis) L.Cost_Income_Ratio L.HH_index L.ST_interest L.LT_interest L.Inflation i.statefips i.qdate if sz_large==1, fe first vce(cluster rssd9001)
          I am grateful if you can help
          Attached Files

          Comment


          • #6
            Please post an extract of your data using the dataex command. Nobody here will open an attached file due to potentially active content.

            Comment


            • #7
              sorry about that. I don't have much knowledge about these issues. Please find below the example extracted from dataex. Note that N=16388 observations and the number of groups is 585
              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              input float ChgLCon byte Underperformance_Peer float(Financial_Crisis Cost_Income_Ratio HH_index ST_interest LT_interest Inflation) byte statefips float(qdate sz_large) long rssd9001
                       . 0 0  54.31467  1005.611 2.96 6.04          . 50 132 0  608
               -2.479082 0 0  54.72535 1130.2961 3.02 5.68  .27777353 50 133 0  608
               4.2061653 0 0  57.85844 1172.5496  3.1 5.72   .9002792 50 134 0  608
               .58107644 0 0  57.36119 1150.3741 2.93 6.26 -2.1276534 50 135 0  608
              -16.178968 0 0    52.886 1150.6375 4.14 7.18    3.36605 50 136 0  608
              -1.9349502 0 0  49.98738 1152.4891 4.48 7.24   .6784261 50 137 0  608
                8.578559 0 0  48.50421 1161.7769 5.29 7.96    .741244 50 138 0  608
              -1.6779642 0 0  47.56306 1177.9146 3.25 5.97 -2.2073598 50 139 0  608
               -2.093907 0 0   45.0748 1180.6567 5.67 6.63   3.898767 50 140 0  608
               -7.897758 0 0  43.65336 1148.9001  5.4 6.49   .3950008 50 141 0  608
                .2261527 0 0  42.34074  1158.693 5.36 5.93   .7868832 50 142 0  608
                -4.36516 0 0  41.93866 1157.2935 5.77 7.47 -2.2120976 50 143 0  608
               -2.455541 0 0  41.05206  1166.577 5.02 6.74   3.992016 50 144 0  608
               -.2709597 0 0  41.44559 1168.1069 5.05 6.64   .4478547 50 145 0  608
               3.3132176 0 0  41.62046 1226.4604 5.03  6.2   .8280274 50 146 0  608
                 6.44329 0 0  41.95329 1213.5248 4.83 5.81 -2.4636824 50 147 0  608
              -1.2666534 0 0  44.19293 1064.6716 5.05 6.71   3.756479 50 148 0  608
               -2.175063 0 0  44.08717 1182.1997 5.14  6.3  .18726783 50 149 0  608
               15.123775 0 0  44.76506 1390.5194 5.14 5.88    .685362 50 150 0  608
               10.295185 1 0  47.95006 1342.8237 5.01 6.42 -1.5470296 50 151 0  608
                .7339662 0 0  48.46133 1345.3804    5 5.65  2.1370168 50 152 0  608
               3.4483094 0 0  46.83892 1340.1062  4.9 5.34   .4307674 50 153 0  608
               4.5421066 0 1  46.71648 1343.7427 4.41 4.83    .490198 50 154 0  608
                6.264921 0 1   47.3339  1331.294 5.09 5.57  -1.463411 50 155 0  608
                3.116662 0 0  48.69587 1324.4344  4.5 5.54   2.846529 50 156 0  608
               10.493733 0 0  86.10361 1338.7494 4.72 5.94   .3008424 50 157 0  608
               -2.836904 0 0  86.10361 1302.4233 5.07 6.03     .89982 50 158 0  608
              -24.013897 1 0 71.014366 1216.6953 4.44    5 -2.3186646 50 159 0  608
               -.6299366 0 0 70.727196  499.0934 4.94  4.6          .  5 186 0 1146
                2.975774 0 0  72.32206  515.4486 4.43 4.57 -1.7343905  5 187 0 1146
                6.426186 0 0  63.68851  533.5643 4.73 4.75  4.2289467  5 188 0 1146
               -2.932041 0 0  62.22187  488.0621  .04 3.17          . 56 204 0 1454
               -5.087297 0 0  59.64668  494.0797  .02  2.3  .45174035 56 205 0 1454
               -4.444196 0 0  60.28849  497.1154  .01 2.01   .2208763 56 206 0 1454
                9.699644 0 0  60.72779  501.1996  .13 3.58  -2.737378 56 207 0 1454
               -5.656934 0 0  61.52685  501.3077  .09  1.8  4.4781876 56 208 0 1454
                 4.45922 0 0  57.54293  541.1212   .1 1.68  -.4263654 56 209 0 1454
                 5.04579 0 0  58.99206 549.73175  .09 1.65   .9659357 56 210 0 1454
               -.6353147 0 0  60.87164  558.2266  .09 1.97 -2.0110965 56 211 0 1454
                9.832357 0 0 64.377686 554.38043  .04 1.93   2.587966 56 212 0 1454
                9.654755 0 0  60.45658  589.2664  .04 2.74   .4579979 56 213 0 1454
               -4.000344 0 0  60.87983 576.58624  .07 2.72 -.02139925 56 214 0 1454
               1.4736156 0 0  59.72303  578.0071   .1 1.98 -1.3984424 56 215 0 1454
               -5.781771 0 0         .  586.0241  .03 2.56   2.949456 56 216 0 1454
               -.8465623 0 0         .  567.2076  .03 2.42   .4968928 56 217 0 1454
                3.131913 0 0         .  571.3047  .02 2.33  -.3429177 56 218 0 1454
               -5.575319 0 0         .  585.5145  .05 2.71 -1.4812592 56 219 0 1454
                2.421244 0 0  28.62832   4171.05 4.72 5.11          . 13 184 0 1632
                6.889333 0 0  28.53887   4132.67 4.96 4.88   .9925559 13 185 0 1632
               4.7632756 0 0 28.460413  4077.135 4.94  4.6  -.8353794 13 186 0 1632
                 8.44993 0 0 28.391546 4033.2964 4.43 4.57 -1.7343905 13 187 0 1632
                 .000484 0 0   28.2306  3930.774 4.73 4.75  4.2289467 13 188 0 1632
                5.554067 0 0 27.821815   3842.42  4.2 4.67   .7804067 13 189 0 1632
                7.436586 0 1  27.98929  3676.757 3.27 4.15   .3058146 13 190 0 1632
              -2.9313054 0 1  27.57601  3638.853 5.03 4.72  -3.120575 13 191 0 1632
                .8942907 0 1 29.684326 3506.4436 1.73 3.88   6.129455 13 192 0 1632
               2.8009336 0 1 32.111515 3519.6135 1.72 3.89   2.393136 13 193 0 1632
               -5.974285 0 1  32.45467  3480.424  .19 3.53  -1.541619 13 194 0 1632
              -4.1867075 0 1  32.78496 3469.5784 2.12 3.74 -2.5363255 13 195 0 1632
               11.815604 0 1     57.32  3530.692  .18 3.29  1.0233104 13 196 0 1632
               -.0217527 0 1  47.99051  3634.499  .17 3.59   .9899608 13 197 0 1632
               -7.911567 0 1  48.00014 3724.2996  .05  3.4   .3835617 13 198 0 1632
              -4.1317725 0 1  48.35201 3764.4946   .3 2.87 -2.3286457 13 199 0 1632
               -10.78177 0 0 73.799995   3760.68  .16 3.42   3.251823 13 200 0 1632
                44.60451 0 0  41.25324  389.2512  3.1 5.72          . 17 134 0 2648
                .4598264 0 0  42.89214   367.212 2.93 6.26 -2.1276534 17 135 0 2648
              -18.586195 0 0  44.70256 379.05035 4.14 7.18    3.36605 17 136 0 2648
               12.074597 0 0  43.90672  371.6383 4.48 7.24   .6784261 17 137 0 2648
              -13.179678 0 0  41.45252  371.2368 5.29 7.96    .741244 17 138 0 2648
               35.665024 0 0  43.46901  394.7706 3.25 5.97 -2.2073598 17 139 0 2648
                21.52962 0 0  76.26563  400.2144 5.67 6.63   3.898767 17 140 0 2648
                78.70119 0 0   55.4324 416.04175  5.4 6.49   .3950008 17 141 0 2648
               31.558544 0 0  50.07412 404.37405 5.36 5.93   .7868832 17 142 1 2648
              -11.110726 1 0   47.9856  432.1381 5.77 7.47 -2.2120976 17 143 1 2648
               -10.22742 0 0  52.89219  400.7031 5.02 6.74   3.992016 17 144 1 2648
               -7.500915 0 0    43.703  437.4446 5.05 6.64   .4478547 17 145 1 2648
                7.301942 0 0  41.52246  492.2815 5.03  6.2   .8280274 17 146 1 2648
                1.838394 0 0  40.83107  486.3203 4.83 5.81 -2.4636824 17 147 1 2648
                3.944666 0 0   38.3387  505.6247 5.05 6.71   3.756479 17 148 1 2648
              -2.9836004 0 0  38.77421 508.68515 5.14  6.3  .18726783 17 149 1 2648
               2.2488968 0 0 37.280266  528.5412 5.14 5.88    .685362 17 150 1 2648
                3.451237 0 0  37.36023  533.3942 5.01 6.42 -1.5470296 17 151 1 2648
              -2.3115773 0 0 35.618053  533.4588    5 5.65  2.1370168 17 152 1 2648
                7.640734 0 0 36.345886  549.8972  4.9 5.34   .4307674 17 153 1 2648
                2.331726 0 1 36.262478 569.38934 4.41 4.83    .490198 17 154 1 2648
               -3.698797 0 1  43.13206  615.4871 5.09 5.57  -1.463411 17 155 1 2648
                .8867244 0 0 32.314957  611.4355  4.5 5.54   2.846529 17 156 1 2648
                .1008035 0 0  47.63994  564.4891 2.84 4.14          . 17 180 0 2732
                3.557381 0 0  41.77429  630.5272 3.88 4.54          . 17 182 0 2732
                4.964311 0 0  36.95204  639.3334 2.54 4.17 -4.2670684 17 183 0 2732
                3.278039 0 0  40.66456  643.1972 4.72 5.11   5.663347 17 184 0 2732
               -8.133488 0 0 37.513847  662.3192 4.96 4.88   .9925559 17 185 0 2732
               -3.949606 0 0 34.803215  678.9258 4.94  4.6  -.8353794 17 186 0 2732
               -4.768898 0 0  31.24929  701.6628 4.43 4.57 -1.7343905 17 187 0 2732
               4.5006285 0 0  38.84611  727.5899 4.73 4.75  4.2289467 17 188 0 2732
                 7.96292 0 0 36.559998  722.1714  4.2 4.67   .7804067 17 189 0 2732
              -1.0419047 0 1 34.279243  759.1115 3.27 4.15   .3058146 17 190 0 2732
                1.491224 0 1  31.42963  724.9392 5.03 4.72  -3.120575 17 191 0 2732
                .4260576 0 1   41.2301  753.2885 1.73 3.88   6.129455 17 192 0 2732
               -2.818047 0 1  39.58793  739.3104 1.72 3.89   2.393136 17 193 0 2732
              end
              format %tq qdate
              Last edited by Danielle leblanc; 07 Jan 2023, 07:09.

              Comment

              Working...
              X