Announcement

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

  • Jackknife for xtpcse

    Hi,

    I am trying to conduct a Jackknife estimation.

    The following command is able to be executed, even though the output looks dubious:
    Code:
    jackknife coef=property_rights: xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment,
    pairwise correlation(ar1)
    However, with the above command it excludes a single observation at a time.
    My interest is not if the findinds hold when excluding individual observations (577) but rather excluding countries (100). So I attempted the following, adding cluster(country):

    Code:
    jackknife coef=property_rights: xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment,
    pairwise correlation(ar1) cluster(country_id)
    But i retrieve the following error:
    Code:
    varlist not allowed
    Does anyone know how to exclude specific clusters rather than observations for the specified regression?

    //Laurence

  • #2
    From the output of help jackknife, cluster() is an option to the jackknife command, rather than to the xtpcse command being run by jackknife, so at a minimum your command needs to be something like
    Code:
    jackknife coef=property_rights, cluster(country_id): xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment, pairwise correlation(ar1)
    The error message apparently generated by xtpcse seems ... misleading, to be generous about it.

    Comment


    • #3
      Thank you for your help William.

      Unfortunately, the output still looks odd.

      Code:
      . jackknife coef=property_rights, cluster(country_id): xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment, pairwise correlation(ar1)
      (running xtpcse on estimation sample)
      
      Jackknife replications (100)
      ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
      ..................................................    50
      ..................................................   100
      
      Jackknife results                               Number of obs     =        577
                                                      Replications      =        100
      
            command:  xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment, pairwise correlation(ar1)
               coef:  property_rights
                n():  e(N)
      
                                  (Replications based on 100 clusters in country_id)
      ------------------------------------------------------------------------------
                   |              Jackknife
                   |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
              coef |          3          .        .       .            .           .
      ------------------------------------------------------------------------------
      Do you have any suggestions for what I need to adjust/correct?

      Comment


      • #4
        I have no ideas; I use neither jackknife nor xtpcse. But it would perhaps help someone else who is more familiar than I am with xtpcse to see the output from xtpcse run without the jackknife.

        Comment


        • #5
          Of couse, thank you for the suggestion. The command and output are as follows:

          Code:
          jackknife coef=property_rights, cluster(country_id) eclass: xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment, pairwise correlation(ar1)
          (running xtpcse on estimation sample)
          
          Jackknife replications (34)
          ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
          ..................................
          
          Jackknife results                               Number of obs     =        249
                                                          Replications      =         34
          
                command:  xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment, pairwise correlation(ar1)
                   coef:  property_rights
                    n():  e(N)
          
                                       (Replications based on 34 clusters in country_id)
          ------------------------------------------------------------------------------
                       |              Jackknife
                       |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                  coef |          9          .        .       .            .           .
          ------------------------------------------------------------------------------

          Comment


          • #6
            For anyone interested, I shifted focus from the coefficients to the standard errors and retrived useful output from the command shown below.

            Code:
            jackknife, cluster(country_id): xtpcse tea_opp property_rights lag1_log_gdp_per_capita_ppp_cons unemployment, pairwise correlation(ar1)
            (running xtpcse on estimation sample)
            
            Jackknife replications (34)
            ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
            ..................................
            
            Prais-Winsten regression, correlated panels corrected standard errors (PCSEs)
            
            Group variable:   country_id                    Number of obs     =        249
            Time variable:    year                          Number of groups  =         34
            Panels:           correlated (unbalanced)       Obs per group:
            Autocorrelation:  common AR(1)                                min =          1
            Sigma computed by pairwise selection                          avg =  7.3235294
                                                                          max =         11
            Estimated covariances      =       595          R-squared         =     0.3157
            Estimated autocorrelations =         1          Wald chi2(3)      =          .
            Estimated coefficients     =         4          Prob > chi2       =     0.0774
            
                                                             (Replications based on 34 clusters in country_id)
            --------------------------------------------------------------------------------------------------
                                             |              Jackknife
                                     tea_opp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            ---------------------------------+----------------------------------------------------------------
                             property_rights |   .0240794   .2181675     0.11   0.913    -.4197858    .4679446
            lag1_log_gdp_per_capita_ppp_cons |   2.168841   2.910386     0.75   0.461    -3.752385    8.090067
                                unemployment |  -.1190462   .0647625    -1.84   0.075    -.2508065    .0127141
                                       _cons |  -3.614457   13.07118    -0.28   0.784    -30.20798    22.97906
            ---------------------------------+----------------------------------------------------------------
                                         rho |   .5591998
            --------------------------------------------------------------------------------------------------
            Thanks again to you William :-)

            Comment

            Working...
            X