Announcement

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

  • repeated measures of the same variables

    Hello
    What is the best test to investigate the changes over visits for the same variable between treated vs placebo groups? i.e. I have 2 arms with baseline measures and at 6 months and then at 12 months how to assess the changes across the 3 visits taking into account baseline adjustment as both groups have not started from the same level (randomly assigned to treatment vs placebo). I do appreciate any help as I am tired of not getting any answer by asking many people I know (everyone is busy) and I am a lone with my project as a PhD student

  • #2
    I would probably do this as a 2-level model with random intercepts at the participant level, the predictor variables being study arm, time (a discrete 3 level variable) and the study-arm#time interaction. So something like
    Code:
    mixed response_variable i.arm##i.time || participant:
    The average treatment effects among the treated at times 2 and 3 will be given by the coefficients of 1.arm#2.time and 1.arm#3.time, assuming you have coded arm as 0 = placebo, 1 = treatment.

    This is a starting point you can work from. Various modifications and embellishments may be applicable depending on specific circumstances.

    Comment


    • #3
      Thank you I got this
      mixed ipiratiolg i.group##i.visit || PatientID:

      Performing EM optimization:

      Performing gradient-based optimization:

      Iteration 0: log likelihood = -1346.8434
      Iteration 1: log likelihood = -1346.8434

      Computing standard errors:

      Mixed-effects ML regression Number of obs = 1,152
      Group variable: PatientID Number of groups = 72

      Obs per group:
      min = 6
      avg = 16.0
      max = 18

      Wald chi2(5) = 47.75
      Log likelihood = -1346.8434 Prob > chi2 = 0.0000

      ------------------------------------------------------------------------------
      ipiratiolg | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      group |
      Treated | .1723842 .1854977 0.93 0.353 -.1911846 .535953
      |
      visit |
      5 | .2291495 .0901186 2.54 0.011 .0525202 .4057788
      8 | .1766221 .0879796 2.01 0.045 .0041853 .3490589
      |
      group#visit |
      Treated#5 | .1753507 .1119954 1.57 0.117 -.0441563 .3948576
      Treated#8 | -.0799084 .108479 -0.74 0.461 -.2925233 .1327066
      |
      _cons | -2.338519 .1498054 -15.61 0.000 -2.632132 -2.044906
      ------------------------------------------------------------------------------

      ------------------------------------------------------------------------------
      Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
      -----------------------------+------------------------------------------------
      PatientID: Identity |
      var(_cons) | .4745696 .0845799 .3346532 .6729841
      -----------------------------+------------------------------------------------
      var(Residual) | .5115566 .0220082 .4701899 .5565627
      ------------------------------------------------------------------------------
      LR test vs. linear model: chibar2(01) = 563.88 Prob >= chibar2 = 0.0000

      I was able to graph it by further contrast and margins commands. My questions: where is the P value for treated vs placebo at v5 and v8. I coded the groups as 1=placebo, 2 treatment. Many thanks much appreciated I need more help with interpreting the results and then I go super happy to my meeting in 2 days
      Last edited by Zainab Mahmood; 26 Sep 2023, 13:24.

      Comment


      • #4
        The results with the treatment effects at times 5 and 8 are found in the output rows that begin with Treated#5 and Treated#8, respectively.

        Comment


        • #5
          Thank you. Much appreciated. That can be put as P valuse of Treated vs Placebo at v5 is 0.1 and at v8 is 0.4.
          When I compared both T vs P at each visit with Mann Whitney test (of ttest) I got significant difference. Is that because this mixed test took in consideration the baseline adjustment?

          Comment


          • #6
            Yes, the analysis with -mixed- accounts for the baseline difference in outcome between groups, which was pretty substantial, where as just testing group differences at the later times does not.

            More generally, though, do bear in mind that it is meaningless to compare a "significant" result from one test with a "not significant" result from another, in any circumstances. It tells you nothing.

            Comment


            • #7
              Originally posted by Zainab Mahmood View Post
              . . . I have 2 arms with baseline measures and at 6 months and then at 12 months how to assess the changes across the 3 visits . . .
              I don't have anything to add to Clyde's excellent advice, but I do have a question.

              The output from mixed that you show above in #3 says in the regression table's header that you have a minimum of six observations per study participant and as many as eighteen.

              How does that happen? I would've expected no more than three observations per participant (baseline and two follow-up visits).

              I noticed that your three- and six-month visits are labeled (numbered) as visits 5 and 8, and so there might be at least as many visits whose data you do not intend to include in your regression model.

              You wouldn't happened to have accidentally included them, say, by a coding error in the data-management steps?

              Comment


              • #8
                Thank you for considering this important point, in fact at each visit I have tested the blood marker six times (over 2 hours) following a meal. I have error in this syntax. I noticed it later. I need to add if Timepoint==0 or T==15 ...etc. to get the difference between the groups over the three visits as it is pointless to compare time 0 to time 120 as we know there will be stimulation. Thanks again

                Comment


                • #9
                  mixed ipiratiolg i.group##i.visit if Timepoint==120 || PatientID:

                  Performing EM optimization:

                  Performing gradient-based optimization:

                  Iteration 0: log likelihood = -230.89779
                  Iteration 1: log likelihood = -230.89776

                  Computing standard errors:

                  Mixed-effects ML regression Number of obs = 192
                  Group variable: PatientID Number of groups = 72

                  Obs per group:
                  min = 1
                  avg = 2.7
                  max = 3

                  Wald chi2(5) = 11.58
                  Log likelihood = -230.89776 Prob > chi2 = 0.0410

                  ------------------------------------------------------------------------------
                  ipiratiolg | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  group |
                  Treated | .0632786 .2138413 0.30 0.767 -.3558427 .4823999
                  |
                  visit |
                  5 | .0972594 .2045234 0.48 0.634 -.303599 .4981179
                  8 | .1740966 .1980421 0.88 0.379 -.2140588 .5622519
                  |
                  group#visit |
                  Treated#5 | .3666328 .2539193 1.44 0.149 -.1310398 .8643055
                  Treated#8 | -.0431406 .24574 -0.18 0.861 -.5247822 .4385011
                  |
                  _cons | -2.08645 .1717424 -12.15 0.000 -2.423059 -1.749841
                  ------------------------------------------------------------------------------

                  ------------------------------------------------------------------------------
                  Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
                  -----------------------------+------------------------------------------------
                  PatientID: Identity |
                  var(_cons) | .2896473 .080449 .1680544 .4992166
                  -----------------------------+------------------------------------------------
                  var(Residual) | .4477394 .0576594 .3478632 .5762913
                  ------------------------------------------------------------------------------
                  LR test vs. linear model: chibar2(01) = 24.02 Prob >= chibar2 = 0.0000

                  .
                  I got this the with adding if

                  Comment


                  • #10
                    Originally posted by Zainab Mahmood View Post
                    . . . at each visit I have tested the blood marker six times (over 2 hours) following a meal. . . . we know there will be stimulation.
                    Too late for your meeting today, but you could consider a couple of ways to improve efficiency and perhaps get a clearer picture of the meal-elicited increase in the blood marker.

                    1. If the approach isn't considered too radical in your field of study, then you could compute the area under the curve (AUC0-120) of the blood marker concentration over the two-hour postprandial observation interval. Something like the following (untested).
                    Code:
                    sort PatientID visit Timepoint
                    by PatientID visit: integ ipiratiolg Timepoint, generate(auc) double
                    mixed auc i.group##i.visit if Timepoint == 120 || PatientID: , ///
                        noconstant residuals(unstructured, t(Timepoint))
                    2. Depending upon the time profile of the stimulation, you could analogously examine the maximum excursion during the observation interval.
                    Code:
                    bysort PatientID visit: egen double max = max(ipiratiolg)
                    mixed max i.group##i.visit if Timepoint == 120 || PatientID: , ///
                        noconstant residuals(unstructured, t(Timepoint))
                    3. If response time is considered biologically important for the blood marker, then you could examine time-to-maximum as well, Following up 2. immediately above.
                    Code:
                    generate int tma = Timepoint if float(max) == float(ipiratiolg)
                    egen int time2max = min(tma)
                    mixed time2max i.group##i.visit if Timepoint == 120 || PatientID: , ///
                        noconstant residuals(unstructured, t(Timepoint))
                    The syntax in red converts the model to a MANOVA-like analysis, which might gain some statistical efficiency over the repeated-measures ANOVA-like analysis that you're using now. You'll probably want to check the residuals using qnorm (especially for the time-to-maximum analysis), and if they look too far from normal-like, then forgo the MANOVA-like approach. Regardless, I recommend making liberal use of marginsplot following any of the models fitted to these outcomes..

                    Comment

                    Working...
                    X