Announcement

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

  • TSCS-data and variation of y on levels of x

    Hey community

    Is there a stata command in the form of a regression etc. that shows an output that shows the degree of variation of y over time at different levels of x in our study. Specifically, we will examine whether a unit with a higher level of x varies less on y over time than units with lower levels of x. We've had a go at specifying our panel variable (countries) and time variable (days) with the xtset command, then we tried with an xtreg command, but the following doesn't seem to work:
    by x: xtreg y, tvar(days)

    We also don't know if it's the right command, but maybe you can help us further with that.

    Thanks a lot in advance

  • #2
    Brian:
    welcome to this forum.
    Without further details from your end (please follow the FAQ guidance about how to post more effectively. Thanks) guess-work rules.
    That said, you may want to try something along the following lines:
    Code:
    xtset countries days
    xtreg y i.x i.time <otherpredictors>, fe
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X