Announcement

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

  • JWDID in Gravity Setting

    Dear All!
    I am using jwdid to estimate the impact of regional trade agreements (RTA) on bilateral trade flows
    (1) In the first case, the outcome (trade-flows) is at aggregated-level and varies at exporter-importer-year dimension. I am running the following code
    Code:
    jwdid trade, ivar(id_ci_cj) tvar(year) gvar(RTA_ij) method(ppmlhdfe) fevar(idt_ci idt_cj)
    I am interested to obtain simple overall ATT using cohort-specific weights, therefore i ran the following code after jwdid
    Code:
    estat simple [pweight=w_g], predict(xb)
    it produces an error that w_g not found.

    (2) In the second case, I keep the data at disaggregated industry level. Here, the outcome varies at exporter-importer-industry-year dimension. Therefore, the panel ID, ivar(id_ci_cj_sk), identifies the trade flows between country i (ci) and country j (cj) in industry k(sk) and the tvar(year) is the time variable. Since being an industry-level panel on trade flows across 147 countries across 1990-2010 period, this involves a data set of 16,038,031 observations. I ran the following code to obtain the ETWFE estimates:
    Code:
    jwdid trade, ivar(id_ci_cj_sk) tvar(year) gvar(RTA_ij) method(ppmlhdfe) fevar(idt_ci idt_cj)
    This gives the following error message:

    reghdfe_standardize(): 3900 unable to allocate real <tmp> [15619903, 109]
    GLM: : init_variables(): - function returned error
    <istmt>: - function returned error

    r(3900)

    109 are total number of coefficients ATT(g,t)]'s estimated in our model.

    I would greatly appreciate any help in this regard.


    FernandoRios

    Thanks and regards,
    (Ridwan)

  • #2
    vFirst issue. Seems you run out of memory. you may consider upgrading your Ram

    First issue, w_g. If that variable exist in our data, then it may be an issue with your version of Stata. Stata 17 had a kind of bug with weights on Margins

    Comment

    Working...
    X