Announcement

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

  • Analysis of crossover design controlling for covariates

    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

    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!


  • #2
    What is group?

    Comment


    • #3
      Is there a missing ID variable in your sample data, Eduardo? I speculate that the first 3 rows belong to one subject, the next 3 rows to another, etc. If so, you'll need an ID variable as the cluster variable for your mixed command. HTH.
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        The group variable refers to whether the person was allocated to one group or the other (first group received treatment at time 0, second group at time 1).
        I think my first data export was misleading as I simply exported collapsed data to show the allocation between the two groups.
        This is an example with individual level data, sbp is the outcome, and sex and age covariates


        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input byte(id time treatment group) int sbp byte(sex age)
        1 1 1 1 130 0 66
        1 2 0 1 128 0 66
        1 3 0 1 127 0 66
        2 1 0 2 111 1 55
        2 2 1 2 112 1 55
        2 3 0 2 108 1 55
        3 1 1 1 127 1 58
        3 2 0 1 114 1 58
        3 3 0 1 118 1 58
        4 1 0 2 127 0 60
        4 2 1 2 124 0 60
        4 3 0 2 129 0 60
        end
        mixed time i.treatment c.time#i.treatment age sex || id:

        I am not sure this would give me same answers than pkcross but controlling for covariates as well

        Comment


        • #5
          So, I think you mean
          Code:
          mixed sbp time i.treatment c.time#i.treatment age sex || id:
          
          which can be more compactly written as:
          
          mixed sbp i.treatment##c.time age sex || id:
          The thing to remember is that group (which represents order of treatments) is intimately connected to time and treatment and is almost predictable from time and treatment (except for the fact that treatment is always 0 in time 2), so you cannot simultaneously estimate the group, treatment, and time effects. By using the model that omits group, you are in effect imposing the constraint that order of treatment does not matter: only the treatment in place and the time period itself. This is a perfectly acceptable way of identifying the model (though not the only way). I do not use the -pk- suite of commands, so I have no idea whether this model and these results are similar to what -pkcross- would do. In any case, it is a perfectly reasonable way to go about modeling this.

          That said, if group assignment was randomized, and if there was no attrition (or at least no unbalanced attrition) over time, you probably do not need to adjust for age and sex: there is only a small probability that they would be confounders here (assuming you have an appreciable enough sample size for the law of large numbers to help you with balance among groups). While you might gain some efficiency by reducing outcome variance with this covariate adjustment, you need to consider whether that is worth having to depart from your originally preferred analysis. Maybe the answer is yes, but make the decision consciously.

          Comment


          • #6
            Thanks Clyde.

            As for the model, I am not sure whether I should look at the slope (i.treatment#c.time), at the fixed effect of treatment (i.treatment), or at a combination of both to assess the treatment effect. Right now I am inclined to look at the slope only because it would tell me the variation of the outcome over time for the treated as compared to non-treated.
            To me the estimate of treatment only would simply tell me the overall adjusted difference between treated and non treated which, especially in a crossover design, seems to be dependent on the baseline value of the outcome in each of the two groups as well. But, again, I am not sure whether I am wrong.

            Thanks

            E.

            Comment


            • #7
              The slope of time in the model is simply the slope of the outcome vs time trajectory under the condition treatment = 0. The coefficient of the interaction term 1.treatment#c.time is the difference between the slope of the time trajectory for treatment = 1 and the slope of the time trajectory for treatment = 0. A more intuitive way to examine results from a model with interaction terms is to use the margins command following the regression:

              Code:
              margins treatment, dydx(time)
              That will give you the outcome vs time slope in each of the treatment groups separately. (The result for treatment = 0 will be the same as in the regression output.) These slopes are the main results for this kind of model. If you want a test of the difference between them, that goes back to the regression output itself and is shown there in association with the 1.treatment#time coefficient.

              Comment


              • #8
                Originally posted by Eduardo Torre View Post
                The group variable refers to whether the person was allocated to one group or the other (first group received treatment at time 0, second group at time 1).
                I think my first data export was misleading as I simply exported collapsed data to show the allocation between the two groups.
                This is an example with individual level data, sbp is the outcome, and sex and age covariates


                Code:
                * Example generated by -dataex-. To install: ssc install dataex
                clear
                input byte(id time treatment group) int sbp byte(sex age)
                1 1 1 1 130 0 66
                1 2 0 1 128 0 66
                1 3 0 1 127 0 66
                2 1 0 2 111 1 55
                2 2 1 2 112 1 55
                2 3 0 2 108 1 55
                3 1 1 1 127 1 58
                3 2 0 1 114 1 58
                3 3 0 1 118 1 58
                4 1 0 2 127 0 60
                4 2 1 2 124 0 60
                4 3 0 2 129 0 60
                end
                mixed time i.treatment c.time#i.treatment age sex || id:

                I am not sure this would give me same answers than pkcross but controlling for covariates as well
                Hi Eduardo,

                Have you finished this analysis and results? I am working with cross-over analysis, I have same questions you asked. If this analysis article have published, could you please share your article to me?

                Thanks,

                Hui

                Comment

                Working...
                X