Announcement

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

  • Code

    Hello everybody,

    im new user for STATA

    Im curious. I have panel data I ran this code in my difference in differences regression

    STATA Command for output findings

    reg dep.var Time Treated DID Capitalization Deposits logGDP Inflation HHI Liquidity Size, robust

    However since I have a paneldata I came to the conclusion, that I should use xtreg. But here is my issue, it keeps sayin this whenever I try and rund it. RWA is my dependent variable

    xtreg RWA i.Treated##i.Time Capitalization Liquidity Deposits Inflation HHI Size logGDP, robust

    the panel variable RWA may not be included as an independent variable
    r(198);

    Could anyone help


  • #2
    Amalie:
    how did you -xtset- your dataset?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Uh, im sorry im not sure how I should xtset it? how do I do?

      Comment


      • #4
        Amalie:
        you could not have run -xtreg. without -xtset- ting your dataset beforehand.
        That said, if you have panel data, you should have:
        a) a -panelvar- (firms or whatever else):
        b) a -timevar- (years, months, waves of data, else);
        c) via -xtset- you're telling Stata that you're going to deal with a panel dataset;
        d)
        Code:
        xtset panelvar timevar
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X