Announcement

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

  • Canay's (2011) Fixed-Effect Quantile Panel Data Approach in the presence of some endogenous independent variables

    Dear Forum members,

    Let me apologize in advance if my question has been dealt with somewhere which I have not found yet. I have searched the web and statalist severally, including posting this same question under an old thread. But I have not received any comment or help. As such I thought I should start a fresh thread altogether with an improved version of the question. My question is as follows:

    I am dealing with a panel data with about 1400 panels over 5 year period. I wanted to do a quantile regression with fixed effects. I have learnt Joao Santos Silva and others that quantile regressions for panel data models with fixed effects is an area that is still being explored(developed) by the experts. My supervisor asked that I use Canay's (2011) Fixed-Effect Quantile Panel Data Approach.

    Unfortunately, I have two endogenous variables(x1 and x2) among my list of independent variables. I have two instruments for each of them (z1 and z2). So I thought of using the standard 2SLS approach to manually collect the predicted values of my endogenous variables in the first stage and then in the second stage I implement Canay's approach, replacing x1 and x2 with x1_hat and x2_hat (the predicted values).

    To ensure the the second step of Canay's 2step takes into account both the first step and the first stage of the 2SLS estimations, I sought to bootstrap all the stages/steps so as to avoid or reduce the incidence of biased standard-errors.

    However, the bootsrap produces the error :
    Code:
    insufficient observations to compute bootstrap standard errors
    no results will be saved
    r(2000);
    I produce the entire code/program below. But before that, I wanted to find out if thought process is correct given what I wanted to achieve. And I would appreciate it if I can get help to resolve the error I am getting.

    Thank you in advance.

    Below is the program:

    Code:
      log using "Caney_2step"
     
    cap program drop Caney2step
    program define Caney2step
    
       xtset ind year
    
       xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7, fe vce(robust)
       predict x1_hat
    
       xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7, fe vce(robust)
       predict x2_hat
    
       tsset ind year
    
       local qs "0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95"
    
    //*now Canay's 2-step estimator*
    //*Step 1*
    //*Should i.year and i.x7 still be included here? I dont't think so. Thus I exclude them*
    
        xtreg y x1_hat x2_hat x3 x4 x5 x6, fe vce(robust)
    
        predict res, u  
    
        gen y_transformed = y - res
    
    //*Step 2*
    local replace replace  
     *forvalues tau = 0.05(0.05)0.95 {
     foreach tau in `qs' {
       qreg y_transformed x1_hat x2_hat x3 x4 x5 x6, quantile(`tau')  
       outreg2 using "Caney_2step", excel dec(4) ctitle(`tau') `replace'
       local replace append
     }
      
    end
    
    //*bootstrap the standard errors*
    bootstrap, reps(200) nodrop: Caney2step
    PS: code for implementing Caney's two-steps is as per suggestion by @River Huang

    Below is my output:

    Code:
    . cap program drop Caney2step
    
    .
    . program define Caney2step
      1.
    .
    .
    .    xtset ind year
      2.
    .
    .
    .    xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7, fe vce(robust)
      3.
    .    predict x1_hat
      4.
    .
    .
    .    xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7, fe vce(robust)
      5.
    .    predict x2_hat
      6.
    .
    .
    .    tsset ind year
      7.
    .
    .
    .    local qs "0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95"
      8.
    .
    .
    . *now Canay's 2-step estimator*
    .
    . *Step 1*
    .
    . *Should i.year and i.x7 still be included here? I dont't think so. Thus I exclude them*
    .
    .
    .
    .     xtreg y x1_hat x2_hat x3 x4 x5 x6, fe vce(robust)
      9.
    .
    .
    .     predict res, u  
     10.
    .
    .
    .     gen y_transformed = y - res
     11.
    .
    .
    . *Step 2*
    .
    . local replace replace  
     12.
    .  *forvalues tau = 0.05(0.05)0.95 {
    .
    .  foreach tau in `qs' {
     13.
    .    qreg y_transformed x1_hat x2_hat x3 x4 x5 x6, quantile(`tau')  
     14.
    .    outreg2 using "Caney_2step", excel dec(4) ctitle(`tau') `replace'
     15.
    .    local replace append
     16.
    .  }
     17.
    .    
    .
    . end
    
    .
    .
    .
    . *bootstrap the standard errors*
    
    .
    . bootstrap, reps(200) nodrop: Caney2step
    (running Caney2step on estimation sample)
     :  :  :  :  :  :  :  :  :  :  :  :  :  :  :  :  :  :  :
    Bootstrap replications (200)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    50
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   100
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   150
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   200
    insufficient observations to compute bootstrap standard errors
    no results will be saved
    r(2000);

    Your kind suggestions will be appreciated.
    Last edited by Lom Newton; 02 Aug 2019, 18:24.

  • #2
    Hi Lom
    Three comments on your proposed strategy.
    1. If you are going to create intermediate predicted values, you need to make sure you drop them at the end of the process (or beginning). Otherwise the program cant do what is supposed to because it will find that, variables x1_hat, x2_hat and res already exist.
    2. You shouldnt output your results within each bootstrap. What you should do is to is run a single quantile regression.
    2. Because quantile regressions are essentially a nonlinear model, i would use the residuals from your auxiliary regressions instead of the predicted means.

    That being said. Im not sure there is a justification of doing this, from a theoretical stand point. So I think you may run into problems depending on who your audience is.
    Fernando

    Here an example of a code that works:
    Code:
    clear all
       . webuse nlswork
       . xtset idcode
       . xtreg ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure not_smsa south, fe
       
       ** Bootstrap Canay 2011
       program canay, eclass
       *1st Obtain residuals
           capture drop res
           xtreg ln_wage age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure not_smsa south, fe
           predict res, u
           capture drop ln_wu
           gen ln_wu=ln_wage-res
           qreg ln_wu age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure not_smsa south, q(`1')
       end
       ** The right way
       
       
       
       bootstrap, seed(1):canay 50
    The number after canay will tell the program which quantile you are interested in estimating.

    Comment


    • #3
      Hello FernandoRios,

      Thanks for your suggestion. But please permit me to ask for the following clarifications.

      From your code, it appears to me your are only bootstrapping step 1 and 2 of Canay's procedure and again it doesn't appear like you are treating any endogenous variable. As such the only transformed variable in step two of the process is ln_wu. The predictors remain the same. Am I to understand from your third point that, in my case, even where I need to account for endogeneity of x1 and x2, by getting their predicted values(x1_hat and x2_hat), I should instead go for the residuals (say, resx1 and resx2) from those regressions? Would this still be a manual 2SLS estimation procedure?

      If this is the case, how do I use them in step 1 and step 2 regressions of Canay's procedure? Should I transform x1 and x2 with them like below:
      Code:
      gen X1_t = x1-resx1 and gen X2_t = x2-resx2
      and then use X1_t and X2_t in place of x1 and x2 in Canay's regressions?

      Finally even if this is the process, do we not need to bootstrap those first stage (auxiliary) regressions/transformations together with Canay's 2step procedure?

      Please find below how I implemented what I describe above (which I think does not bootstrap the first stage (auxiliary) regressions/transformations:

      Code:
       xtset ind year
        
      cap program drop Caney2step
      program define Caney2step, eclass 
      **first get residuals from regressing the endog vars (x1 and x2) on instruments and exog vars
      **then generate trasformed x1 and x2.
         capture drop resx1
         xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
         predict resx1, u
         capture drop X1_t
         gen X1_t = x1-resx1
         
         capture drop resx2
         xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
         predict resx2, u 
         capture drop X2_t
         gen X2_t = x1-resx2
      **now use the trasformed x1 and x2 (X1_t and X2_t) in Canay's regressions in place of x1 and x2
         capture drop res_y
         xtreg y X1_t X2_t x3 x4 x5 x6 if balance==5, fe vce(robust) 
         predict res_y, u  
         capture drop y_transformed1
         gen y_transformed1 = y - res_y
      
          qreg y_transformed1 X1_t X2_t x3 x4 x5 x6 if balance==5, q(`1')
      end
      bootstrap, seed(1):Caney2step 95
      Of course I got the following results but I want to be sure if this is the procedure you suggested.:
      Code:
       . cap program drop Caney2step
      
      . 
      . program define Caney2step, eclass 
        1. 
      .    capture drop resx1
        2. 
      .    xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
        3. 
      .    predict resx1, u
        4. 
      .    capture drop X1_t
        5. 
      .    gen X1_t = x1-resx1
        6. 
      .    
      . 
      .    capture drop resx2
        7. 
      .    xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
        8. 
      .    predict resx2, u 
        9. 
      .    capture drop X2_t
       10. 
      .    gen X2_t = x1-resx2
       11. 
      .    
      . 
      .    capture drop res_y
       12. 
      .    xtreg y X1_t X2_t x3 x4 x5 x6 if balance==5, fe vce(robust) 
       13. 
      .    predict res_y, u  
       14. 
      .    capture drop y_transformed1
       15. 
      .    gen y_transformed1 = y - res_y
       16. 
      . 
      . 
      .     qreg y_transformed1 X1_t X2_t x3 x4 x5 x6 if balance==5, q(`1')
       17. 
      . end
      
      . 
      . 
      . 
      . bootstrap, seed(1):Caney2step 95
      (running Caney2step on estimation sample)
      
      Bootstrap replications (50)
      ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
      ..................................................    50
      
      Bootstrap results                               Number of obs      =      6874
                                                      Replications       =        50
                                                      Wald chi2(6)       =    341.50
                                                      Prob > chi2        =    0.0000
      
      ------------------------------------------------------------------------------
                   |   Observed   Bootstrap                         Normal-based
      y_transfor~1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
              X1_t |   -2.28601    1.36464    -1.68   0.094    -4.960656    .3886365
              X2_t |   .1372682   .2979828     0.46   0.645    -.4467673    .7213037
                x3 |  -66.94751    13.2513    -5.05   0.000    -92.91957   -40.97545
                x4 |   .0024929   .0005025     4.96   0.000      .001508    .0034778
                x5 |  -.0018225   .0005163    -3.53   0.000    -.0028345   -.0008106
                x6 |   .0005587   .0000799     6.99   0.000      .000402    .0007153
             _cons |   419.4031   34.61031    12.12   0.000     351.5681     487.238
      ------------------------------------------------------------------------------
      
      .

      Comment


      • #4
        Hi Lom
        First, my example was only on the standard Canay 2011 approach, which shoews the basics to do bootstrapping with two step approaches.
        Second. My suggestion on the estimation is rather as follows:
        Code:
          
        cap program drop Caney2step
        program define Caney2step, eclass 
        **first get residuals from regressing the endog vars (x1 and x2) on instruments and exog vars
        **then generate trasformed x1 and x2.
           capture drop resx1
           xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
           predict resx1, u
           capture drop X1_t
           gen X1_t = x1-resx1
           
           capture drop resx2
           xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
           predict resx2, u 
           capture drop X2_t
           gen X2_t = x1-resx2
        **now add the residuals for x1 and x2 
           capture drop res_y
           xtreg y x1 x2 x3 x4 x5 x6 resx1 resx2 i.year if balance==5, fe vce(robust) 
           predict res_y, u  
           capture drop y_transformed1
           gen y_transformed1 = y - res_y
        
            qreg y_transformed1 x1 x2 x3 x4 x5 x6 resx1 resx2 i.year if balance==5, q(`1')
        end
        bootstrap, seed(1):Caney2step 95
        This is known as the residual inclusion approach (control function approach) , as opposed to the prediction substitution approach (what you were doing)
        And again. This is technically how you would do this, but I have no basis to say that this approach is actually accounting for endogeneity in the correct way in the case of quantile regression with fixed effects.

        BTW, Year should still be included in all other models.

        HTH
        Fernando

        Comment


        • #5
          Hello FernandoRios,

          Thank you for your time in helping me.

          First, I take note of the concerns you have raised about the suitability or appropriateness of accounting for endogeneity in quantile FE regression. I think I would take that up with my supervisor. In the interim, assuming the approach I am trying to use is correct, I am just trying to be sure that the steps in trying to do a manual 2SLS regression and then fusing that with Canay's procedure is correct (by way of syntax) when bootstrapping all the stages and steps.

          So, one more issue is that I didn't quite get the rationale for including i.year in Canay's procedure. I am using i.year as year fixed-effects and i.x7 as a supply source fixed-effects. And I thought per Canay's procedure all fixed-effects are supposed to be dropped in the 2 steps regressions since they are accounted for by the transformed y (y_transformed1). I think that's why you dropped i.x7 right? Am I getting it right on this one?

          Also, it seems the "transformed" x1 and x2 (ie., X1_t and X2_t) are no more needed in the code and as such I should delete them by deleting gen X1_t = x1-resx1 and gen X2_t = x2-resx2.

          Finally, I got the following note when I run the updated command :
          Code:
          Note: one or more parameters could not be estimated in 5 bootstrap replicates;
                standard-error estimates include only complete replications.
          I am not sure why. But I realize year 2010 is dropped perhaps due to collinearity. I do not know if this is the reason.

          I prefix -bootstrap- with -noisily- to see what the problem is but there was no further note; the same note as before. Does this have any grave repercussions for my results?

          Below is the output:
          Code:
           cap program drop Caney2step
           
          .
          . program define Caney2step, eclass
            1.
          . **first get residuals from regressing the endog vars (x1 and x2) on instruments and exog vars
          .
          . **then generate trasformed x1 and x2.
          .
          .    capture drop resx1
            2.
          .    xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
            3.
          .    predict resx1, u
            4.
          .    **capture drop X1_t
          .
          .    **gen X1_t = x1-resx1
          .
          .   
          .
          .    capture drop resx2
            5.
          .    xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
            6.
          .    predict resx2, u
            7.
          .    **capture drop X2_t
          .
          .    **gen X2_t = x2-resx2
          .
          . **now add the residuals for x1 and x2
          .
          .    capture drop res_y
            8.
          .    xtreg y x1 x2 x3 x4 x5 x6 resx1 resx2 i.year if balance==5, fe vce(robust)
            9.
          .    predict res_y, u 
           10.
          .    capture drop y_transformed1
           11.
          .    gen y_transformed1 = y - res_y
           12.
          .
          .
          .     qreg y_transformed1 x1 x2 x3 x4 x5 x6 resx1 resx2 i.year if balance==5, q(`1')
           13.
          . end
           
          .
          . bootstrap, seed(1):Caney2step 95
          (running Caney2step on estimation sample)
           
          Bootstrap replications (50)
          ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
          .....x..x..............x.....x.........x..........    50
           
          Bootstrap results                               Number of obs      =      6874
                                                          Replications       =        45
                                                          Wald chi2(11)      =    418.15
                                                          Prob > chi2        =    0.0000
           
          ------------------------------------------------------------------------------
                       |   Observed   Bootstrap                         Normal-based
          y_transfor~1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                    x1 |   1.758677   1.268405     1.39   0.166     -.727352    4.244706
                    x2 |  -1.056803   .4171938    -2.53   0.011    -1.874488   -.2391179
                    x3 |  -86.64185   24.26134    -3.57   0.000    -134.1932   -39.09049
                    x4 |   .0028931   .0005413     5.35   0.000     .0018323    .0039539
                    x5 |  -.0020768   .0005642    -3.68   0.000    -.0031826   -.0009711
                    x6 |    .000446   .0000787     5.67   0.000     .0002918    .0006002
                 resx1 |   -1.10216   1.208322    -0.91   0.362    -3.470427    1.266107
                 resx2 |   10.25914   2.792276     3.67   0.000     4.786382     15.7319
                       |
                  year |
                 2011  |   85.25467   20.15082     4.23   0.000     45.75978    124.7496
                 2012  |   63.77219   22.54501     2.83   0.005     19.58478    107.9596
                 2013  |   23.05452   22.42201     1.03   0.304    -20.89182    67.00086
                       |
                 _cons |    283.473   29.37645     9.65   0.000     225.8962    341.0498
          ------------------------------------------------------------------------------
          Note: one or more parameters could not be estimated in 5 bootstrap replicates;
                standard-error estimates include only complete replications.
           
          .

          Comment


          • #6
            Hi Lom
            First of all, I realize I didnt catch an error on the program. When I suggested using the model residuals, I should have used the option "predict res_x1, e" instead or "u"
            "e" predicts the idiosyncratic error of the model (what you need for the CF approach)
            whereas "u" predicts the model error.
            So the program should look like this:
            Code:
            cap program drop Caney2step
            program define Caney2step, eclass
            **first get residuals from regressing the endog vars (x1 and x2) on instruments and exog vars
            **then generate trasformed x1 and x2.
               capture drop resx1
               xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
               predict resx1, e
               capture drop resx2
               xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
               predict resx2, e 
               
            **now add the residuals for x1 and x2 
              capture drop res_y
               xtreg y x1 x2 x3 x4 x5 x6 resx1 resx2 i.year i.x7 if balance==5, fe vce(robust)
              predict fe_y, u 
               capture drop y_transformed1
               gen y_transformed1 = y - fe_y
                qreg y_transformed1 x1 x2 x3 x4 x5 x6 resx1 resx2 i.year i.x7 if balance==5, q(`1')
            end
            bootstrap, seed(1):Caney2step
            Regarding your queries.
            The reason why i dropped i.x7 is because i miss it. I added year because was an easier to see variable that i saw wasnt included in later steps.
            I think your interpretation of Canay's procedure is correct, but with a caveat. All fixed effects that you use to transform the data "y-fe_y" are to be dropped from the Qregression. But from they way you program it, that only considers the fixed effect of the panel id. year and x7 fixed effects were "absorbed", so they need to be added in subsequent steps.

            x1_t and x_2t are no longer needed. Just kept them in case yo wanted to see what would happen if you use that instead of the residuals option.

            First, check if with the modified code, the same warning appears. It may have been for using the "u" rather than "e" option in the first two steps. And if that appears again, the reason is literal. In the samples with an X, the bootstrap sample is such that either the model couldnt be estimated or not all coefficients were able to be estimated. That is a potential problem with any bootstrap procedure.
            So will this affect the results. I would say no. Just bootstrapped it for a larger number of times.

            two more things to consider:
            1. how many individuals/firms you have in your data? If the number is "small" enough, problably you can just apply something like "ivqreg" to handle endogeneity for you.
            2. If the number of individuals is large, you need to be aware of the incident parameter problem.
            Best
            Fernando

            Comment


            • #7
              Hello FernandoRios,

              With the modified code I am confronted with the initial error:
              Code:
              Bootstrap replications (50)
              ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
              xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    50
              insufficient observations to compute bootstrap standard errors
              no results will be saved
              r(2000);
              The output is as below:

              Code:
               cap program drop Caney2step
              
              . 
              . program define Caney2step, eclass 
                1. 
              . **first get residuals from regressing the endog vars (x1 and x2) on instruments and exog vars
              . 
              . **then generate trasformed x1 and x2.
              . 
              . 
              .    capture drop resx1
                2. 
              .    xtreg  x1 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
                3. 
              .    predict resx1, e
                4. 
              .    *capture drop X1_t
              . 
              .    *gen X1_t = x1-resx1
              . 
              .    
              . 
              .    capture drop resx2
                5. 
              .    xtreg x2 z1 z2 x3 x4 x5 x6 i.year i.x7 if balance==5, fe vce(robust)
                6. 
              .    predict resx2, e 
                7. 
              .    *capture drop X2_t
              . 
              .    *gen X2_t = x2-resx2
              . 
              . **now add the residuals for x1 and x2 
              . 
              . **use u here for the model error
              . 
              .    capture drop fe_y
                8. 
              .    xtreg y x1 x2 x3 x4 x5 x6 resx1 resx2 i.year i.x7 if balance==5, fe vce(robust)
                9. 
              .    predict fe_y, u 
               10. 
              .    capture drop y_transformed1
               11. 
              .    gen y_transformed1 = y - fe_y
               12. 
              .    qreg y_transformed1 x1 x2 x3 x4 x5 x6 resx1 resx2 i.year i.x7 if balance==5, q(`1')
               13. 
              . end
              
              . 
              . bootstrap, seed(1):Caney2step 95
              (running Caney2step on estimation sample)
              
              Bootstrap replications (50)
              ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
              xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    50
              insufficient observations to compute bootstrap standard errors
              no results will be saved
              r(2000);
              When I took id. year and x7 fixed effects out of Caney's last step, I got no such errors.

              Based on your statement,
              But from they way you program it, that only considers the fixed effect of the panel id. year and x7 fixed effects were "absorbed", so they need to be added in subsequent steps.
              , is there a way to program it so that all three fixed effects are considered such that I do not need to include id. year and x7 fixed effects in Canay's last step?

              In terms of the number of individuals (panel ids), I have about 1400 of them. I am not sure if this is "small" enough.

              As for ivqreg or ivqreg2, I have tried them earlier and it produced coefficient estimates without standard errors; probably because I am dealing with a panel data with about 1400 panels (individuals) over 5 year period.

              If it is the case that nothing can be done to estimate my model, then I am in a big trouble. Based on theory, model and the kind of data I have, I need to incorporate the IVs and also the FEs while estimating quantile regression. I sincerely need help in overcoming this. I have used xtivreg2 with fairly good results, but I need to estimate the effects of my independent variables of interest at the various quantiles of the response variable's distribution; I believe the mean estimates are telling the full story.

              Thanks.

              Comment


              • #8
                Yes, I forgot to change the name on res_y to fe_y
                For future reference, when something like this happens, a simple way to trouble shut your program is to run it twice, without the bootstrap prefix;
                Say
                Caney2step 95
                Caney2step 95
                The second one would probably have told you fe_y was already created.

                Regarding to program all fixed effects. I believe its possible, but requires more codding.
                On the side note, with 1400 ids over 6 periods each (i think) you may have an important incidence parameter problem. My policy in such cases is to discuss the problem, mention what the consequences could be, and present your results with clear description of "shortcomings"
                Perhaps your supervisor will have a better advice.
                Fernando

                Comment


                • #9
                  Sorry. Just for the records, I inadvertently omitted the word "NOT" from my last statement:
                  I believe the mean estimates are telling the full story.
                  I meant to say: I believe the mean estimates are NOT telling the full story.

                  So as it stands, am I to take it that the last error is perhaps due to the approach I try to use or any suggestions on how to troubleshoot and overcome it?

                  Thanks.

                  Comment

                  Working...
                  X