Dear Statalist,
I would like to analyse data from a crossover trial but I need to control for covariates. The Stata command 'pkcross' doesn't seem to provide this option.
In my case the data structure is the following:
Time: 0/1/2
Treatment : 0/1
Group: 0/1
I tried to fit a mixed effect linear regression as follows:
mixed outcome i.treatment i.group c.time c.time#i.group cov1 cov2 cov3 || id:
But I am not sure whether this might be the right way to analyse it. Also, if you could suggest a good read on the topic that would be great!
I would like to analyse data from a crossover trial but I need to control for covariates. The Stata command 'pkcross' doesn't seem to provide this option.
In my case the data structure is the following:
Time: 0/1/2
Treatment : 0/1
Group: 0/1
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte time float(treatment group) 1 1 1 2 0 1 3 0 1 1 0 2 2 1 2 3 0 2 end
I tried to fit a mixed effect linear regression as follows:
mixed outcome i.treatment i.group c.time c.time#i.group cov1 cov2 cov3 || id:
But I am not sure whether this might be the right way to analyse it. Also, if you could suggest a good read on the topic that would be great!
Comment