Announcement

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

  • McNemar's chi2 test for proportion

    Dear Community,
    In a RCT design with 2 groups (control group n=18 ; and Exercise Training group n=17) that were tested at baseline and at 2 months, I would like to know if:
    1/ the proportion of participant reporting some symptoms such as "muscle pain" is significantly decreasing after the 2-month follow up in each group.
    2/ if there is a significant difference on the proportion change between the group

    For the question 1/, I am not sure if the Mc Nemar's test is the test I have to use
    For the question 2/, I have no idea about the variable and the test that I can use

    I give you here an exemple :
    control group n=18 ; and Exercise Training group n=17.
    In the control group : 11 participants are reporting muscle pain at baseline while they were 8 at the end of the study.
    In the exercise training group : 11 participants are reporting muscle pain at baseline while they were 6 at the end of the study.

    thank you for your precious insight
    Merci
    F

  • #2
    Flo:
    being this one a longitudinal study (the same sample of patients are mesured twice), you may want to consider a panel data regression estimator such as -xtlogit-.
    That said, the really poor sample size does not encourage any inference.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Flo Bzh View Post
      . . .I would like to know if:
      1/ the proportion of participant reporting some symptoms such as "muscle pain" is significantly decreasing after the 2-month follow up in each group.
      2/ if there is a significant difference on the proportion change between the group
      To underscore Carlo's comment: even with 10× your number of participants and with a more generous intraclass correlation coefficient, power is only in the neighborhood of 70% for the first and 30% for the second.
      Code:
      version 18.0
      
      clear *
      
      // seedem
      set seed 1346700921
      
      program define simem, rclass
          version 18.0
          syntax , [n(integer 180)]
      
          drop _all
          quietly set obs `=2 * `n''
          generate long pid = _n
          generate double pid_u = rnormal(0, _pi / sqrt(3))
          generate byte trt = mod(_n, 2)
          quietly expand 2
          bysort pid: generate byte tim = _n - 1
          generate double p = ///
              11 / 18 * !trt * !tim + /// baseline in control treatment group
               8 / 18 * !trt *  tim + /// follow-up in control treatment group
              11 / 17 *  trt * !tim + /// baseline in experimental treatment group
               6 / 17 *  trt *  tim    // follow-up in experimental treatment group
          generate double xbu = pid_u + logit(p)
          generate byte out = rbinomial(1, invlogit(xbu))
          xtlogit out i.trt##i.tim, i(pid)
          return scalar tim = r(table)["pvalue", "out:1.tim"] < 0.05
          return scalar tXt = r(table)["pvalue", "out:1.trt#1.tim"] < 0.05
      end
      
      quietly simulate tim = r(tim) tXt = r(tXt), reps(300): simem
      
      tabulate tim, missing
      tabulate tXt, missing
      
      exit
      I suggest that you report summary statistics and leave it at that.

      Comment


      • #4
        thank you both of you for your insight,
        really appreciate
        i will read a bit more about the "xtlogit" function

        Best

        Comment

        Working...
        X