Announcement

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

  • Pharmacokinetics for multilevel data in STATA. pkcollapse?

    Dar all,

    thanks in advance.

    I am studying 5 doses of a drug (ranging from 0 to 5, with 0 as the reference dose).
    Each dose is administered to 8 different rats (there is no washout, the rat is sacrificed at the last timepoint), and I measure ta clinical outcome (seizure lenght) at various timepoints (0 30 60 90 120 150 180 210).
    I am interested in understanding if the AUC differs among the different doses, with a possible significance test compared to dose 0 (reference).
    I know this is not properly a Pharmacokinetics study. I need AUC to have an "overall" measure of efficacy.
    I have seen that the "pkcollapse" command does not account for the multilevel structure of these data (dose, id).
    Do you know of any other STATA tool for this type of evaluation?

    Please see below how my dataset appears.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte id int time double lenght byte dose
     1   0     80 0
     1  30 84.007 0
     1  60 85.878 0
     1  90  82.15 0
     1 120   85.2 0
     1 150     85 0
     1 180  88.92 0
     1 210     91 0
     2   0   80.3 0
     2  30  79.01 0
     2  60  83.92 0
     2  90  83.12 0
     2 120 87.056 0
     2 150   83.4 0
     2 180 89.856 0
     2 210     95 0
     3   0 82.357 0
     3  30 81.109 0
     3  60 83.834 0
     3  90 81.134 0
     3 120 87.058 0
     3 150   83.1 0
     3 180 89.858 0
     3 210     92 0
     4   0 79.789 0
     4  30     81 0
     4  60  84.89 0
     4  90 82.102 0
     4 120  88.02 0
     4 150     88 0
     4 180 90.802 0
     4 210     89 0
     5   0   77.9 0
     5  30     82 0
     5  60 83.129 0
     5  90 83.129 0
     5 120 83.029 0
     5 150     83 0
     5 180 91.929 0
     5 210     93 0
     6   0 79.535 0
     6  30 81.009 0
     6  60  82.85 0
     6  90  82.15 0
     6 120 89.169 0
     6 150     85 0
     6 180   88.3 0
     6 210     91 0
     7   0 79.356 0
     7  30   80.1 0
     7  60  84.16 0
     7  90  84.16 0
     7 120 87.089 0
     7 150     84 0
     7 180 87.989 0
     7 210     90 0
     8   0 78.355 0
     8  30 80.356 0
     8  60  81.16 0
     8  90  80.16 0
     8 120 90.167 0
     8 150     92 0
     8 180 86.967 0
     8 210     98 0
     9   0     80 1
     9  30 80.068 1
     9  60  82.52 1
     9  90  81.89 1
     9 120     84 1
     9 150 89.543 1
     9 180 93.818 1
     9 210     94 1
    10   0     82 1
    10  30 80.478 1
    10  60 85.756 1
    10  90 83.756 1
    10 120  81.34 1
    10 150 86.278 1
    10 180 94.856 1
    10 210     95 1
    11   0     82 1
    11  30 86.245 1
    11  60 87.858 1
    11  90 87.977 1
    11 120 85.256 1
    11 150  83.05 1
    11 180 89.858 1
    11 210     92 1
    12   0     78 1
    12  30 81.556 1
    12  60 83.402 1
    12  90 81.802 1
    12 120 83.456 1
    12 150 89.078 1
    12 180 93.902 1
    12 210     95 1
    13   0     82 1
    13  30  88.04 1
    13  60 88.529 1
    13  90 83.929 1
    end
    Thanks again.
    Gianfranco

  • #2
    Originally posted by Gianfranco Di Gennaro View Post
    I am interested in understanding if the AUC differs among the different doses, with a possible significance test compared to dose 0 (reference).
    Maybe try something along the following lines?
    Code:
    bysort id (time): integ lenght time, double generate(auc) trapezoid
    anova auc dose if time == 210

    Comment


    • #3
      Thank you very much Joseph Coveney .
      It works perfectly.
      Last edited by Gianfranco Di Gennaro; 16 Apr 2024, 07:15.

      Comment


      • #4
        Dear Joseph Coveney I forgot to ask you for some information.
        I know it's not specifically related to STATA, so I apologize in advance if I bother you.
        In this case, what is the unit of measurement for AUC? I imagine that since it's an area, it should be a length (time) squared? Thank you in any case.

        Comment


        • #5
          In this context, AUC is the measure of total drug exposure over time and is approximated by the discrete integral of drug dose over time, so its units are (drug dose unit) times (time unit).

          Comment


          • #6
            Originally posted by Gianfranco Di Gennaro View Post
            I measure ta clinical outcome (seizure lenght) at various timepoints (0 30 60 90 120 150 180 210).
            Originally posted by Gianfranco Di Gennaro View Post
            . . . what is the unit of measurement for AUC? I imagine that since it's an area, it should be a length (time) squared?
            It would be time × time (or time ⋅ time) in units of what was used to measure seizure length × units of time used for the intervals at which the outcome was measured. It would be qualified as AUC0–210 in the body of the report and in its tables and graphs.

            Comment


            • #7
              Dear all,

              thanks in advance.

              I am studying ART-ACT interaction in the same doses but blood samples collected over 5 time points (0-48 hours).

              I am interested in understanding how the AUC differs among those who took ART only, ACT only and ART-ACT combined.
              I need AUC to have an "overall" measure of efficacy.
              I have been trying the "pksumm" command but it keeps giving me this error message "follow-up times are different for each patient" r(459)
              Do you know of any other STATA tool for this type of evaluation? Can anyone assist me with what i am doing wrong with the time and how to over come that challenge

              Please see below how my dataset appears.
              ID TIME LUM-BI (ng/ml)
              8 0 8.11
              8 2 8.11
              8 12 3798
              8 24 400
              8 48
              9 0 61.5
              9 2 8285
              9 12 3490
              9 24
              9 48
              16 0 8.11
              16 2 8.11
              16 12 914
              16 24 3978
              16 48 320
              19 0 8.11
              19 2 8.11
              19 12 2497
              19 24 935
              19 48
              20 0 17.5
              20 2 16.3
              20 12 12940
              20 24 8004
              20 48 652
              21 0 8.11
              21 2 8.11
              21 12 2126
              21 24 4212
              21 48 621
              22 0 13.6
              22 2 11.3
              22 12 1259
              22 24
              22 48
              23 0 8.11
              23 2 8.11
              23 12 337
              23 24 1319
              23 48 64.9
              24 0 8.11
              24 2 30.7
              24 12 2181
              24 24 433
              24 48 1623
              26 0 8.11
              26 2 2016
              26 12 1918
              26 24 955
              26 48 8.11
              27 0 1774
              27 2 1729
              27 12 1727
              27 24 1216
              27 48 551
              28 0 26.6
              28 2 25.7
              28 12 684
              28 24 516
              28 48 199
              30 0 8.11
              30 2
              30 12 4569
              30 24 9794
              30 48 1888
              31 0 8.11
              31 2 9.72
              31 12 4547
              31 24 11003
              31 48 918
              32 0 8.11
              32 2 8.11
              32 12 1152
              32 24 5059
              32 48 482
              34 0 8.11
              34 2 8.11
              34 12 995
              34 24 3493
              34 48 343
              35 0 1944
              35 2 1972
              35 12 3030
              35 24 1657
              35 48 1896
              49 0 26.3
              49 2 26.7
              49 12
              49 24 3247
              49 48 3416
              50 0 10.2
              50 2 16
              50 12 5776
              50 24 1768
              50 48 1455
              52 0 162
              52 2 181
              52 12 1847
              52 24 1007
              52 48
              53 0 8.11
              53 2 8.11
              53 12 9571
              53 24
              53 48
              54 0 8.11
              54 2 8.11
              54 12 1420
              54 24 806
              54 48 74.8
              55 0 933
              55 2 609
              55 12 6865
              55 24 3205
              55 48 370
              56 0 1013
              56 2 920
              56 12 4196
              56 24 11216
              56 48 359
              58 0 8.11
              58 2 8.11
              58 12 6022
              58 24 12775
              58 48 919
              59 0 8.11
              59 2 515
              59 12 869
              59 24 64
              59 48
              60 0 8.11
              60 2 8.11
              60 12 25.9
              60 24
              60 48
              61 0 8.11
              61 2 8.11
              61 12 3199
              61 24
              61 48
              62 0 8.11
              62 2 8.11
              62 12 1243
              62 24 183
              62 48
              63 0 37.4
              63 2 981
              63 12 1053
              63 24 3229
              63 48 154
              64 0 40.85
              64 2 32
              64 12 308
              64 24 251
              64 48 153
              65 0 158
              65 2
              65 12 2796
              65 24 1697
              65 48 317
              66 0 8.11
              66 2 8.11
              66 12 7073
              66 24 2645
              66 48 689
              67 0 8.11
              67 2 10.4
              67 12 4458
              67 24 841
              67 48 302
              68 0 8.11
              68 2 8.11
              68 12 1869
              68 24 3609
              68 48 351
              69 0 57
              69 2 72.8
              69 12 3564
              69 24 1473
              69 48 647
              70 0 11.6
              70 2 7.9
              70 12 1904
              70 24 1082
              70 48 207
              87 0 73.2
              87 2 3836
              87 12 3907
              87 24 703
              87 48
              109 0 8.11
              109 2 8.11
              109 12 1401
              109 24 541
              109 48 196
              112 0 11.8
              112 2 10.7
              112 12 3927
              112 24 1871
              112 48 1585
              114 0 101
              114 2 84
              114 12 3485
              114 24 2238
              114 48 215
              116 0 142
              116 2 149
              116 12 3811
              116 24 5089
              116 48 1622
              117 0 8.11
              117 2 8.11
              117 12 2883
              117 24 4390
              117 48 693
              118 0 8.11
              118 2 8.11
              118 12 2359
              118 24 3986
              118 48 1617
              119 0 179
              119 2 159
              119 12 1823
              119 24 1440
              119 48 560
              120 0 102
              120 2 119
              120 12 4591
              120 24 5777
              120 48 891
              123 0 32.7
              123 2
              123 12 456
              123 24 3332
              123 48 535
              125 0 8.11
              125 2 8.11
              125 12
              125 24 329
              125 48 176
              126 0 8.11
              126 2 8.11
              126 12 5060
              126 24 1607
              126 48 1262
              127 0 23.6
              127 2
              127 12 4502
              127 24 1781
              127 48 907
              128 0 22.8
              128 2 1854
              128 12 1593
              128 24 1368
              128 48 496
              130 0 55
              130 2
              130 12 2413
              130 24 2882
              130 48 1220
              131 0 8.11
              131 2
              131 12 3020
              131 24 1564
              131 48 583
              134 0 45.5
              134 2 50
              134 12 2118
              134 24 2597
              134 48 613
              135 0 8.11
              135 2 121
              135 12 2664
              135 24 2437
              135 48
              136 0 119
              136 2 8.11
              136 12 3930
              136 24 877
              136 48
              137 0 8.11
              137 2 8.11
              137 12 2969
              137 24 5732
              137 48 457
              139 0 8.11
              139 2 8.11
              139 12 2989
              139 24 5018
              139 48 454
              140 0 11.4
              140 2 11.6
              140 12 987
              140 24 3507
              140 48 354
              141 0 8.11
              141 2 8.11
              141 12 1482
              141 24 1846
              141 48 381
              143 0 57.8
              143 2 50.1
              143 12 3443
              143 24 5785
              143 48 1152
              144 0 17.9
              144 2
              144 12 3743
              144 24 2547
              144 48 550

              Comment


              • #8
                Originally posted by Nicholas Thomford View Post
                Can anyone assist me with what i am doing wrong with the time and how to over come that challenge
                pksumm has an option, notimechk, that would avoid the error message, but I don't recommend that approach.

                An alternative would be to fit a mixed-effects model to the concentration values with treatment, time and their interaction as categorical predictors, and then integrate the marginal predictions separately by treatment using the trapezoid rule.

                Because the variance of the values varies greatly over time, you would probably want to allow an unstructured residual covariance matrix when fitting the mixed model. (You could also consider taking the logarithm of the concentration values in order to stabilize the variance, and then comparing the areas under the log-concentration curves.)

                Your "Please see below how my dataset appears." doesn't show any ACT or ART (whatever they are) treatment variable, but for the pooled data that you do show, the code would be something like the following. (I rename your variables for consistency in case and length, and to comply with Stata's naming rules.)
                Code:
                input int pid byte tim double cnc // ID TIME LUM-BI (ng/ml)
                <data redacted for brevity>
                end
                
                mixed cnc i.tim || pid: , noconstant residuals(unstructured, t(tim)) ///
                    nolrtest nolog
                margins , at(tim = (0 2 12 24 48)) post
                lincom _b[1._at] + _b[2._at] + (_b[2._at] + _b[3._at]) / 2 * 10 + ///
                    (_b[3._at] + _b[4._at]) / 2 * 12 + (_b[4._at] + _b[5._at]) / 2 * 24
                The concentration 8.11 ng/ml appears 56 times in your dataset. Is it the limit of quantitation (or detection)? If so, then why is there also a value of 7.9 ng/ml for study participant 70?

                Comment

                Working...
                X