Announcement

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

  • Problem with xtdidregress post estimation

    I was running the following command:

    Code:
    gen densidade = populacao/area
    
    gen pib_percapita = pib/populacao
    
    xtset id_municipio year
    
    generate did = treated*treatment
    
    xtdidregress (marriage_women pib_percapita g3 g4 densidade populacao taxpayers) (did), group(id_municipio) time(year)
    
    estat trendplots, ytitle(marriage_women treated)
    
    estat grangerplot
    
    estat ptrends
    However, when I run the following post-estimation commands, I get the following error messages:

    Code:
    estat trendplots, ytitle(marriage_women treated)
    treatment assignment times vary; not allowed with estat trendplots
    
    estat grangerplot
    estat grangerplot not valid
    None of these errors were communing up, and even after reading the issues in the forum, I could not solve mine.

    I am attaching the codes and the dataset in this link, so I think it will be easier to handle the dataset.




  • #2
    I was able to successfully run your code in Stata 17 and 18. It looks like you are using an out-of-date version of Stata 17. In Stata, type
    Code:
    update query
    and follow the instructions on the screen. Once updated, both estat trendplots and estat grangerplot should work.

    Comment


    • #3
      Thank you so much! I worked fine.

      Comment

      Working...
      X