Announcement

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

  • #16
    Hi Tom,
    I've been testing the inclusion of more exporters, but I have the same problem: the distance and other geographical variables are omitted. It seems that some observations are either singletons or separated by a fixed effect. Could you explain me that better?

    I attach my code, where importador is importer-fixed effect and exportador is exporter-fixed effects.
    Code:
    ppmlhdfe exports lndistance commom_border tariff, a(importador exportador) cluster(distance)
    I also attach my fake data (it's a simple simulation data)}

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str3(exporter importer) str2 hs2 float(exports commom_border tariff exportador importador exp_imp distance lndistance)
    "PER" "BRA" "10"    0 1 12.5 3 1 3  2000.1 7.600953
    "PER" "BRA" "10"    0 1 12.9 3 1 3  2000.1 7.600953
    "PER" "USA" "20"  201 0   50 3 4 5  5000.6 8.517313
    "PER" "USA" "20" 25.5 0   12 3 4 5  5000.6 8.517313
    "PER" "CHL" "30" 60.2 1   64 3 2 4 1500.88 7.313807
    "BRA" "PER" "30"    0 1 10.2 1 3 1  2000.1 7.600953
    "BRA" "PER" "30"    0 1   10 1 3 1  2000.1 7.600953
    "USA" "PER" "10"    0 0 18.8 4 3 6  5000.6 8.517313
    "USA" "PER" "10"  6.1 0 16.5 4 3 6  5000.6 8.517313
    "CHL" "PER" "20"  .55 1 20.6 2 3 2 1500.88 7.313807
    "CHL" "PER" "20"    0 1    0 2 3 2 1500.88 7.313807
    "PER" "CHL" "30"   52 1    0 3 2 4 1500.88 7.313807
    end
    And my results
    Code:
    . ppmlhdfe exports lndistance commom_border tariff, a(importador exportador) cluster(distance)
    (dropped 4 observations that are either singletons or separated by a fixed effect)
    note: 2 variables omitted because of collinearity: lndistance commom_border
    Iteration 1:   deviance = 1.4272e+02  eps = .         iters = 2    tol = 1.0e-04  min(eta) =  -2.31  P   
    Iteration 2:   deviance = 1.0608e+02  eps = 3.45e-01  iters = 2    tol = 1.0e-04  min(eta) =  -3.30      
    Iteration 3:   deviance = 9.7998e+01  eps = 8.25e-02  iters = 2    tol = 1.0e-04  min(eta) =  -4.22      
    Iteration 4:   deviance = 9.6078e+01  eps = 2.00e-02  iters = 2    tol = 1.0e-04  min(eta) =  -5.00      
    Iteration 5:   deviance = 9.5717e+01  eps = 3.77e-03  iters = 2    tol = 1.0e-04  min(eta) =  -5.52      
    Iteration 6:   deviance = 9.5690e+01  eps = 2.85e-04  iters = 2    tol = 1.0e-04  min(eta) =  -5.72      
    Iteration 7:   deviance = 9.5690e+01  eps = 2.72e-06  iters = 2    tol = 1.0e-04  min(eta) =  -5.74      
    Iteration 8:   deviance = 9.5690e+01  eps = 3.12e-10  iters = 2    tol = 1.0e-05  min(eta) =  -5.74   S O
    ------------------------------------------------------------------------------------------------------------
    (legend: p: exact partial-out   s: exact solver   h: step-halving   o: epsilon below tolerance)
    Converged in 8 iterations and 16 HDFE sub-iterations (tol = 1.0e-08)
    
    HDFE PPML regression                              No. of obs      =          8
    Absorbing 2 HDFE groups                           Residual df     =          1
    Statistics robust to heteroskedasticity           Wald chi2(1)    =       0.72
    Deviance             =  95.68961957               Prob > chi2     =     0.3969
    Log pseudolikelihood = -62.42041903               Pseudo R2       =     0.8083
    
    Number of clusters (distance)=         2
                                    (Std. Err. adjusted for 2 clusters in distance)
    -------------------------------------------------------------------------------
                  |               Robust
          exports |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
       lndistance |          0  (omitted)
    commom_border |          0  (omitted)
           tariff |   .0200342   .0236502     0.85   0.397    -.0263194    .0663879
            _cons |   3.696671   .9807143     3.77   0.000     1.774506    5.618836
    -------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------+
     Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------+---------------------------------------|
      importador |         3           0           3     |
      exportador |         3           2           1     |
    -----------------------------------------------------+
    Last edited by Juan Quicana; 09 May 2020, 14:41.

    Comment


    • #17
      Hi Juan,
      In your current data, the exporter fixed effect completely explains the distance between Peru and each of its import partners, and the importer fixed effect completely explains the distance between Peru and each of its import partners. What you need at a minimum for these types of variables to be identified is for there to be at least two importers that trade with two or more exporters or vice versa. Ideally, you would want to have a pseudo-square data set where every exporter trades with every importer, or at least something close to it.
      Regards,
      Tom

      Comment


      • #18
        Hi Tom,

        So, if I include 3 or 4 four exporters more with 50 importers, could the geographical variables be estimated? Or, do I need a perfect pseudo-square dataset to get those results?

        Comment

        Working...
        X