Announcement

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

  • Using -suest- with first-differences and factor variables (?)

    Hi.

    I am trying to find the standard error of a product of two coefficients that come from different regressions.

    Therefore I am trying to use a combination of the -suest- and -nlcom- commands.

    However, I am running into an error when I use the -suest- command. I keep getting the error: "estimation sample of the model saved under m1 could not be restored r(198)".

    I have used -estimates save- and -estimates use- and -estimates sto- to make sure the two estimate stores are loaded.
    -est dir- shows me that both my models are loaded.

    I don't understand why I am getting the error. Could it be that -suest- is not compatible with D. commands (for first-differencing) or perhaps factor variables?

    Really have spend so many hours online to try to find an answer.

    As an alternative, is there an easy way to calculate the standard error of the product of 2 coefficients manually?

    Many thanks!

  • #2
    It would be easier to help with a detailed example of your codes. If you need 95% CIs, have you tried bootstrapping?

    Comment


    • #3
      Hi Tiago,
      Thanks for your response.

      Code:
      reg D.(ln_agr_prod spei_05) i.year i.country_id
      est save m1
      
      reg D.(ln_GDPcap_WDI agcomp_lag spei_05) i.year i.country_id
      est save m2
      
      est use m1
      est sto m1
      
      est use m2
      est sto m2
      
      est dir 
      
      suest m1 m2, cluster(country_id)
      -est dir- confirms both stores are loaded.

      I then get this r(198) error so don't even have the chance to run -nlcom-

      Any thoughts?
      Last edited by Alex Alain; 17 Feb 2022, 03:54.

      Comment

      Working...
      X