Announcement

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

  • pkcross command: 3x3 crossover design

    Hello statalist,

    Is it possible to analyse a randomised three-period, three-treatment crossover trial using the pkcross command? If so, does anyone know of an example? I wish to look at the period, sequence, treatment and carryover effects.

    Thanks

    Laura

  • #2
    Welcome to Statalist, Laura! The first thing to do before you post is try to find the answer in the documentation. (Well, the very first thing you should do is read the FAQ, especially FAQ 12.) Here's an example of pkcross with a 3x3 crossover, based on Example 3 of the Manual entry for pkshape, which has an analysis with anova. pkcross is a more elaborate ANOVA, so it's not surprising that it can analyze the same data. Note that pkcross with no carryover and anova give the same results.

    Code:
    use http://www.stata-press.com/data/r14/applesales, clear
     pkshape id seq p1 p2 p3, order(bca abc cab) ///
     seq(pattern) period(order) treat(displays)
    
    anova outcome pattern order display id|pattern
    
    
                             Number of obs =         18    R-squared     =  0.9562
                             Root MSE      =    1.59426    Adj R-squared =  0.9069
    
                      Source | Partial SS         df         MS        F    Prob>F
                  -----------+----------------------------------------------------
                       Model |  443.66667          9   49.296296     19.40  0.0002
                             |
                     pattern |  .33333333          2   .16666667      0.07  0.9370
                       order |  233.33333          2   116.66667     45.90  0.0000
                    displays |        189          2        94.5     37.18  0.0001
                  id|pattern |         21          3           7      2.75  0.1120
                             |
                    Residual |  20.333333          8   2.5416667  
                  -----------+----------------------------------------------------
                       Total |        464         17   27.294118  
    
    .
     ** pkcross: no carryover
    . pkcross outcome, seq(pattern) treat(displays) period(order) id(id) carry(none)
                                                     sequence variable = pattern
                                                       period variable = order
                                                    treatment variable = displays
                                                    carryover variable =
                                                           id variable = id
                     Analysis of variance (ANOVA) for a crossover study
         Source of Variation  | Partial SS   df        MS          F     Prob > F
        ----------------------+--------------------------------------------------
         Intersubjects        |
             Sequence effect  |       0.33    2        0.17      0.02      0.9767
                    Residuals |      21.00    3        7.00      2.75      0.1120
        ----------------------+--------------------------------------------------
         Intrasubjects        |
             Treatment effect |     189.00    2       94.50     37.18      0.0001
                Period effect |     233.33    2      116.67     45.90      0.0000
                    Residuals |      20.33    8        2.54
        ----------------------+--------------------------------------------------
                        Total |     464.00   17
    
    .
    . **pkcross with carryover
    . pkcross outcome, seq(pattern) treat(displays) period(order) id(id) carry(carry)
                                                     sequence variable = pattern
                                                       period variable = order
                                                    treatment variable = displays
                                                    carryover variable = carry
                                                           id variable = id
                     Analysis of variance (ANOVA) for a crossover study
         Source of Variation  | Partial SS   df        MS          F     Prob > F
        ----------------------+--------------------------------------------------
         Intersubjects        |
             Sequence effect  |       2.67    2        1.33      0.19      0.8358
                    Residuals |      21.00    3        7.00      2.62      0.1451
        ----------------------+--------------------------------------------------
         Intrasubjects        |
             Treatment effect |      31.67    2       15.83      5.94      0.0378
             Carryover effect |       4.33    2        2.17      0.81      0.4872
                Period effect |     221.13    2      110.57     41.46      0.0003
                    Residuals |      16.00    6        2.67
        ----------------------+--------------------------------------------------
                        Total |     464.00   17
    
        Omnibus measure of separability of treatment and carryover =   18.3503%
    .
    Last edited by Steve Samuels; 26 Apr 2016, 12:36.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment

    Working...
    X