Announcement

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

  • Help with test for tendency of 2 categorical data taking into account the time

    I have a question about how to carry out the following analysis: I need to evaluate if there are differences between 2 drugs (A and B) over time collected through 3 categorical variables: RECIST1 (improvement/no improvement); RECIST2 (improvement/no improvement); RECIST3 (improves/does not improve).

    I have believed in doing a prtest, but it only shows me the differences of 1 proportion compared to another. However, my intention is to assess whether over the 3 visits these proportions in RECIST1, RECIST2 and RECIST3 in drug A and B differ (significantly or not) over time.

    Here is some information in case it helps:
    trat (0/1): 55/53
    RECIST1, RECIST2, RECIST3 (0/1)

    Code:
    bysort trat: tab1 RECIST*,m 
                    
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    -> trat = A
    
    -> tabulation of RECIST1
    
                      RECIST1 |      Freq.     Percent        Cum.
    --------------------------+-----------------------------------
    respuesta + estabilizcion |         43       78.18       78.18
                   progresion |          4        7.27       85.45
                            . |          8       14.55      100.00
    --------------------------+-----------------------------------
                        Total |         55      100.00
    
    -> tabulation of RECIST2
    
                      RECIST2 |      Freq.     Percent        Cum.
    --------------------------+-----------------------------------
    respuesta + estabilizcion |         39       70.91       70.91
                   progresion |          4        7.27       78.18
                            . |         12       21.82      100.00
    --------------------------+-----------------------------------
                        Total |         55      100.00
    
    -> tabulation of RECIST3
    
                      RECIST3 |      Freq.     Percent        Cum.
    --------------------------+-----------------------------------
    respuesta + estabilizcion |         28       50.91       50.91
                   progresion |          4        7.27       58.18
                            . |         23       41.82      100.00
    --------------------------+-----------------------------------
                        Total |         55      100.00
    
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    -> trat = B
    
    -> tabulation of RECIST1
    
                      RECIST1 |      Freq.     Percent        Cum.
    --------------------------+-----------------------------------
    respuesta + estabilizcion |         40       75.47       75.47
                   progresion |          6       11.32       86.79
                            . |          7       13.21      100.00
    --------------------------+-----------------------------------
                        Total |         53      100.00
    
    -> tabulation of RECIST2
    
                      RECIST2 |      Freq.     Percent        Cum.
    --------------------------+-----------------------------------
    respuesta + estabilizcion |         34       64.15       64.15
                   progresion |          9       16.98       81.13
                            . |         10       18.87      100.00
    --------------------------+-----------------------------------
                        Total |         53      100.00
    
    -> tabulation of RECIST3
    
                      RECIST3 |      Freq.     Percent        Cum.
    --------------------------+-----------------------------------
    respuesta + estabilizcion |         24       45.28       45.28
                   progresion |          7       13.21       58.49
                            . |         22       41.51      100.00
    --------------------------+-----------------------------------
                        Total |         53      100.00

    Thanks!

  • #2
    Hello delao victor. If I follow, your data file looks like this:

    Code:
        trat   RECIST1   RECIST2   RECIST3  
           A         0         0         1  
           A         1         1         0  
           A         0         0         0  
           A         0         0         0  
           A         0         0         1  
           A         0         0         0  
           B         0         0         0  
           B         0         0         0  
           B         0         0         0  
           B         0         0         0  
           B         0         0         1  
    etc.
    And the 1, 2, and 3 on the RECIST variables refer to 3 time points. If I have understood correctly, I think you need to do the following:
    1. Use -reshape- to restructure the file from WIDE to LONG;
    2. Use -melogit- or -xtlogit- to estimate a logit model that takes into account the correlated nature of the repeated measures.
    You should find helpful examples in the help for those two commands.

    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      Thank you very much Bruce!
      I have converted my database to long format and I have performed a multilevel mixed-effects logistic regression model fitting vis and treatment as interaction (code attached). Then I have performanced a contrasts and linear hypothesis tests after estimation to obtain de pvalue.

      Code:
      melogit recist b1.vis##i.trat || code:
      margins , over(trat vis)
      contrast trat#vis
      contrast trat@vis
      contrast r.trat#r.vis
      Last edited by delao victor; 21 Dec 2022, 00:59.

      Comment

      Working...
      X