Announcement

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

  • Using interaction terms in single-group ITSA

    Hi all,

    Hoping for some help with this. I am running an interrupted time series analysis. I have brisk walking minutes data before an intervention is introduced. The intervention is introduced at time zero, then I have post-intervention brisk walking minutes. This is a single group, with no control group, as it is real world data.

    My code is as follows:
    ttset id interventionday
    (where id is the unique id, and intervention day is the day of data in relation to intervention start)
    xtitsa briskmins, single trperiod(0) vce (robust) posttrend figure replace
    (where briskmins is the number of brisk minutes on that day)

    My question is how do I fit an interaction term. I want to see if the post-intervention step and gradient is different for different genders, but using ## doesn't seem to work. e.g.
    xtitsa briskmins##gender, single trperiod(0) vce (robust) posttrend figure replace
    xtitsa briskmins#gender, single trperiod(0) vce (robust) posttrend figure replace

    I would ideally like to graph one on top of the other as well.

    Any ideas? Thanks!
    Last edited by dharani yerrakalva; 23 Feb 2024, 03:10.
Working...
X