Announcement

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

  • estat simple, predict(xb) after jwdid returns error: “last estimates not found (r(301))”

    Dear Stata users,

    I am running the jwdid command with the ETWFE method as follows:

    use ${usr_data}/data_sdid_84, clear
    local spec "MAIN"
    jwdid fdi, ivar(id_ci_cj) tvar(year) gvar(first_treat_3) method(ppmlhdfe) fe(idt_ci idt_cj)
    estat simple, predict(xb)

    However, Stata returns the following error:
    last estimates not found
    r(301);

    Could anyone please explain why this happens?
    I was hoping to obtain the fitted values (xb) after running jwdid using the ppmlhdfe method, similar to what we do with other estimation commands. Is there a specific postestimation command or syntax for generating predicted values after jwdid?

    Thank you very much for your help.

    Best regards,
    Hinh

  • #2
    Are you sure that your jwdid command ran without error? I would guess not, and therefore there are no estimates in memory for estat to work with.

    One possibility why the jwdid command did not run, if it did not, is that I don't think it accepts fe as an option. I think you need to write out the option as fevar.

    Also, as you are asked to explain (for the sake of others trying to follow your question) in the Statalist FAQ #12, jwdid is a community-contributed command available via ssc install jwdid.
    Last edited by Hemanshu Kumar; 05 Oct 2025, 06:23.

    Comment


    • #3
      Correct
      So, try if the error is on your end or the command. So try first the example. If that runs, its your specific specification.
      Also, for prediction, just like usual
      predict yhat, xb
      or similar

      Comment

      Working...
      X