Dear Stata users,
I am examining the impact of variable X on Y in presence of a time-varying categorical variable Z with multiple levels.
I already have multiple records per patient with t0 and t denoting the start and end intervals for each level of Z.
ID t0 t z Y
1 0 5 0 0
1 5 10 1 0
1 10 20 2 1
2 0 7 0 1
My question is if I want to stset my data, in what form should my time variable be is it the interval-specific duration or t (cumulative time from the start for follow-up for each record)?
I am examining the impact of variable X on Y in presence of a time-varying categorical variable Z with multiple levels.
I already have multiple records per patient with t0 and t denoting the start and end intervals for each level of Z.
ID t0 t z Y
1 0 5 0 0
1 5 10 1 0
1 10 20 2 1
2 0 7 0 1
My question is if I want to stset my data, in what form should my time variable be is it the interval-specific duration or t (cumulative time from the start for follow-up for each record)?